blackbox/main.c

changeset 49
3957ff8e86c6
parent 48
5bba01aad0a6
child 51
ec9e8cc27012
equal deleted inserted replaced
48:5bba01aad0a6 49:3957ff8e86c6
25 uint8_t byte[4]; // all four bytes 25 uint8_t byte[4]; // all four bytes
26 } u32; 26 } u32;
27 27
28 #define MAX_SLOTS 6 28 #define MAX_SLOTS 6
29 typedef struct { 29 typedef struct {
30 uint8_t speedlimit; // 4bits speedlimit 30 unsigned speedlimit:4; // 4bits speedlimit
31 uint8_t speedminimum; // 4bits speedminimum 31 unsigned speedminimum:4; // 4bits speedminimum
32 unsigned trackswitch:1; // 1bit bool
32 uint8_t fuel; 33 uint8_t fuel;
33 uint16_t jumpstart_time, laps; 34 uint16_t jumpstart_time, laps;
34 u32 lap_time_start, lap_time; 35 u32 lap_time_start, lap_time;
35 uint8_t trackswitch; // 1bit bool
36 } cardata; 36 } cardata;
37 37
38 static unsigned char s[8]; 38 static unsigned char s[8];
39 static uint8_t countdown, countdown_loops; 39 static uint8_t countdown, countdown_loops;
40 uint8_t mode = 0; 40 uint8_t mode = 0;

mercurial