2020-05-05 00:39:57 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-09-16 16:22:03 +00:00
|
|
|
#include "../concurrency/PeriodicTask.h"
|
2020-05-05 00:39:57 +00:00
|
|
|
#include "GPS.h"
|
|
|
|
#include "Observer.h"
|
|
|
|
#include "TinyGPS++.h"
|
|
|
|
|
|
|
|
/**
|
2020-09-16 16:22:03 +00:00
|
|
|
* A gps class thatreads from a NMEA GPS stream (and FIXME - eventually keeps the gps powered down except when reading)
|
2020-05-05 00:39:57 +00:00
|
|
|
*
|
|
|
|
* When new data is available it will notify observers.
|
|
|
|
*/
|
2020-09-16 16:22:03 +00:00
|
|
|
class NMEAGPS : public GPS
|
2020-05-05 00:39:57 +00:00
|
|
|
{
|
|
|
|
TinyGPSPlus reader;
|
2020-09-16 16:22:03 +00:00
|
|
|
|
2020-05-05 03:02:43 +00:00
|
|
|
uint32_t lastUpdateMsec = 0;
|
2020-05-05 00:39:57 +00:00
|
|
|
|
|
|
|
public:
|
2020-09-25 16:14:00 +00:00
|
|
|
virtual bool setup();
|
|
|
|
|
2020-05-05 00:39:57 +00:00
|
|
|
virtual void loop();
|
|
|
|
};
|