Rev 275 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 275 | Rev 276 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | #include "led.h" |
62 | #include "led.h" |
63 | #include "menu.h" |
63 | #include "menu.h" |
64 | #include "printf_P.h" |
64 | #include "printf_P.h" |
65 | #include "analog.h" |
65 | #include "analog.h" |
66 | #include "ubx.h" |
66 | #include "ubx.h" |
- | 67 | #include "button.h" |
|
Line 67... | Line 68... | ||
67 | 68 | ||
68 | #ifdef USE_FOLLOWME |
69 | #ifdef USE_FOLLOWME |
69 | int16_t UBat = 120; |
70 | int16_t UBat = 120; |
Line 91... | Line 92... | ||
91 | TIMER0_Init(); |
92 | TIMER0_Init(); |
92 | USART0_Init(); |
93 | USART0_Init(); |
93 | UBX_Init(); |
94 | UBX_Init(); |
94 | USART1_Init(); |
95 | USART1_Init(); |
95 | ADC_Init(); |
96 | ADC_Init(); |
- | 97 | Button_Init(); |
|
96 | // enable interrupts global |
98 | // enable interrupts global |
97 | sei(); |
99 | sei(); |
98 | LEDRED_OFF; |
100 | LEDRED_OFF; |
99 | #ifdef USE_FOLLOWME |
101 | #ifdef USE_FOLLOWME |
100 | LEDGRN_ON; |
102 | LEDGRN_ON; |
Line 131... | Line 133... | ||
131 | LCD_Clear(); |
133 | LCD_Clear(); |
Line 132... | Line 134... | ||
132 | 134 | ||
133 | GPS_Timer = SetDelay(1000); |
135 | GPS_Timer = SetDelay(1000); |
134 | while (1) |
136 | while (1) |
- | 137 | { |
|
- | 138 | // check for button action |
|
- | 139 | if(GetButton()) BeepTime = 200; |
|
135 | { |
140 | |
136 | // restart ADConversion if ready |
141 | // restart ADConversion if ready |
137 | if(ADReady) |
142 | if(ADReady) |
138 | { |
143 | { |
139 | DebugOut.Analog[0] = Adc0; |
144 | DebugOut.Analog[0] = Adc0; |