5 Commits

Author SHA1 Message Date
ae5763f0d9 move all mqtt publishing functions to mqtt module 2026-05-10 19:51:42 +02:00
203d1c696c refctor: TankInfo structure (consistent layout)
- fix: use tagged enum serialization for TankError
- fix: rename TankInfo fields for consistent naming (volume_ml, pct, water_temp_c)
- renamed some fields for better clarity on contained value
2026-05-10 19:51:40 +02:00
08e4f9a7e8 refactor: PlantInfo structure (consistent layout)
- fix: use tagged enum serialization for MoistureSensorError and PumpError
- fix: flatten PlantInfo sensors to SensorTelemetry with top-level moisture_pct
2026-05-10 19:51:37 +02:00
2df120f73b refactor: BatteryInfo structure (consistent layout)
- use tagged enum serialization for BatteryError
- flatten BatteryInfo telemetry with consistent field names and typed error
2026-05-10 19:47:58 +02:00
58aa55fd12 fix: serialize firmware/state as JSON instead of Debug format 2026-05-10 19:47:56 +02:00

View File

@@ -561,8 +561,7 @@ async fn safe_main(spawner: Spawner) -> FatResult<()> {
if stay_alive { if stay_alive {
let reboot_now = Arc::new(AtomicBool::new(false)); let reboot_now = Arc::new(AtomicBool::new(false));
let _webserver = http_server(reboot_now.clone(), stack.take().unwrap());
spawner.spawn(http_server(reboot_now.clone(), stack.take().unwrap())?);
wait_infinity(board, WaitType::MqttConfig, reboot_now.clone(), UTC).await; wait_infinity(board, WaitType::MqttConfig, reboot_now.clone(), UTC).await;
} else { } else {
//TODO wait for all mqtt publishes? //TODO wait for all mqtt publishes?