From 4fcc8dfe1260f0bb17a0116c44bc35b8bf50dd8d Mon Sep 17 00:00:00 2001 From: 15i1i-s7v Date: Thu, 18 Dec 2025 10:08:10 +0100 Subject: [PATCH] fix: Change fan RPM type from f32 to f64 for precision - Updated the `front_fan_rpm` and `back_fan_rpm` fields in `LiveValuesEvent` struct from f32 to f64. - Adjusted the `FanState` struct to use f64 for the `rpm` field. - Modified the `SetFrontFan` and `SetBackFan` mutation variants to expect f64 values instead of f32. --- machines/src/aquapath1/api.rs | 10 +++++----- machines/src/aquapath1/mod.rs | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/machines/src/aquapath1/api.rs b/machines/src/aquapath1/api.rs index 4a49197f..030b3c02 100644 --- a/machines/src/aquapath1/api.rs +++ b/machines/src/aquapath1/api.rs @@ -20,8 +20,8 @@ pub struct LiveValuesEvent { pub back_temperature: f64, pub front_temp_reservoir: f64, pub back_temp_reservoir: f64, - pub front_fan_rpm: f32, - pub back_fan_rpm: f32, + pub front_fan_rpm: f64, + pub back_fan_rpm: f64, } impl LiveValuesEvent { @@ -75,7 +75,7 @@ pub struct FlowState { #[derive(Serialize, Debug, Clone)] pub struct FanState { - pub rpm: f32, + pub rpm: f64, } #[derive(Serialize, Debug, Clone)] @@ -100,8 +100,8 @@ enum Mutation { SetFrontFlow(bool), SetBackFlow(bool), - SetBackFan(f32), - SetFrontFan(f32), + SetBackFan(f64), + SetFrontFan(f64), } #[derive(Debug, Clone)] diff --git a/machines/src/aquapath1/mod.rs b/machines/src/aquapath1/mod.rs index 9b63d9ee..e02ca58e 100644 --- a/machines/src/aquapath1/mod.rs +++ b/machines/src/aquapath1/mod.rs @@ -48,7 +48,8 @@ impl Machine for AquaPathV1 { fn get_machine_identification_unique(&self) -> MachineIdentificationUnique { self.machine_identification_unique.clone() } -fn get_main_sender(&self) -> Option> { + + fn get_main_sender(&self) -> Option> { self.main_sender.clone() } }