Add isolation clearing function

This commit is contained in:
Daniel Öster 2025-01-07 20:42:54 +02:00
parent 64e633f10f
commit 221ce94d51
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)) {