detach before call
This commit is contained in:
parent
9c782879a5
commit
6adfb3c09e
@ -108,6 +108,8 @@ void WasserSensorCheck() {
|
||||
status.detach();
|
||||
|
||||
wateroutagewaitduration = settingsservice.getSettings()->waterOutageWaitDuration;
|
||||
|
||||
status.detach();
|
||||
status.attach(5, []() {
|
||||
wateroutagewaitduration -= 5;
|
||||
Serial.print("noch ");
|
||||
@ -115,6 +117,7 @@ void WasserSensorCheck() {
|
||||
Serial.println(" Sekunden verbleibend");
|
||||
|
||||
if (wateroutagewaitduration <= 0) {
|
||||
status.detach();
|
||||
if (digitalRead(WasserSensorPin)) {
|
||||
allow = true;
|
||||
Serial.println("Einschalten der Pumpe wieder erlaubt.");
|
||||
@ -125,7 +128,6 @@ void WasserSensorCheck() {
|
||||
Serial.print("wassersensor immer noch kein Wasser --> verlaengern um 120min\n\n");
|
||||
WasserSensorCheck();
|
||||
}
|
||||
status.detach();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user