# HG changeset patch # User mbayer # Date 1388141782 -3600 # Node ID 46822de910ff41eb1938a52ab8a3015407be8f70 # Parent 80d869ac365b107be1d67bacb6215308988b1118 addedd car activity packet to receiver in car firmware diff -r 80d869ac365b -r 46822de910ff car004f/main.c --- a/car004f/main.c Fri Dec 27 11:43:40 2013 +0100 +++ b/car004f/main.c Fri Dec 27 11:56:22 2013 +0100 @@ -34,7 +34,7 @@ volatile uint16_t bitbuf = 0; volatile uint8_t car_speed[MAX_SLOTS]; volatile uint8_t car_switch[MAX_SLOTS]; -volatile uint8_t car_act[MAX_SLOTS]; +volatile uint8_t car_act; volatile uint8_t car_timeout[MAX_SLOTS]; volatile uint8_t timeout = 0; @@ -94,6 +94,14 @@ */ } + if (data_len == 8) { // activity data packet + car_act = (bitbuf >> 1) & 0b00111111; + for (clock = 0; clock> clock) & 1) == 0) car_speed[MAX_SLOTS-1-clock] = 0; + } + } + + GICR |= _BV(INT0) ; // Enable INT0 } else {