mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Setting voltage for battery is always fake
This commit is contained in:
parent
6bd0865195
commit
0eb852997c
4 changed files with 8 additions and 8 deletions
|
@ -601,7 +601,7 @@ void init_webserver() {
|
|||
});
|
||||
|
||||
// Route for editing FakeBatteryVoltage
|
||||
server.on("/updateBatteryVoltage", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
server.on("/updateFakeBatteryVoltage", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password))
|
||||
return request->requestAuthentication();
|
||||
if (!request->hasParam("value")) {
|
||||
|
@ -611,7 +611,7 @@ void init_webserver() {
|
|||
String value = request->getParam("value")->value();
|
||||
float val = value.toFloat();
|
||||
|
||||
battery->set_voltage(val);
|
||||
battery->set_fake_voltage(val);
|
||||
|
||||
request->send(200, "text/plain", "Updated successfully");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue