Browse Source

Вывод IP при загрузке в SERIAL0

pull/1/head
Sergey 5 years ago
parent
commit
26027cf48f
  1. 6
      Marlin/src/module/mks_wifi/mks_wifi.cpp

6
Marlin/src/module/mks_wifi/mks_wifi.cpp

@ -11,6 +11,7 @@ uint8_t esp_packet[ESP_PACKET_DATA_MAX_SIZE];
void mks_wifi_init(void){
SERIAL_ECHO_MSG("Init MKS WIFI");
DEBUG("Init MKS WIFI");
@ -171,8 +172,11 @@ void mks_wifi_parse_packet(ESP_PROTOC_FRAME *packet){
if(packet->data[6] == ESP_NET_WIFI_CONNECTED){
if(show_ip_once==0){
show_ip_once=1;
sprintf(ip_str,"IP %d.%d.%d.%d",packet->data[0],packet->data[1],packet->data[2],packet->data[3]);
sprintf(ip_str,"; IP %d.%d.%d.%d",packet->data[0],packet->data[1],packet->data[2],packet->data[3]);
ui.set_status((const char *)ip_str,true);
SERIAL_ECHO_START();
SERIAL_ECHOLN((char*)ip_str);
}
DEBUG("[Net] connected, IP: %d.%d.%d.%d",packet->data[0],packet->data[1],packet->data[2],packet->data[3]);
}else if(packet->data[6] == ESP_NET_WIFI_EXCEPTION){

Loading…
Cancel
Save