cooked it lol
This commit is contained in:
parent
25781c49db
commit
f4bea57723
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -2262,7 +2262,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tesla-charge-controller"
|
name = "tesla-charge-controller"
|
||||||
version = "0.1.10-prerelease"
|
version = "0.1.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-channel",
|
"async-channel",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tesla-charge-controller"
|
name = "tesla-charge-controller"
|
||||||
version = "0.1.10-prerelease"
|
version = "0.1.10"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MITNFA"
|
license = "MITNFA"
|
||||||
description = "Controls Tesla charge rate based on solar charge data"
|
description = "Controls Tesla charge rate based on solar charge data"
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl Pli {
|
||||||
|
|
||||||
pub fn refresh(&mut self) {
|
pub fn refresh(&mut self) {
|
||||||
if let Ok(batv) = self.read_ram(50) {
|
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) {
|
if let Ok(duty_cycle) = self.read_ram(39) {
|
||||||
self.duty_cycle.set((duty_cycle as f64) / 255.);
|
self.duty_cycle.set((duty_cycle as f64) / 255.);
|
||||||
|
|
Loading…
Reference in a new issue