diff options
Diffstat (limited to 'det_hele/det_hele.ino')
-rw-r--r-- | det_hele/det_hele.ino | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/det_hele/det_hele.ino b/det_hele/det_hele.ino index 93ac90f..c4f5939 100644 --- a/det_hele/det_hele.ino +++ b/det_hele/det_hele.ino @@ -267,17 +267,20 @@ bool handlePasscode() { void armedLoop() { if (handlePasscode()) { unarmedSetup(); + return; } double deviation = weightDeviation(); if (deviation > MAX_DEVIATION) { awareSetup(); + return; } } void awareLoop() { if (handlePasscode()) { unarmedSetup(); + return; } double deviation = weightDeviation(); @@ -291,6 +294,7 @@ void awareLoop() { Serial.println(remainingTime); if (remainingTime <= 0) { ringingSetup(); + return; } } @@ -300,6 +304,7 @@ void ringingLoop() { if (handlePasscode()) { digitalWrite(NOISE_ENABLE_PIN, LOW); unarmedSetup(); + return; } // FIXME: SHouldn't be able to do this for non-testing purposes. @@ -308,6 +313,7 @@ void ringingLoop() { if (deviation < MAX_DEVIATION) { digitalWrite(NOISE_ENABLE_PIN, LOW); armedSetup(); + return; } } |