Browse Source

gps_cli: set node location based on gps

pull/890/head
Florent 8 months ago
parent
commit
f6064b41e9
  1. 5
      src/helpers/CommonCLI.cpp

5
src/helpers/CommonCLI.cpp

@ -580,6 +580,11 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
if (l != NULL) { if (l != NULL) {
l->syncTime(); l->syncTime();
} }
} else if (memcmp(command, "gps setloc", 10) == 0) {
_prefs->node_lat = sensors.node_lat;
_prefs->node_lon = sensors.node_lon;
savePrefs();
strcpy(reply, "ok");
} else if (memcmp(command, "gps", 3) == 0) { } else if (memcmp(command, "gps", 3) == 0) {
LocationProvider * l = sensors.getLocationProvider(); LocationProvider * l = sensors.getLocationProvider();
if (l != NULL) { if (l != NULL) {

Loading…
Cancel
Save