cleanup
This commit is contained in:
parent
5cdda39451
commit
bb10f9a9d8
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -2256,7 +2256,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tesla-charge-controller"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2-prerelease"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"chrono",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue