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.
This commit is contained in:
15i1i-s7v committed 2025-12-18 10:08:10 +01:00
1 parent 1da64c9cea
commit 4fcc8dfe12
2 files changed
+7 -6

No files matched your search

+5 -5
View File
@@ -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)]
+2 -1
View File
@@ -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<Sender<AsyncThreadMessage>> {
fn get_main_sender(&self) -> Option<Sender<AsyncThreadMessage>> {
self.main_sender.clone()
}
}