* Heltec tracker: added GPS to custom HWTSensorManager
This commit is contained in:
@@ -7,11 +7,29 @@
|
||||
#include <helpers/CustomSX1262Wrapper.h>
|
||||
#include <helpers/AutoDiscoverRTCClock.h>
|
||||
#include <helpers/SensorManager.h>
|
||||
#include <helpers/sensors/LocationProvider.h>
|
||||
|
||||
class HWTSensorManager : public SensorManager {
|
||||
bool gps_active = false;
|
||||
LocationProvider * _location;
|
||||
|
||||
void start_gps();
|
||||
void stop_gps();
|
||||
public:
|
||||
HWTSensorManager(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 HeltecV3Board board;
|
||||
extern WRAPPER_CLASS radio_driver;
|
||||
extern AutoDiscoverRTCClock rtc_clock;
|
||||
extern SensorManager sensors;
|
||||
extern HWTSensorManager sensors;
|
||||
|
||||
bool radio_init();
|
||||
uint32_t radio_get_rng_seed();
|
||||
|
||||
Reference in New Issue
Block a user