diff --git a/.gitignore b/.gitignore index dbf19cc..fbc06d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ secrets.h /.vscode /build -log.txt \ No newline at end of file +log*.txt \ No newline at end of file diff --git a/wordclock_esp8266.ino b/wordclock_esp8266.ino index b28faea..df16870 100644 --- a/wordclock_esp8266.ino +++ b/wordclock_esp8266.ino @@ -244,6 +244,9 @@ void setup() { // set custom ip for portal //wifiManager.setAPStaticIPConfig(IPAdress_AccessPoint, Gateway_AccessPoint, Subnetmask_AccessPoint); + // set a custom hostname + wifiManager.setHostname(hostname); + // fetches ssid and pass from eeprom and tries to connect // if it does not connect it starts an access point with the specified name // here "wordclockAP" @@ -352,7 +355,7 @@ void setup() { loadBrightnessSettingsFromEEPROM(); loadColorShiftStateFromEEPROM(); - if(!ESP.getResetReason().equals("Software/System restart")){ + if(ESP.getResetReason().equals("Power On") || ESP.getResetReason().equals("External System")){ // test quickly each LED for(int r = 0; r < HEIGHT; r++){ for(int c = 0; c < WIDTH; c++){