shortened some code and improved instructions
This commit is contained in:
parent
515f30ca5e
commit
443bd55a8b
Binary file not shown.
Binary file not shown.
@ -449,50 +449,13 @@ void noTone() {
|
|||||||
ledcWriteTone(0, 0); // stop tone
|
ledcWriteTone(0, 0); // stop tone
|
||||||
}
|
}
|
||||||
void hornOn(bool on){
|
void hornOn(bool on){
|
||||||
if (on){
|
digitalWrite(hornRelay, (invertRelay ^ on) ? LOW : HIGH);
|
||||||
if (invertRelay){
|
|
||||||
digitalWrite(hornRelay, HIGH); //turn on horn relay
|
|
||||||
} else {
|
|
||||||
digitalWrite(hornRelay, LOW); //turn on horn relay
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (invertRelay){
|
|
||||||
digitalWrite(hornRelay, LOW); //turn on horn relay
|
|
||||||
} else {
|
|
||||||
digitalWrite(hornRelay, HIGH); //turn on horn relay
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
void strobeOn(bool on){
|
void strobeOn(bool on){
|
||||||
if (on){
|
digitalWrite(strobeRelay, (invertRelay ^ on) ? LOW : HIGH);
|
||||||
if (invertRelay){
|
|
||||||
digitalWrite(strobeRelay, HIGH); //turn on strobe relay without strobe sync
|
|
||||||
} else {
|
|
||||||
digitalWrite(strobeRelay, LOW); //turn on strobe relay without strobe sync
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (invertRelay){
|
|
||||||
digitalWrite(strobeRelay, LOW); //turn on strobe relay without strobe sync
|
|
||||||
} else {
|
|
||||||
digitalWrite(strobeRelay, HIGH); //turn on strobe relay without strobe sync
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void smokeDetectorOn(bool on){
|
void smokeDetectorOn(bool on){
|
||||||
if (on){
|
digitalWrite(smokeDetectorRelay, (invertRelay ^ on) ? LOW : HIGH);
|
||||||
if (invertRelay){
|
|
||||||
digitalWrite(smokeDetectorRelay, HIGH); //turn on smoke relay
|
|
||||||
} else {
|
|
||||||
digitalWrite(smokeDetectorRelay, LOW); //turn on smoke relay
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (invertRelay){
|
|
||||||
digitalWrite(smokeDetectorRelay, LOW); //turn on smoke relay
|
|
||||||
} else {
|
|
||||||
digitalWrite(smokeDetectorRelay, HIGH); //turn on smoke relay
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------------------- functions for turning certain things on and off
|
//---------------------------------------------------------------------------------------- functions for turning certain things on and off
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user