From 7b3b56200d56cacf8552f7ff367d9a4b30b5c471 Mon Sep 17 00:00:00 2001 From: Empire Phoenix Date: Sun, 30 Mar 2025 01:15:36 +0100 Subject: [PATCH] adjust max frequency to actual existing ones, fix ui error state --- rust/src/main.rs | 2 +- rust/src_webpack/src/plant.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/src/main.rs b/rust/src/main.rs index c629ffe..f1d6bbc 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -32,7 +32,7 @@ use tank::*; const TIME_ZONE: Tz = Berlin; -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) = ( diff --git a/rust/src_webpack/src/plant.ts b/rust/src_webpack/src/plant.ts index ad611a6..93df81a 100644 --- a/rust/src_webpack/src/plant.ts +++ b/rust/src_webpack/src/plant.ts @@ -139,13 +139,13 @@ export class PlantView { } update(a: number, b: number) { - if (a = 200){ + if (a == 200){ this.moistureA.innerText = "error" } else { this.moistureA.innerText = String(a) } - if (b = 200){ + if (b == 200){ this.moistureB.innerText = "error" } else { this.moistureB.innerText = String(b)