Add Crash reset to More Battery Info page

This commit is contained in:
Daniel Öster 2025-04-14 00:04:02 +03:00
parent a7e6eca69e
commit 4fbca4b029
4 changed files with 74 additions and 5 deletions

View file

@ -597,6 +597,15 @@ void init_webserver() {
request->send(200, "text/plain", "Updated successfully");
});
// Route for resetting Crash data on BYD Atto3 batteries
server.on("/resetCrash", HTTP_GET, [](AsyncWebServerRequest* request) {
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password)) {
return request->requestAuthentication();
}
datalayer_extended.bydAtto3.UserRequestCrashReset = true;
request->send(200, "text/plain", "Updated successfully");
});
// Route for erasing DTC on Volvo/Polestar batteries
server.on("/volvoEraseDTC", HTTP_GET, [](AsyncWebServerRequest* request) {
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password)) {