mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-11 05:56:57 +03:00
Migration of PlatformIO 5.2.0 to 6.1.0 (resp. ESP IDF from 4.4.2 to 5.0.1) (#2305)
* Migration to PlatformIO 6.1.0 * Disable RMTMEM usage as it is no longer allowed -> Smart LEDs not functional! * moved miniz into subfolder of jomjol_fileserver_ota, else it does not build anymore. * cleanup * fix leading NaN (#2310) * Migration to PlatformIO 6.1.0 * Disable RMTMEM usage as it is no longer allowed -> Smart LEDs not functional! * moved miniz into subfolder of jomjol_fileserver_ota, else it does not build anymore. * cleanup * Task watchdog has new config name * Fix return value check. It must be something else than ESP_FAIL, but it does not need to be ESP_OK! * add missing strucures to work around new RMTMEM restriction (untested) --------- Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "version.h"
|
||||
|
||||
#include "esp_wifi.h"
|
||||
#include <netdb.h>
|
||||
|
||||
#include "MainFlowControl.h"
|
||||
#include "esp_log.h"
|
||||
@@ -24,6 +25,8 @@
|
||||
httpd_handle_t server = NULL;
|
||||
std::string starttime = "";
|
||||
|
||||
extern esp_netif_t *sta_netif;
|
||||
|
||||
static const char *TAG = "MAIN SERVER";
|
||||
|
||||
/* An HTTP GET handler */
|
||||
@@ -350,11 +353,15 @@ esp_err_t sysinfo_handler(httpd_req_t *req)
|
||||
char freeheapmem[11];
|
||||
sprintf(freeheapmem, "%lu", (long) getESPHeapSize());
|
||||
|
||||
tcpip_adapter_ip_info_t ip_info;
|
||||
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
|
||||
esp_netif_ip_info_t ip_info;
|
||||
ESP_ERROR_CHECK(esp_netif_get_ip_info(sta_netif, &ip_info));
|
||||
const char *hostname;
|
||||
ESP_ERROR_CHECK(tcpip_adapter_get_hostname(TCPIP_ADAPTER_IF_STA, &hostname));
|
||||
ESP_ERROR_CHECK(esp_netif_get_hostname(sta_netif, &hostname));
|
||||
|
||||
char ipFormated[4*3+3+1];
|
||||
|
||||
sprintf(ipFormated, IPSTR, IP2STR(&ip_info.ip));
|
||||
|
||||
zw = string("[{") +
|
||||
"\"firmware\": \"" + gitversion + "\"," +
|
||||
"\"buildtime\": \"" + buildtime + "\"," +
|
||||
@@ -364,7 +371,7 @@ esp_err_t sysinfo_handler(httpd_req_t *req)
|
||||
"\"html\": \"" + htmlversion + "\"," +
|
||||
"\"cputemp\": \"" + cputemp + "\"," +
|
||||
"\"hostname\": \"" + hostname + "\"," +
|
||||
"\"IPv4\": \"" + ip4addr_ntoa(&ip_info.ip) + "\"," +
|
||||
"\"IPv4\": \"" + string(ipFormated) + "\"," +
|
||||
"\"freeHeapMem\": \"" + freeheapmem + "\"" +
|
||||
"}]";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user