feat: persistent settings in LittleFS JSON
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "rtc_time.h"
|
||||
#include "forecast.h"
|
||||
#include "history.h"
|
||||
#include "app_settings.h"
|
||||
|
||||
static void i2cScan() {
|
||||
Serial.println(F("I2C scan:"));
|
||||
@@ -59,6 +60,14 @@ void setup() {
|
||||
historyCount(), d, classifyTrend(d));
|
||||
else
|
||||
Serial.println(F("history: not enough data for trend"));
|
||||
|
||||
// --- settings self-test (remove after Task 8) ---
|
||||
settingsBegin();
|
||||
Serial.printf("settings: alt=%.0f tz=%d lat=%.4f lon=%.4f\n",
|
||||
settings.altitudeM, settings.tzOffsetMin, settings.lat, settings.lon);
|
||||
settings.altitudeM += 1.0f; // change and persist to test round-trip
|
||||
settingsSave();
|
||||
Serial.println(F("settings: incremented altitude and saved"));
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
Reference in New Issue
Block a user