From 053580f69b30d068a591144bde802b46473650c7 Mon Sep 17 00:00:00 2001 From: Shmuel Melamud Date: Fri, 19 Apr 2024 17:13:49 +0300 Subject: [PATCH] Rename set_battery_level() and set_nominal_battery_capacity() parameter. --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7a9d3e2..ce15441 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -374,8 +374,8 @@ impl Vhal { self.set_property(VehicleProperty::AP_POWER_STATE_REQ, value, 0, None) } - pub fn set_battery_level(&self, speed: f32) -> Result<()> { - let value = VehiclePropertyValue::Float(speed); + pub fn set_battery_level(&self, level: f32) -> Result<()> { + let value = VehiclePropertyValue::Float(level); self.set_property(VehicleProperty::EV_BATTERY_LEVEL, value, 0, None) } @@ -386,8 +386,8 @@ impl Vhal { resp.expect_f32() } - pub fn set_nominal_battery_capacity(&self, speed: f32) -> Result<()> { - let value = VehiclePropertyValue::Float(speed); + pub fn set_nominal_battery_capacity(&self, capacity: f32) -> Result<()> { + let value = VehiclePropertyValue::Float(capacity); self.set_property(VehicleProperty::INFO_EV_BATTERY_CAPACITY, value, 0, None) }