Browse Source

wait if not configured

main
Hendrik Langer 7 years ago
parent
commit
0ba9d21fb3
  1. 17
      src/main.cpp

17
src/main.cpp

@ -185,15 +185,16 @@ void setup() {
iot.mqtt.onMessage(onMqttMessage); iot.mqtt.onMessage(onMqttMessage);
iot.mqtt.setWill(sensorTopic.c_str(), 0, false, "OFFLINE"); iot.mqtt.setWill(sensorTopic.c_str(), 0, false, "OFFLINE");
/*
while (iot.wifi.status() != WL_CONNECTED) { // Wait here if not configured
delay(500); if (iot.configuration.get("WifiConfigured") != "True") {
Serial.print("."); while (iot.wifi.status() != WL_CONNECTED) {
screen->draw(); delay(500);
Serial.print(".");
screen->draw();
}
} }
onWiFiConnect();
*/
strcpy(state.timeStr, "--:--:--"); strcpy(state.timeStr, "--:--:--");
if (alarmclock.isNight()) { if (alarmclock.isNight()) {
@ -235,7 +236,7 @@ void onWiFiConnect() {
} }
} }
udp.beginMulticast(udpMulticastAddress, udpMulticastPort); /* udp.beginMulticast(udpMulticastAddress, udpMulticastPort);*/
} }

Loading…
Cancel
Save