mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-09-17 14:35:31 +00:00
Merge pull request #3390 from jbrazio/feature/is-gps-detected
Add isGPSDetected() capability probe to SensorManager
This commit is contained in:
@@ -23,6 +23,7 @@ public:
|
||||
virtual const char* getSettingValue(int i) const { return NULL; }
|
||||
virtual bool setSettingValue(const char* name, const char* value) { return false; }
|
||||
virtual LocationProvider* getLocationProvider() { return NULL; }
|
||||
virtual bool isGPSDetected() const { return false; }
|
||||
|
||||
// Helper functions to manage setting by keys (useful in many places ...)
|
||||
const char* getSettingByKey(const char* key) {
|
||||
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
#if ENV_INCLUDE_GPS
|
||||
EnvironmentSensorManager(LocationProvider &location): _location(&location){};
|
||||
LocationProvider* getLocationProvider() { return _location; }
|
||||
bool isGPSDetected() const override { return gps_detected; }
|
||||
#else
|
||||
EnvironmentSensorManager(){};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user