allow higher max charge rate
All checks were successful
Build .deb on release / Build-Deb (push) Successful in 1m59s
All checks were successful
Build .deb on release / Build-Deb (push) Successful in 1m59s
This commit is contained in:
parent
327851afaa
commit
3356974da9
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -2538,7 +2538,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tesla-charge-controller"
|
||||
version = "1.2.5"
|
||||
version = "1.2.6"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap 4.4.11",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "tesla-charge-controller"
|
||||
version = "1.2.5"
|
||||
version = "1.2.6"
|
||||
edition = "2021"
|
||||
license = "MITNFA"
|
||||
description = "Controls Tesla charge rate based on solar charge data"
|
||||
|
|
|
@ -177,7 +177,7 @@ async fn shutoff_status() -> Json<ShutoffStatus> {
|
|||
#[post("/set-max/<limit>")]
|
||||
async fn set_max(limit: i64, remote_addr: std::net::IpAddr) {
|
||||
log::warn!("setting max: {remote_addr:?}");
|
||||
let limit = limit.clamp(access_config().min_rate, 15);
|
||||
let limit = limit.clamp(access_config().min_rate, 32);
|
||||
write_to_config().max_rate = limit;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
|
||||
<div id="rate-control">
|
||||
<h3>Charge rate:</h3>
|
||||
<input type="number" id="max-rate" max="15" min="0" onchange="change_max()" autocomplete="off" />
|
||||
<input type="number" id="max-rate" max="32" min="0" onchange="change_max()" autocomplete="off" />
|
||||
<button id="set-maximum" onclick="set_maximum()" disabled>Set maximum</button>
|
||||
<br><br>
|
||||
<input type="number" id="min-rate" max="15" min="0" onchange="change_min()" autocomplete="off" />
|
||||
<input type="number" id="min-rate" max="32" min="0" onchange="change_min()" autocomplete="off" />
|
||||
<button id="set-minimum" onclick="set_minimum()" disabled>Set minimum</button>
|
||||
</div>
|
||||
<div id="info"></div>
|
||||
|
|
Loading…
Reference in a new issue