Merge pull request #3390 from jbrazio/feature/is-gps-detected

Add isGPSDetected() capability probe to SensorManager
This commit is contained in:
Huw Duddy
2026-09-14 22:41:37 +10:00
committed by GitHub
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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