Implement pump flow monitoring and UI normalization enhancements
- Rust: Add `MIN_PUMP_FLOW_ML` constant and logging for insufficient pump flow with fault handling. - UI: Normalize config fields to maintain consistency and prevent false dirty flags after round-trips. - KiCad: Update board zone settings for `PlantCtrlESP32` and `MPPT`. - IntelliJ: Add `.idea` configurations for project setup and inspections.
This commit is contained in:
@@ -478,6 +478,17 @@ async fn safe_main(spawner: Spawner) -> FatResult<()> {
|
||||
state.flow_value_ml,
|
||||
)
|
||||
.await;
|
||||
if !dry_run && state.flow_value_ml < MIN_PUMP_FLOW_ML {
|
||||
log(
|
||||
LogMessage::PumpInsufficientFlow,
|
||||
(plant_id + 1) as u32,
|
||||
state.flow_value_ml as u32,
|
||||
&(MIN_PUMP_FLOW_ML as u32).to_string(),
|
||||
"",
|
||||
);
|
||||
board.board_hal.general_fault(true).await;
|
||||
board.board_hal.fault(plant_id, true).await?;
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
mqtt::pump_info(
|
||||
@@ -700,6 +711,8 @@ async fn safe_main(spawner: Spawner) -> FatResult<()> {
|
||||
}
|
||||
}
|
||||
|
||||
const MIN_PUMP_FLOW_ML: f32 = 200.0;
|
||||
|
||||
pub async fn do_secure_pump(
|
||||
board: &mut MutexGuard<'_, CriticalSectionRawMutex, HAL<'_>>,
|
||||
plant_id: usize,
|
||||
|
||||
Reference in New Issue
Block a user