Removed not required variables
This commit is contained in:
parent
0d5bdbe9cf
commit
22ac3faff1
@ -102,9 +102,9 @@ void WebApiDtuClass::onDtuAdminPost(AsyncWebServerRequest* request)
|
||||
}
|
||||
|
||||
CONFIG_T& config = Configuration.get();
|
||||
char* t;
|
||||
|
||||
// Interpret the string as a hex value and convert it to uint64_t
|
||||
config.Dtu_Serial = strtoll(root[F("dtu_serial")].as<String>().c_str(), &t, 16);
|
||||
config.Dtu_Serial = strtoll(root[F("dtu_serial")].as<String>().c_str(), NULL, 16);
|
||||
config.Dtu_PollInterval = root[F("dtu_pollinterval")].as<uint32_t>();
|
||||
config.Dtu_PaLevel = root[F("dtu_palevel")].as<uint8_t>();
|
||||
Configuration.write();
|
||||
|
||||
@ -28,8 +28,7 @@ void WebApiEventlogClass::onEventlogStatus(AsyncWebServerRequest* request)
|
||||
uint64_t serial = 0;
|
||||
if (request->hasParam("inv")) {
|
||||
String s = request->getParam("inv")->value();
|
||||
char* t;
|
||||
serial = strtoll(s.c_str(), &t, 16);
|
||||
serial = strtoll(s.c_str(), NULL, 16);
|
||||
}
|
||||
|
||||
auto inv = Hoymiles.getInverterBySerial(serial);
|
||||
|
||||
@ -126,9 +126,8 @@ void WebApiInverterClass::onInverterAdd(AsyncWebServerRequest* request)
|
||||
return;
|
||||
}
|
||||
|
||||
char* t;
|
||||
// Interpret the string as a hex value and convert it to uint64_t
|
||||
inverter->Serial = strtoll(root[F("serial")].as<String>().c_str(), &t, 16);
|
||||
inverter->Serial = strtoll(root[F("serial")].as<String>().c_str(), NULL, 16);
|
||||
|
||||
strncpy(inverter->Name, root[F("name")].as<String>().c_str(), INV_MAX_NAME_STRLEN);
|
||||
Configuration.write();
|
||||
@ -224,8 +223,7 @@ void WebApiInverterClass::onInverterEdit(AsyncWebServerRequest* request)
|
||||
|
||||
INVERTER_CONFIG_T& inverter = Configuration.get().Inverter[root[F("id")].as<uint8_t>()];
|
||||
|
||||
char* t;
|
||||
uint64_t new_serial = strtoll(root[F("serial")].as<String>().c_str(), &t, 16);
|
||||
uint64_t new_serial = strtoll(root[F("serial")].as<String>().c_str(), NULL, 16);
|
||||
uint64_t old_serial = inverter.Serial;
|
||||
|
||||
// Interpret the string as a hex value and convert it to uint64_t
|
||||
|
||||
Loading…
Reference in New Issue
Block a user