feat: Wi-Fi provisioning via WiFiManager captive portal
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "forecast.h"
|
||||
#include "history.h"
|
||||
#include "app_settings.h"
|
||||
#include "net.h"
|
||||
#include "state.h"
|
||||
|
||||
AppState g_state;
|
||||
@@ -51,6 +52,13 @@ void setup() {
|
||||
historyLoad(); // restore prior samples (empty on first ever boot)
|
||||
Serial.printf("history restored: %d samples\n", historyCount());
|
||||
|
||||
displaySplash("WiFi", "Connect / portal");
|
||||
if (netBegin()) {
|
||||
Serial.printf("WiFi connected: %s\n", netIP().c_str());
|
||||
} else {
|
||||
Serial.println(F("WiFi not connected - running offline"));
|
||||
}
|
||||
|
||||
// Seed first sample immediately.
|
||||
sampleNow();
|
||||
historyAdd(rtcEpoch(), g_state.mslHpa, g_state.tempC);
|
||||
|
||||
Reference in New Issue
Block a user