Merge pull request #1057 from dalathegreat/feature/BYD-unlock-crashed

Atto3: Add crashed BMS unlocking 🔒
This commit is contained in:
Daniel Öster 2025-05-05 17:07:10 +03:00 committed by GitHub
commit 0467401bab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 77 additions and 5 deletions

View file

@ -608,6 +608,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)) {