Enable I2C sensors and EnvironmentSensorManager for Heltec T114
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include <T114Board.h>
|
||||
#include <helpers/radiolib/CustomSX1262Wrapper.h>
|
||||
#include <helpers/AutoDiscoverRTCClock.h>
|
||||
#include <helpers/SensorManager.h>
|
||||
#include <helpers/sensors/EnvironmentSensorManager.h>
|
||||
#include <helpers/sensors/LocationProvider.h>
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
@@ -18,23 +18,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class T114SensorManager : public SensorManager {
|
||||
bool gps_active = false;
|
||||
bool gps_detected = false;
|
||||
LocationProvider* _location;
|
||||
|
||||
void start_gps();
|
||||
void stop_gps();
|
||||
class T114SensorManager : public EnvironmentSensorManager {
|
||||
public:
|
||||
T114SensorManager(LocationProvider &location): _location(&location) { }
|
||||
T114SensorManager(LocationProvider &location): EnvironmentSensorManager(location) { }
|
||||
bool begin() override;
|
||||
bool querySensors(uint8_t requester_permissions, CayenneLPP& telemetry) override;
|
||||
void loop() override;
|
||||
LocationProvider* getLocationProvider() override { return gps_detected ? _location : NULL; }
|
||||
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 T114Board board;
|
||||
|
||||
Reference in New Issue
Block a user