mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
CommonCLI: gps management commands
This commit is contained in:
parent
5ae574b426
commit
0502bc370d
6 changed files with 72 additions and 0 deletions
|
|
@ -78,6 +78,16 @@ public :
|
|||
}
|
||||
}
|
||||
|
||||
bool isActive() override {
|
||||
// directly read the enable pin if present as gps can be
|
||||
// activated/deactivated outside of here ...
|
||||
if (_pin_en != -1) {
|
||||
return digitalRead(_pin_en) == PIN_GPS_EN_ACTIVE;
|
||||
} else {
|
||||
return true; // no enable so must be active
|
||||
}
|
||||
}
|
||||
|
||||
void syncTime() override { nmea.clear(); LocationProvider::syncTime(); }
|
||||
long getLatitude() override { return nmea.getLatitude(); }
|
||||
long getLongitude() override { return nmea.getLongitude(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue