diff --git a/avr-code/main.c b/avr-code/main.c index 5ec1c0f..8764afd 100644 --- a/avr-code/main.c +++ b/avr-code/main.c @@ -111,12 +111,10 @@ ISR(INT1_vect) uart_putc(DOOR_BUTTON_UNLOCK); - bolzen_off(); - schnapper_on(); - - _delay_ms(3000); - - schnapper_off(); + if (state == LOCKED) { + bolzen_off(); + _delay_ms(3000); + } out: sei();