add GPS for nano g2
hardcoded interval of 1 minute after first fix obtained
This commit is contained in:
@@ -8,16 +8,36 @@
|
||||
#include <helpers/AutoDiscoverRTCClock.h>
|
||||
#include <helpers/SensorManager.h>
|
||||
#ifdef DISPLAY_CLASS
|
||||
#include <helpers/ui/SH1106Display.h>
|
||||
#include <helpers/ui/SH1106Display.h>
|
||||
#endif
|
||||
#include <helpers/sensors/LocationProvider.h>
|
||||
|
||||
class NanoG2UltraSensorManager : public SensorManager
|
||||
{
|
||||
bool gps_active = false;
|
||||
LocationProvider *_location;
|
||||
|
||||
void start_gps();
|
||||
void stop_gps();
|
||||
|
||||
public:
|
||||
NanoG2UltraSensorManager(LocationProvider &location) : _location(&location) {}
|
||||
bool begin() override;
|
||||
bool querySensors(uint8_t requester_permissions, CayenneLPP &telemetry) override;
|
||||
void loop() override;
|
||||
int getNumSettings() const override;
|
||||
const char *getSettingName(int i) const override;
|
||||
const char *getSettingValue(int i) const override;
|
||||
bool setSettingValue(const char *name, const char *value) override;
|
||||
};
|
||||
|
||||
extern NanoG2Ultra board;
|
||||
extern WRAPPER_CLASS radio_driver;
|
||||
extern AutoDiscoverRTCClock rtc_clock;
|
||||
extern SensorManager sensors;
|
||||
extern NanoG2UltraSensorManager sensors;
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
extern DISPLAY_CLASS display;
|
||||
extern DISPLAY_CLASS display;
|
||||
#endif
|
||||
|
||||
bool radio_init();
|
||||
|
||||
Reference in New Issue
Block a user