From 14cd4ea0104b4be5f0b1a48ba822193bd603f2e8 Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 1 Jun 2025 15:32:02 +0200 Subject: [PATCH] t1000: remove sync custom var --- .../sensors/MicroNMEALocationProvider.h | 2 +- variants/t1000-e/target.cpp | 19 ++----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/helpers/sensors/MicroNMEALocationProvider.h b/src/helpers/sensors/MicroNMEALocationProvider.h index a4a2f5d6..e8b09d9a 100644 --- a/src/helpers/sensors/MicroNMEALocationProvider.h +++ b/src/helpers/sensors/MicroNMEALocationProvider.h @@ -98,7 +98,7 @@ public : next_check = millis() + 1000; if (_time_sync_needed && time_valid > 2) { if (_clock != NULL) { - _clock.setCurrentTime(getTimestamp()); + _clock->setCurrentTime(getTimestamp()); _time_sync_needed = false; } } diff --git a/variants/t1000-e/target.cpp b/variants/t1000-e/target.cpp index 296551e1..29ca1acd 100644 --- a/variants/t1000-e/target.cpp +++ b/variants/t1000-e/target.cpp @@ -179,26 +179,14 @@ void T1000SensorManager::loop() { } } -int T1000SensorManager::getNumSettings() const { return 2; } // just one supported: "gps" (power switch) +int T1000SensorManager::getNumSettings() const { return 1; } // just one supported: "gps" (power switch) const char* T1000SensorManager::getSettingName(int i) const { - switch (i) { - case 0: - return "gps"; - break; - case 1: - return "sync"; - break; - default: - return NULL; - break; - } + return i == 0 ? "gps" : NULL; } const char* T1000SensorManager::getSettingValue(int i) const { if (i == 0) { return gps_active ? "1" : "0"; - } else if (i == 1) { - return _nmea->waitingTimeSync() ? "1" : "0"; } return NULL; } @@ -210,9 +198,6 @@ bool T1000SensorManager::setSettingValue(const char* name, const char* value) { start_gps(); } return true; - } else if (strcmp(name, "sync") == 0) { - _nmea->syncTime(); // whatever the value ... - return true; } return false; // not supported }