Part 1 of V3 extraction in preperation of v4 and v3 software merge
This commit is contained in:
@@ -3,6 +3,7 @@ use chrono_tz::Tz;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{config::PlantConfig, in_time_range, plant_hal};
|
||||
use crate::plant_hal::BoardInteraction;
|
||||
|
||||
const MOIST_SENSOR_MAX_FREQUENCY: f32 = 7500.; // 60kHz (500Hz margin)
|
||||
const MOIST_SENSOR_MIN_FREQUENCY: f32 = 150.; // this is really, really dry, think like cactus levels
|
||||
@@ -113,7 +114,7 @@ fn map_range_moisture(
|
||||
impl PlantState {
|
||||
pub fn read_hardware_state(
|
||||
plant_id: usize,
|
||||
board: &mut plant_hal::PlantCtrlBoard,
|
||||
board: &mut plant_hal::HAL,
|
||||
config: &PlantConfig,
|
||||
) -> Self {
|
||||
let sensor_a = if config.sensor_a {
|
||||
|
||||
Reference in New Issue
Block a user