Use references & flash strings where approperate (#110)
* pass originId as const reference * store strings for serial logging in flash * Use string references where approperate.
This commit is contained in:
@ -31,7 +31,7 @@ WiFiSettingsService::WiFiSettingsService(AsyncWebServer* server, FS* fs, Securit
|
||||
std::bind(&WiFiSettingsService::onStationModeDisconnected, this, std::placeholders::_1));
|
||||
#endif
|
||||
|
||||
addUpdateHandler([&](String originId) { reconfigureWiFiConnection(); }, false);
|
||||
addUpdateHandler([&](const String& originId) { reconfigureWiFiConnection(); }, false);
|
||||
}
|
||||
|
||||
void WiFiSettingsService::begin() {
|
||||
@ -68,7 +68,7 @@ void WiFiSettingsService::manageSTA() {
|
||||
}
|
||||
// Connect or reconnect as required
|
||||
if ((WiFi.getMode() & WIFI_STA) == 0) {
|
||||
Serial.println("Connecting to WiFi.");
|
||||
Serial.println(F("Connecting to WiFi."));
|
||||
if (_state.staticIPConfig) {
|
||||
// configure for static IP
|
||||
WiFi.config(_state.localIP, _state.gatewayIP, _state.subnetMask, _state.dnsIP1, _state.dnsIP2);
|
||||
|
Reference in New Issue
Block a user