strobe sync timing and code comments

This commit is contained in:
lexzach 2023-03-28 21:50:59 -04:00
parent 1444e35137
commit 5fdd3bf32a
Signed by: Lexzach
GPG Key ID: B574880929E6F1F0

View File

@ -140,7 +140,7 @@ byte cross[] = { //x mark
//PIN DEFINITIONS //PIN DEFINITIONS
int zone1Pin = 15; int zone1Pin = 15;
int zone2Pin = 15; //IF YOU WANT A SINGLE ZONE, SET THIS TO 15 AS WELL, ELSE 39. int zone2Pin = 39; //IF YOU WANT A SINGLE ZONE, SET THIS TO 15 AS WELL, ELSE 39.
int hornRelay = 13; int hornRelay = 13;
int buzzerPin = 4; int buzzerPin = 4;
int strobeRelay = 18; int strobeRelay = 18;
@ -731,11 +731,11 @@ void alarm(){
} else { } else {
strobeSyncTimer++; strobeSyncTimer++;
if (strobeSync == 1 or strobeSync == 4){ if (strobeSync == 1 or strobeSync == 4){
if (strobeSyncTimer >= 10000){ if (strobeSyncTimer >= 1000){
strobeSyncTimer=0; strobeSyncTimer=0;
} else if (strobeSyncTimer >= 9940){ } else if (strobeSyncTimer >= 975){
strobeOn(false); strobeOn(false);
} else if (strobeSyncTimer <= 60){ } else if (strobeSyncTimer <= 25){
strobeOn(true); strobeOn(true);
} }
} else if (strobeSync == 2) { } else if (strobeSync == 2) {
@ -871,7 +871,7 @@ void alarm(){
} }
} }
} else if (useTwoWire){ //-------------------------------- DO MORE TESTING WITH THIS!!!! } else if (useTwoWire){ //-------------------------------- DO MORE TESTING WITH THIS!!!!
if (horn and (not preAlarm or secondStage)){ if (horn and (not preAlarm or secondStage)){ //2 wire alarm
if (twoWireTimer >= 1000){ if (twoWireTimer >= 1000){
twoWireTimer = 0; twoWireTimer = 0;
} else if (twoWireTimer >= 975){ } else if (twoWireTimer >= 975){
@ -880,7 +880,7 @@ void alarm(){
hornOn(true); hornOn(true);
} }
twoWireTimer++; twoWireTimer++;
} else if (not horn and silenced and audibleSilence){ } else if (not horn and silenced and audibleSilence){ //2 wire silence
if (twoWireTimer >= 1000){ if (twoWireTimer >= 1000){
twoWireTimer = 0; twoWireTimer = 0;
} else if (twoWireTimer >= 965){ } else if (twoWireTimer >= 965){
@ -889,7 +889,7 @@ void alarm(){
hornOn(true); hornOn(true);
} }
twoWireTimer++; twoWireTimer++;
} else if (horn and preAlarm and not secondStage){ } else if (horn and preAlarm and not secondStage){ //2 wire pre-alarm
if (codeWheelTimer == 0){ if (codeWheelTimer == 0){
hornOn(true); hornOn(true);
} else if (codeWheelTimer == 75){ } else if (codeWheelTimer == 75){