![](/media/cache/profiles/2012_sf_avc_095.jpg.50x50_q85.jpg)
Code for autonomous ground vehicle, Data Bus, 3rd place winner in 2012 Sparkfun AVC.
Dependencies: Watchdog mbed Schedule SimpleFilter LSM303DLM PinDetect DebounceIn Servo
Diff: UI/LCD/GPSStatus.cpp
- Revision:
- 0:826c6171fc1b
diff -r 000000000000 -r 826c6171fc1b UI/LCD/GPSStatus.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UI/LCD/GPSStatus.cpp Wed Jun 20 14:57:48 2012 +0000 @@ -0,0 +1,51 @@ +#include "GPSStatus.h" + +#define WIDTH 8 +#define HEIGHT 9 + +SerialGraphicLCD *GPSStatus::lcd = 0; + +GPSStatus::GPSStatus(int x, int y): + _x(x), _y(y) +{ +} + +void GPSStatus::init() +{ + if (lcd) { + lcd->pixel(_x+1, _y+1, true); + lcd->pixel(_x+2, _y+1, true); + lcd->pixel(_x+3, _y+1, true); + lcd->pixel(_x+2, _y+2, true); + lcd->pixel(_x+2, _y+3, true); + lcd->pixel(_x+3, _y+3, true); + lcd->pixel(_x+4, _y+3, true); + lcd->pixel(_x+2, _y+4, true); + lcd->pixel(_x+5, _y+4, true); + lcd->pixel(_x+1, _y+5, true); + lcd->pixel(_x+3, _y+5, true); + lcd->pixel(_x+1, _y+6, true); + lcd->pixel(_x+2, _y+7, true); + lcd->posXY(_x+10, _y); + _last = 0; + } +} + +void GPSStatus::update(float hdop) +{ + lcd->pixel(_x+5, _y+1, hdop < 3.0); + + lcd->pixel(_x+6, _y+1, hdop < 2.0); + lcd->pixel(_x+6, _y+2, hdop < 2.0); + + lcd->pixel(_x+7, _y+1, hdop < 1.5); + lcd->pixel(_x+7, _y+2, hdop < 1.5); + lcd->pixel(_x+7, _y+3, hdop < 1.5); + + lcd->pixel(_x+8, _y+1, hdop < 1.1); + lcd->pixel(_x+8, _y+2, hdop < 1.1); + lcd->pixel(_x+8, _y+3, hdop < 1.1); + lcd->pixel(_x+8, _y+4, hdop < 1.1); + + return; +} \ No newline at end of file