gps_cli: gps state is now saved and restored upon reboot

This commit is contained in:
Florent de Lamotte
2025-10-06 15:12:03 +02:00
parent c9fd1827ef
commit 6ed8e9d514
5 changed files with 66 additions and 33 deletions

View File

@@ -38,6 +38,9 @@ struct NodePrefs { // persisted to file
uint32_t bridge_baud; // 9600, 19200, 38400, 57600, 115200 (default 115200)
uint8_t bridge_channel; // 1-14 (ESP-NOW only)
char bridge_secret[16]; // for XOR encryption of bridge packets (ESP-NOW only)
// Gps settings
uint8_t gps_enabled;
uint32_t gps_interval; // in seconds
};
class CommonCLICallbacks {
@@ -83,9 +86,6 @@ class CommonCLI {
void savePrefs();
void loadPrefsInt(FILESYSTEM* _fs, const char* filename);
const char* sensorGetCustomVar(const char* key);
bool sensorSetCustomVar(const char* key, const char* value);
public:
CommonCLI(mesh::MainBoard& board, mesh::RTCClock& rtc, NodePrefs* prefs, CommonCLICallbacks* callbacks)
: _board(&board), _rtc(&rtc), _prefs(prefs), _callbacks(callbacks) { }