diff --git a/rust/src/main.rs b/rust/src/main.rs index 6cdf2e9..a6abb98 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -5,7 +5,7 @@ use std::{ use anyhow::{bail, Result}; use chrono::{DateTime, Datelike, TimeDelta, Timelike, Utc}; -use chrono_tz::{TZ_VARIANTS, Tz}; +use chrono_tz::{Europe::Berlin, Tz}; use config::Mode; use esp_idf_hal::delay::Delay; @@ -30,7 +30,7 @@ mod tank; use tank::*; -const MOIST_SENSOR_MAX_FREQUENCY: u32 = 5500; // 60kHz (500Hz margin) +const MOIST_SENSOR_MAX_FREQUENCY: u32 = 6500; // 60kHz (500Hz margin) const MOIST_SENSOR_MIN_FREQUENCY: u32 = 150; // this is really really dry, think like cactus levels const FROM: (f32, f32) = ( @@ -913,7 +913,13 @@ fn wait_infinity(wait_type: WaitType, reboot_now: Arc) -> ! { let mut led_count = 8; let mut pattern_step = 0; + let mut led_count = 8; loop { + // TODO implement actually different blink patterns instead of modulating blink duration + if wait_type == WaitType::MissingConfig { + led_count %= 8; + led_count += 1; + }; unsafe { BOARD_ACCESS.lock().unwrap().update_charge_indicator(); match wait_type {