mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-15 20:37:19 +00:00
Merge branch 'master' into mqtt_changes
This commit is contained in:
@@ -238,11 +238,11 @@ void AmsWebServer::sysinfoJson() {
|
||||
#if defined(ESP8266)
|
||||
wifi_get_macaddr(STATION_IF, mac);
|
||||
wifi_get_macaddr(SOFTAP_IF, apmac);
|
||||
uint32_t cpu_freq = 80;
|
||||
uint8_t cpu_freq = system_get_cpu_freq();
|
||||
#elif defined(ESP32)
|
||||
esp_wifi_get_mac((wifi_interface_t)ESP_IF_WIFI_STA, mac);
|
||||
esp_wifi_get_mac((wifi_interface_t)ESP_IF_WIFI_AP, apmac);
|
||||
uint32_t cpu_freq = esp_clk_cpu_freq();
|
||||
uint32_t cpu_freq = esp_clk_cpu_freq() / 1000000;
|
||||
#endif
|
||||
|
||||
sprintf(macStr, "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
@@ -278,7 +278,7 @@ void AmsWebServer::sysinfoJson() {
|
||||
"esp8266",
|
||||
#endif
|
||||
chipIdStr.c_str(),
|
||||
cpu_freq / 1000000,
|
||||
cpu_freq,
|
||||
macStr,
|
||||
apMacStr,
|
||||
sys.boardType,
|
||||
@@ -1448,7 +1448,7 @@ void AmsWebServer::handleSave() {
|
||||
strcpy(entsoe.area, priceRegion.c_str());
|
||||
strcpy(entsoe.currency, server.arg(F("pc")).c_str());
|
||||
entsoe.multiplier = server.arg(F("pm")).toFloat() * 1000;
|
||||
entsoe.fixedPrice = server.arg(F("pf")).toFloat() * 1000;
|
||||
entsoe.fixedPrice = server.hasArg(F("pf")) ? server.arg(F("pf")).toFloat() * 1000 : 0;
|
||||
config->setEntsoeConfig(entsoe);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user