This commit is contained in:
Alex Janka 2024-01-17 09:18:49 +11:00
parent 5cdda39451
commit bb10f9a9d8
4 changed files with 3 additions and 7 deletions

2
Cargo.lock generated
View file

@ -2256,7 +2256,7 @@ dependencies = [
[[package]]
name = "tesla-charge-controller"
version = "1.0.1"
version = "1.0.2-prerelease"
dependencies = [
"async-channel",
"chrono",

View file

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

View file

@ -26,14 +26,12 @@ pub enum TcrcRequest {
#[derive(Clone, Copy, Serialize, Deserialize, Debug)]
pub struct TcrcState {
pub control_enable: bool,
pub currently_controlling: bool,
}
impl Default for TcrcState {
fn default() -> Self {
Self {
control_enable: true,
currently_controlling: false,
}
}
}

View file

@ -27,8 +27,7 @@
}
function flash() {
fetch(api_url + "/flash", { method: "POST" })
.then((response) => console.log(response));
fetch(api_url + "/flash", { method: "POST" });
}
function disable_automatic_control() {
@ -46,7 +45,6 @@
}
function update_control_buttons(data) {
console.log(data);
var button_container = document.getElementById("buttons");
while (button_container.childElementCount > 0) { button_container.removeChild(button_container.firstChild) }
if (data.control_enable) {