File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1334,13 +1334,18 @@ void NeoPixelBreathe() {
1334
1334
1335
1335
1336
1336
// Sound the Buzzer & Blink the LED
1337
- void EarthquakeAlarm () {
1337
+ void EarthquakeAlarm ( int AlarmLEDColor ) {
1338
1338
Serial.println (" Earthquake Alarm!" );
1339
+ strip.setBrightness (255 ); // The breathe intensity might have the brightness low
1339
1340
for ( int i=0 ;i<10 ;i++) {
1340
- delay (500 );
1341
- NeoPixelStatus ( LED_ERROR ); // Alarm - blink red
1342
- AlarmBuzzer ();
1341
+ if ( !bStopEarthquakeAlarm ) {
1342
+ delay (500 );
1343
+ NeoPixelStatus ( AlarmLEDColor ); // Alarm - blink red or orange
1344
+ AlarmBuzzer ();
1345
+ }
1346
+ mqtt.loop (); // Process any incoming MQTT topics (which might stop the alarm)
1343
1347
}
1348
+ strip.setBrightness ( breatheintensity ); // reset the brightness to the prior intensity
1344
1349
digitalWrite (io, LOW); // turn off buzzer
1345
1350
}
1346
1351
You can’t perform that action at this time.
0 commit comments