From 3b2544d8920ac4dab54e299e0438acb3557f6149 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Sat, 6 Oct 2018 01:50:30 +0200 Subject: [PATCH] avr: reverse bolzen logic And set initial state Signed-off-by: Ralf Ramsauer --- avr-code/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/avr-code/main.c b/avr-code/main.c index 0ed9de1..663bfb8 100644 --- a/avr-code/main.c +++ b/avr-code/main.c @@ -105,17 +105,17 @@ static void update_state(unsigned char new_state, enum state_source source) switch (state) { case RED: - set_bolzen(false); + set_bolzen(true); set_schnapper(false); ret = 'r'; break; case YELLOW: - set_bolzen(true); + set_bolzen(false); set_schnapper(false); ret = 'y'; break; case GREEN: - set_bolzen(true); + set_bolzen(false); set_schnapper(true); ret = 'g'; break; @@ -206,6 +206,7 @@ int main(void) timer_init(); uart_init(); + set_bolzen(true); reset_timeout(); sei();