feat: HTTP server with REST API for current/history/settings
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "history.h"
|
||||
#include "app_settings.h"
|
||||
#include "net.h"
|
||||
#include "web_server.h"
|
||||
#include "state.h"
|
||||
|
||||
AppState g_state;
|
||||
@@ -67,10 +68,15 @@ void setup() {
|
||||
sampleNow();
|
||||
historyAdd(rtcEpoch(), g_state.mslHpa, g_state.tempC);
|
||||
displayRender(g_state);
|
||||
|
||||
webBegin();
|
||||
if (netConnected()) Serial.printf("Web UI: http://%s/\n", netIP().c_str());
|
||||
|
||||
tSample = tHistory = tFlush = millis();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
webLoop();
|
||||
unsigned long now = millis();
|
||||
|
||||
if (now - tSample >= SAMPLE_INTERVAL_MS) {
|
||||
|
||||
Reference in New Issue
Block a user