mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-11 10:45:41 +00:00
Added CPU frequency to status page
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#if defined(ESP32)
|
||||
#include <esp_task_wdt.h>
|
||||
#include <esp_wifi.h>
|
||||
#include <esp_clk.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -239,9 +240,11 @@ void AmsWebServer::sysinfoJson() {
|
||||
#if defined(ESP8266)
|
||||
wifi_get_macaddr(STATION_IF, mac);
|
||||
wifi_get_macaddr(SOFTAP_IF, apmac);
|
||||
uint32_t cpu_freq = 80;
|
||||
#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();
|
||||
#endif
|
||||
|
||||
sprintf(macStr, "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
@@ -277,6 +280,7 @@ void AmsWebServer::sysinfoJson() {
|
||||
"esp8266",
|
||||
#endif
|
||||
chipIdStr.c_str(),
|
||||
cpu_freq / 1000000,
|
||||
macStr,
|
||||
apMacStr,
|
||||
sys.boardType,
|
||||
|
||||
Reference in New Issue
Block a user