fixed minor incompatibilities with idf 5.4 version
This commit is contained in:
parent
9585559ab7
commit
370f791151
|
|
@ -39,8 +39,8 @@ int ExecCommand(char *cmd);
|
|||
void GetObjectsInfo(char *data);
|
||||
void SetCustomObjects(obj_struct_t *obj);
|
||||
|
||||
obj_struct_t* GetSystemObjects();
|
||||
obj_struct_t* GetCustomObjects();
|
||||
const obj_struct_t* GetSystemObjects();
|
||||
const obj_struct_t* GetCustomObjects();
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -94,12 +94,12 @@ const obj_struct_t com_obj_arr[] = {
|
|||
{ 0 }
|
||||
};
|
||||
|
||||
obj_struct_t* GetSystemObjects()
|
||||
const obj_struct_t* GetSystemObjects()
|
||||
{
|
||||
return &com_obj_arr;
|
||||
return (obj_struct_t*)&com_obj_arr;
|
||||
}
|
||||
|
||||
obj_struct_t* GetCustomObjects()
|
||||
const obj_struct_t* GetCustomObjects()
|
||||
{
|
||||
return custom_com_obj_arr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@
|
|||
#include "NetTransport.h"
|
||||
#include "MQTT.h"
|
||||
#include "UserCallbacks.h"
|
||||
#if (ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR > 1)
|
||||
#include "esp_log_level.h"
|
||||
#endif
|
||||
|
||||
#define TAG "MQTT"
|
||||
#define SERVICE_NAME "SYSTEM" // Dedicated service name
|
||||
|
|
@ -630,6 +633,9 @@ esp_err_t ExtendedLog(esp_log_level_t level, char *format, ...)
|
|||
case ESP_LOG_ERROR:
|
||||
ESP_LOGE(SPIRAL_LOG_TAG, "%s", data);
|
||||
break;
|
||||
#if (ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR > 1)
|
||||
case ESP_LOG_MAX:
|
||||
#endif
|
||||
}
|
||||
|
||||
for (int idx = 0; idx < 2; idx++)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ extern struct netif *netif_default;
|
|||
|
||||
esp_netif_t* GetNetifCurrentDefault()
|
||||
{
|
||||
return netif_default;
|
||||
return (esp_netif_t*)netif_default;
|
||||
}
|
||||
|
||||
esp_netif_t* GetNetifByName(char *name)
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ static void wifi_init_apsta(void *pvParameter)
|
|||
ESP_ERROR_CHECK(esp_netif_set_hostname(sta_netif, "test_TEST"));
|
||||
ESP_ERROR_CHECK(esp_netif_set_hostname(ap_netif, GetSysConf()->NetBIOSName));
|
||||
char name[32];
|
||||
esp_netif_get_hostname(sta_netif, &name);
|
||||
esp_netif_get_hostname(sta_netif, (const char**)(&name));
|
||||
ESP_LOGW(TAG, "Net bios name set to %s", name);
|
||||
|
||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_APSTA));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user