From 9eb948458cd203d84cb0e3cae035cc9ef046f36e Mon Sep 17 00:00:00 2001 From: ju6ge Date: Tue, 5 May 2026 23:57:55 +0200 Subject: [PATCH] fix: rename TankInfo fields for consistent naming (volume_ml, pct, water_temp_c) --- rust/src/tank.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rust/src/tank.rs b/rust/src/tank.rs index ed4f077..93fd702 100644 --- a/rust/src/tank.rs +++ b/rust/src/tank.rs @@ -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, + pub(crate) volume_ml: Option, /// if there is an issue with the water level sensor pub(crate) sensor_error: Option, /// raw water sensor value pub(crate) raw: Option, /// percent value - pub(crate) percent: Option, + pub(crate) pct: Option, /// water in the tank might be frozen pub(crate) water_frozen: bool, /// water temperature - pub(crate) water_temp: Option, + pub(crate) water_temp_c: Option, pub(crate) temp_sensor_error: Option, }