Merge pull request #764 from dalathegreat/feature/reset-isolation-tesla

Feature: Tesla, add isolation clearing function
This commit is contained in:
Daniel Öster 2025-01-10 17:34:39 +03:00 committed by GitHub
commit f0fd607c5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 93 additions and 4 deletions

View file

@ -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)) {