fix: rename TankInfo fields for consistent naming (volume_ml, pct, water_temp_c)
This commit is contained in:
@@ -142,15 +142,15 @@ impl TankState {
|
||||
TankInfo {
|
||||
enough_water,
|
||||
warn_level,
|
||||
left_ml,
|
||||
volume_ml: left_ml,
|
||||
sensor_error: tank_err,
|
||||
raw,
|
||||
water_frozen: water_temp
|
||||
.as_ref()
|
||||
.is_ok_and(|temp| *temp < WATER_FROZEN_THRESH),
|
||||
water_temp: water_temp.as_ref().copied().ok(),
|
||||
water_temp_c: water_temp.as_ref().copied().ok(),
|
||||
temp_sensor_error: water_temp.as_ref().err().map(|err| err.to_string()),
|
||||
percent,
|
||||
pct: percent,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,16 +180,16 @@ pub struct TankInfo {
|
||||
/// warning that water needs to be refilled soon
|
||||
pub(crate) warn_level: bool,
|
||||
/// estimation how many ml are still in the tank
|
||||
pub(crate) left_ml: Option<f32>,
|
||||
pub(crate) volume_ml: Option<f32>,
|
||||
/// if there is an issue with the water level sensor
|
||||
pub(crate) sensor_error: Option<TankError>,
|
||||
/// raw water sensor value
|
||||
pub(crate) raw: Option<f32>,
|
||||
/// percent value
|
||||
pub(crate) percent: Option<f32>,
|
||||
pub(crate) pct: Option<f32>,
|
||||
/// water in the tank might be frozen
|
||||
pub(crate) water_frozen: bool,
|
||||
/// water temperature
|
||||
pub(crate) water_temp: Option<f32>,
|
||||
pub(crate) water_temp_c: Option<f32>,
|
||||
pub(crate) temp_sensor_error: Option<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user