quite some fixes

This commit is contained in:
2023-09-23 22:47:07 +02:00
parent d0c5421ad9
commit e48f680fec
14 changed files with 69 additions and 49 deletions
+4 -2
View File
@@ -19,6 +19,8 @@ Network::Network(const char *ssid, const char *passphrase) {
}
Network::Network(const char *ssid, const char *passphrase, NetworkAdresses adresses) {
this->adresses = adresses;
if (!WiFi.mode(WIFI_AP_STA))
std::cout << "Network::connectWiFi failed WiFi.mode" << std::endl;
@@ -81,8 +83,8 @@ void Network::printIPs() {
}
std::cout << "WiFi is connected to" << std::endl;
std::cout << "IP address: " << std::endl;
std::cout << this->adresses.localIP << std::endl;
std::cout << "WiFi MAC Address: " << WiFi.macAddress() << std::endl << std::endl;
std::cout << WiFi.localIP().toString().c_str() << std::endl;
std::cout << "WiFi MAC Address: " << WiFi.macAddress().c_str() << std::endl << std::endl;
}
uint8_t Network::getCurrentChannel() {