From 23f48710848809ea11266d808d043bf233bf7c52 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Sun, 7 Jan 2024 10:33:32 +1100 Subject: [PATCH] actually improved webapp!! --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/types.rs | 4 ++++ webapp/index.html | 41 +++++++++++++++++++++++++++++++++++++---- 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c91c59..dd42606 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1991,7 +1991,7 @@ dependencies = [ [[package]] name = "tesla-charge-controller" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index e405319..58a2fd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tesla-charge-controller" -version = "0.1.2" +version = "0.1.3" edition = "2021" license = "MITNFA" description = "Controls Tesla charge rate based on solar charge data" diff --git a/src/types.rs b/src/types.rs index 07bd2be..f701d63 100644 --- a/src/types.rs +++ b/src/types.rs @@ -5,9 +5,11 @@ pub struct ChargeState { pub battery_level: i64, pub battery_range: f64, pub charge_amps: i64, + pub charge_rate: f64, pub charge_current_request: i64, pub charge_current_request_max: i64, pub charge_enable_request: bool, + pub charge_limit_soc: i64, } impl ChargeState { @@ -23,9 +25,11 @@ impl From for ChargeState { battery_level: value.battery_level, battery_range: value.battery_range, charge_amps: value.charge_amps, + charge_rate: value.charge_rate, charge_current_request: value.charge_current_request, charge_current_request_max: value.charge_current_request_max, charge_enable_request: value.charge_enable_request, + charge_limit_soc: value.charge_limit_soc, } } } diff --git a/webapp/index.html b/webapp/index.html index c4ca5ef..b28207b 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -4,37 +4,70 @@ Tesla Charge Control + - - -
+ +
\ No newline at end of file