apply ethernet dhcp only if adapter is enabled
This commit is contained in:
parent
8b7fa561e7
commit
9c5e618820
|
|
@ -115,9 +115,11 @@ static void got_ip_event_handler(void *arg, esp_event_base_t event_base,
|
|||
{
|
||||
ip_event_got_ip_t *event = (ip_event_got_ip_t*) event_data;
|
||||
const esp_netif_ip_info_t *ip_info = &event->ip_info;
|
||||
#if CONFIG_WEBGUIAPP_ETHERNET_ENABLE
|
||||
memcpy(&GetSysConf()->ethSettings.IPAddr, &event->ip_info.ip, sizeof(event->ip_info.ip));
|
||||
memcpy(&GetSysConf()->ethSettings.Mask, &event->ip_info.netmask, sizeof(event->ip_info.netmask));
|
||||
memcpy(&GetSysConf()->ethSettings.Gateway, &event->ip_info.gw, sizeof(event->ip_info.gw));
|
||||
#endif
|
||||
ESP_LOGI(TAG, "Ethernet Got IP Address");
|
||||
ESP_LOGI(TAG, "~~~~~~~~~~~");
|
||||
ESP_LOGI(TAG, "ETHIP:" IPSTR, IP2STR(&ip_info->ip));
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ unsigned long ulTotalRunTime, ulStatsAsPercentage;
|
|||
|
||||
if( ulStatsAsPercentage > 0UL )
|
||||
{
|
||||
sprintf( pcWriteBuffer, "%s----%llu----%lu%%----%d\r\n",
|
||||
sprintf( pcWriteBuffer, "%-32s %-10llu %-10lu%% %d\r\n",
|
||||
pxTaskStatusArray[ x ].pcTaskName,
|
||||
(uint64_t)pxTaskStatusArray[ x ].ulRunTimeCounter,
|
||||
ulStatsAsPercentage,
|
||||
|
|
@ -244,7 +244,7 @@ unsigned long ulTotalRunTime, ulStatsAsPercentage;
|
|||
{
|
||||
/* If the percentage is zero here then the task has
|
||||
consumed less than 1% of the total run time. */
|
||||
sprintf( pcWriteBuffer, "%s----%llu----<1%%----%d\r\n",
|
||||
sprintf( pcWriteBuffer, "%-32s %-10llu <1%% %d\r\n",
|
||||
pxTaskStatusArray[ x ].pcTaskName,
|
||||
(uint64_t)pxTaskStatusArray[ x ].ulRunTimeCounter,
|
||||
(int)pxTaskStatusArray[ x ].usStackHighWaterMark);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user