Skip to content

Commit

Permalink
Rename set_battery_level() and set_nominal_battery_capacity() parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
smelamud authored and aesteve-rh committed Apr 19, 2024
1 parent a4b5a50 commit 08cbf44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand Down

0 comments on commit 08cbf44

Please sign in to comment.