Compare commits
8 Commits
55bcc0c52f
...
legacy/v3-
| Author | SHA1 | Date | |
|---|---|---|---|
|
961f5748c6
|
|||
|
a66843a455
|
|||
|
379808e659
|
|||
|
e2b2734301
|
|||
|
43a0c3c274
|
|||
|
2b83d99820
|
|||
|
4cc70f96de
|
|||
|
c90174be27
|
@@ -415,10 +415,10 @@ async fn safe_main(spawner: Spawner) -> FatResult<()> {
|
||||
.get_esp()
|
||||
.store_last_pump_time(plant_id, cur);
|
||||
board.board_hal.get_esp().last_pump_time(plant_id);
|
||||
pump_info(plant_id, true, pump_ineffective, 0, 0, 0, false).await;
|
||||
mqtt::pump_info(plant_id, true, pump_ineffective, 0, 0, 0, false).await;
|
||||
let result = do_secure_pump(&mut board, plant_id, plant_config, dry_run).await?;
|
||||
board.board_hal.pump(plant_id, false).await?;
|
||||
pump_info(
|
||||
mqtt::pump_info(
|
||||
plant_id,
|
||||
false,
|
||||
pump_ineffective,
|
||||
@@ -561,7 +561,8 @@ async fn safe_main(spawner: Spawner) -> FatResult<()> {
|
||||
|
||||
if stay_alive {
|
||||
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;
|
||||
} else {
|
||||
//TODO wait for all mqtt publishes?
|
||||
|
||||
@@ -300,7 +300,7 @@ impl PlantState {
|
||||
false
|
||||
},
|
||||
cooldown: self.pump_in_timeout(plant_conf, current_time),
|
||||
out_of_work_hour: in_time_range(
|
||||
out_of_work_hour: !in_time_range(
|
||||
current_time,
|
||||
plant_conf.pump_hour_start,
|
||||
plant_conf.pump_hour_end,
|
||||
|
||||
Reference in New Issue
Block a user