Commit d86de0ab authored by Eric Duminil's avatar Eric Duminil
Browse files

One fewer string

parent 98010e91
......@@ -13,14 +13,14 @@ namespace config {
}
// Initialize Wi-Fi
void WiFiConnect(const String &hostname) {
void WiFiConnect(const char *hostname) {
//NOTE: WiFi Multi could allow multiple SSID and passwords.
WiFi.persistent(false); // Don't write user & password to Flash.
WiFi.mode(WIFI_STA); // Set ESP to be a WiFi-client only
#if defined(ESP8266)
WiFi.hostname(hostname);
#elif defined(ESP32)
WiFi.setHostname(hostname.c_str());
WiFi.setHostname(hostname);
#endif
Serial.print(F("WiFi - Connecting to "));
......
......@@ -5,6 +5,6 @@
#include "util.h"
#include "led_effects.h"
void WiFiConnect(const String &hostname);
void WiFiConnect(const char *hostname);
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment