Skip to content

Commit

Permalink
Merge pull request #1406 from michmela44/FixESP420JSON
Browse files Browse the repository at this point in the history
Remove extra ': ' from [ESP420] JSON
  • Loading branch information
bdring authored Dec 31, 2024
2 parents c16a8ac + 1322144 commit 4984788
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions FluidNC/src/WebUI/WifiConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,16 @@ namespace WebUI {
modeName = "???";
}

j.id_value_object("Phy Mode: ", modeName);
j.id_value_object("Channel: ", WiFi.channel());
j.id_value_object("Phy Mode", modeName);
j.id_value_object("Channel", WiFi.channel());

tcpip_adapter_dhcp_status_t dhcp_status;
tcpip_adapter_dhcpc_get_status(TCPIP_ADAPTER_IF_STA, &dhcp_status);
j.id_value_object("IP Mode: ", (dhcp_status == TCPIP_ADAPTER_DHCP_STARTED ? "DHCP" : "Static"));
j.id_value_object("IP: ", IP_string(WiFi.localIP()));
j.id_value_object("Gateway: ", IP_string(WiFi.gatewayIP()));
j.id_value_object("Mask: ", IP_string(WiFi.subnetMask()));
j.id_value_object("DNS: ", IP_string(WiFi.dnsIP()));
j.id_value_object("IP Mode", (dhcp_status == TCPIP_ADAPTER_DHCP_STARTED ? "DHCP" : "Static"));
j.id_value_object("IP", IP_string(WiFi.localIP()));
j.id_value_object("Gateway", IP_string(WiFi.gatewayIP()));
j.id_value_object("Mask", IP_string(WiFi.subnetMask()));
j.id_value_object("DNS", IP_string(WiFi.dnsIP()));

} //this is web command so connection => no command
j.id_value_object("Disabled Mode", std::string("AP (") + WiFi.softAPmacAddress().c_str() + ")");
Expand All @@ -275,9 +275,9 @@ namespace WebUI {
wifi_country_t country;
esp_wifi_get_config(WIFI_IF_AP, &conf);
esp_wifi_get_country(&country);
j.id_value_object("SSID: ", (const char*)conf.ap.ssid);
j.id_value_object("Visible: ", (conf.ap.ssid_hidden == 0 ? "Yes" : "No"));
j.id_value_object("Radio country set: ",
j.id_value_object("SSID", (const char*)conf.ap.ssid);
j.id_value_object("Visible", (conf.ap.ssid_hidden == 0 ? "Yes" : "No"));
j.id_value_object("Radio country set",
std::string("") + country.cc[0] + country.cc[1] + " (channels " + std::to_string(country.schan) +
"-" + std::to_string((country.schan + country.nchan - 1)) + ", max power " +
std::to_string(country.max_tx_power) + "dBm)");
Expand Down

0 comments on commit 4984788

Please sign in to comment.