This commit is contained in:
2025-01-17 20:10:17 +01:00
parent 927a2f8d98
commit 31350eeed2
16 changed files with 346 additions and 4251 deletions

View File

@@ -38,8 +38,8 @@ pub mod plant_hal;
const TIME_ZONE: Tz = Berlin;
const MOIST_SENSOR_MAX_FREQUENCY: u32 = 50000; // 60kHz (500Hz margin)
const MOIST_SENSOR_MIN_FREQUENCY: u32 = 500; // 0.5kHz (500Hz margin)
const MOIST_SENSOR_MAX_FREQUENCY: u32 = 250000; // 60kHz (500Hz margin)
const MOIST_SENSOR_MIN_FREQUENCY: u32 = 10000; // 0.5kHz (500Hz margin)
const FROM: (f32, f32) = (
MOIST_SENSOR_MIN_FREQUENCY as f32,

View File

@@ -1355,12 +1355,6 @@ impl PlantHal {
},
)?;
println!("Setup filter");
//TODO validate filter value! currently max allowed value
counter_unit1.set_filter_value(1023)?;
counter_unit1.filter_enable()?;
println!("Wifi start");
let sys_loop = EspSystemEventLoop::take()?;

File diff suppressed because it is too large Load Diff

View File

@@ -519,17 +519,6 @@ pub fn httpd(reboot_now: Arc<AtomicBool>) -> Box<EspHttpServer<'static>> {
})
.unwrap();
server
.fn_handler("/bootstrap-grid.css", Method::Get, |request| {
let headers = [
("Access-Control-Allow-Origin", "*"),
("Access-Control-Allow-Headers", "*"),
("Content-Type", "text/css")
];
request.into_response(200, None, &headers)?.write(include_bytes!("bootstrap-grid.css"))?;
anyhow::Ok(())
})
.unwrap();
server
}
fn cors_response(