cooked it lol

This commit is contained in:
Alex Janka 2024-01-10 15:48:59 +11:00
parent 25781c49db
commit f4bea57723
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View file

@ -2262,7 +2262,7 @@ dependencies = [
[[package]]
name = "tesla-charge-controller"
version = "0.1.10-prerelease"
version = "0.1.10"
dependencies = [
"anyhow",
"async-channel",

View file

@ -1,6 +1,6 @@
[package]
name = "tesla-charge-controller"
version = "0.1.10-prerelease"
version = "0.1.10"
edition = "2021"
license = "MITNFA"
description = "Controls Tesla charge rate based on solar charge data"

View file

@ -30,7 +30,7 @@ impl Pli {
pub fn refresh(&mut self) {
if let Ok(batv) = self.read_ram(50) {
self.voltage_gauge.set(((batv * 4) as f64) / 10.);
self.voltage_gauge.set((batv as f64) * (4. / 10.));
}
if let Ok(duty_cycle) = self.read_ram(39) {
self.duty_cycle.set((duty_cycle as f64) / 255.);