adjust max frequency to actual existing ones, fix ui error state

This commit is contained in:
Empire Phoenix 2025-03-30 01:15:36 +01:00
parent 4b1f2b9ca7
commit 7b3b56200d
2 changed files with 3 additions and 3 deletions

View File

@ -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) = (

View File

@ -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)