From b27196d1cc51d4766374f042577df36d9443aebf Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Fri, 2 Oct 2015 18:05:30 +0200 Subject: [PATCH] No schnappering on Button Unlock Unlock button does only release the bolzen Signed-off-by: Ralf Ramsauer --- avr-code/main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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();