Rev 16 | Rev 23 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16 | Rev 22 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | SPI_NSS1_GPIO_Port, |
47 | SPI_NSS1_GPIO_Port, |
48 | SPI_NSS1_Pin); |
48 | SPI_NSS1_Pin); |
49 | 49 | ||
50 | displayDial_t dial (display1, 96, 32, 32, 180); |
50 | displayDial_t dial (display1, 96, 32, 32, 180); |
51 | 51 | ||
- | 52 | // debouncer for the button |
|
- | 53 | char buttonState; |
|
- | 54 | char buttonCount; |
|
- | 55 | ||
52 | extern "C" void |
56 | extern "C" void |
53 | cc_init () |
57 | cc_init () |
54 | { |
58 | { |
55 | display1.reset (); |
59 | display1.reset (); |
56 | 60 | ||
Line 72... | Line 76... | ||
72 | 76 | ||
73 | display1.clearDisplay (); |
77 | display1.clearDisplay (); |
74 | dial.draw_scale (0, 360, 8, 1, 45); |
78 | dial.draw_scale (0, 360, 8, 1, 45); |
75 | 79 | ||
76 | bool stat = updateLocation (&loc, &uc1); |
80 | bool stat = updateLocation (&loc, &uc1); |
77 | if (loc.good) |
81 | if (stat && loc.good) |
78 | { |
82 | { |
79 | heading = loc.heading; |
83 | heading = loc.heading; |
80 | 84 | ||
81 | loc.good = false; |
85 | loc.good = false; |
82 | } |
86 | } |
Line 115... | Line 119... | ||
115 | display1.gotoxy (0, 32); |
119 | display1.gotoxy (0, 32); |
116 | display1.printString (small_font, "Average", 7, WHITE); |
120 | display1.printString (small_font, "Average", 7, WHITE); |
117 | display1.gotoxy (0, 40); |
121 | display1.gotoxy (0, 40); |
118 | display1.fontDigits (large_font, 4, 1, speedAVG * 10); |
122 | display1.fontDigits (large_font, 4, 1, speedAVG * 10); |
119 | 123 | ||
- | 124 | ||
- | 125 | ||
- | 126 | ||
120 | struct bmp280_uncomp_data ucomp_data; |
127 | struct bmp280_uncomp_data ucomp_data; |
121 | 128 | ||
122 | if (HAL_GetTick () - lastTick > 100) |
129 | if (HAL_GetTick () - lastTick > 100) |
123 | { |
130 | { |
124 | lastTick = HAL_GetTick (); |
131 | lastTick = HAL_GetTick (); |