cargo fmt

This commit is contained in:
2025-05-07 00:01:23 +02:00
parent 26da6b39cc
commit bfc3fbc6e1
7 changed files with 63 additions and 94 deletions

View File

@@ -2,10 +2,7 @@ use chrono::{DateTime, TimeDelta, Utc};
use chrono_tz::Tz;
use serde::{Deserialize, Serialize};
use crate::{
config::PlantConfig,
in_time_range, plant_hal,
};
use crate::{config::PlantConfig, in_time_range, plant_hal};
const MOIST_SENSOR_MAX_FREQUENCY: f32 = 6500.; // 60kHz (500Hz margin)
const MOIST_SENSOR_MIN_FREQUENCY: f32 = 150.; // this is really, really dry, think like cactus levels
@@ -239,9 +236,7 @@ impl PlantState {
false
}
}
PlantWateringMode::TimerOnly => {
!self.pump_in_timeout(plant_conf, current_time)
}
PlantWateringMode::TimerOnly => !self.pump_in_timeout(plant_conf, current_time),
}
}
@@ -308,4 +303,4 @@ pub struct PlantInfo<'a> {
last_pump: Option<DateTime<Tz>>,
/// next time when pump should activate
next_pump: Option<DateTime<Tz>>,
}
}