mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Merge pull request #764 from dalathegreat/feature/reset-isolation-tesla
Feature: Tesla, add isolation clearing function
This commit is contained in:
commit
f0fd607c5e
4 changed files with 93 additions and 4 deletions
|
@ -385,6 +385,15 @@ void init_webserver() {
|
|||
}
|
||||
});
|
||||
|
||||
// Route for clearing isolation faults on Tesla
|
||||
server.on("/clearIsolation", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password)) {
|
||||
return request->requestAuthentication();
|
||||
}
|
||||
datalayer.battery.settings.user_requests_isolation_clear = true;
|
||||
request->send(200, "text/plain", "Updated successfully");
|
||||
});
|
||||
|
||||
// Route for resetting SOH on Nissan LEAF batteries
|
||||
server.on("/resetSOH", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue