Abstract LEDs

This commit is contained in:
Tanner Collin 2018-11-07 19:11:41 -07:00
parent 5c2938ad4f
commit a12a24661b

View File

@ -124,8 +124,8 @@ void processLockState()
{
switch (lockState) {
case LOCK_OFF:
digitalWrite(GREEN_LED_PIN, LED_OFF);
digitalWrite(RED_LED_PIN, LED_ON);
greenLEDOff();
redLEDOn();
digitalWrite(RELAY_PIN, RELAY_OPEN);
break;
@ -138,8 +138,8 @@ void processLockState()
}
break;
case LOCK_ARMED:
digitalWrite(GREEN_LED_PIN, LED_OFF);
digitalWrite(RED_LED_PIN, LED_ON);
greenLEDOff();
redLEDOn();
digitalWrite(RELAY_PIN, RELAY_OPEN);
@ -161,8 +161,8 @@ void processLockState()
}
break;
case LOCK_ON:
digitalWrite(GREEN_LED_PIN, LED_ON);
digitalWrite(RED_LED_PIN, LED_OFF);
greenLEDOn();
redLEDOff();
digitalWrite(RELAY_PIN, RELAY_CLOSED);