mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
avr: reverse bolzen logic
And set initial state Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
8623d3a78a
commit
3b2544d892
@ -105,17 +105,17 @@ static void update_state(unsigned char new_state, enum state_source source)
|
|||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case RED:
|
case RED:
|
||||||
set_bolzen(false);
|
set_bolzen(true);
|
||||||
set_schnapper(false);
|
set_schnapper(false);
|
||||||
ret = 'r';
|
ret = 'r';
|
||||||
break;
|
break;
|
||||||
case YELLOW:
|
case YELLOW:
|
||||||
set_bolzen(true);
|
set_bolzen(false);
|
||||||
set_schnapper(false);
|
set_schnapper(false);
|
||||||
ret = 'y';
|
ret = 'y';
|
||||||
break;
|
break;
|
||||||
case GREEN:
|
case GREEN:
|
||||||
set_bolzen(true);
|
set_bolzen(false);
|
||||||
set_schnapper(true);
|
set_schnapper(true);
|
||||||
ret = 'g';
|
ret = 'g';
|
||||||
break;
|
break;
|
||||||
@ -206,6 +206,7 @@ int main(void)
|
|||||||
timer_init();
|
timer_init();
|
||||||
uart_init();
|
uart_init();
|
||||||
|
|
||||||
|
set_bolzen(true);
|
||||||
reset_timeout();
|
reset_timeout();
|
||||||
|
|
||||||
sei();
|
sei();
|
||||||
|
Loading…
Reference in New Issue
Block a user