Rev 752 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 752 | Rev 754 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | #include "fc.h" |
13 | #include "fc.h" |
14 | #include "rc.h" |
14 | #include "rc.h" |
15 | #include "uart.h" |
15 | #include "uart.h" |
16 | #include "printf_P.h" |
16 | #include "printf_P.h" |
17 | #include "analog.h" |
17 | #include "analog.h" |
- | 18 | #ifdef USE_MM3 |
|
18 | #include "mm3.h" |
19 | #include "mm3.h" |
- | 20 | #endif |
|
19 | #include "ubx.h" |
21 | #include "ubx.h" |
20 | #include "_Settings.h" |
22 | #include "_Settings.h" |
Line 21... | Line 23... | ||
21 | 23 | ||
Line 47... | Line 49... | ||
47 | /* Update Menu on LCD */ |
49 | /* Update Menu on LCD */ |
48 | /************************************/ |
50 | /************************************/ |
49 | // Display with 20 characters in 4 lines |
51 | // Display with 20 characters in 4 lines |
50 | void LCD_PrintMenu(void) |
52 | void LCD_PrintMenu(void) |
51 | { |
53 | { |
- | 54 | #ifdef USE_MM3 |
|
52 | static uint8_t MaxMenuItem = 14, MenuItem=0; |
55 | static uint8_t MaxMenuItem = 14; |
- | 56 | #else |
|
- | 57 | static uint8_t MaxMenuItem = 12; |
|
- | 58 | #endif |
|
Line -... | Line 59... | ||
- | 59 | ||
53 | 60 | static uint8_t MenuItem=0; |
|
54 | // if KEY1 is activated goto previous menu item |
61 | // if KEY1 is activated goto previous menu item |
55 | if(RemoteButtons & KEY1) |
62 | if(RemoteButtons & KEY1) |
56 | { |
63 | { |
57 | if(MenuItem) MenuItem--; |
64 | if(MenuItem) MenuItem--; |
Line 169... | Line 176... | ||
169 | LCD_printfxy(0,0,"ExternControl " ); |
176 | LCD_printfxy(0,0,"ExternControl " ); |
170 | LCD_printfxy(0,1,"Pi:%4i Ro:%4i ",ExternControl.Pitch, ExternControl.Roll); |
177 | LCD_printfxy(0,1,"Pi:%4i Ro:%4i ",ExternControl.Pitch, ExternControl.Roll); |
171 | LCD_printfxy(0,2,"Gs:%4i Ya:%4i ",ExternControl.Thrust, ExternControl.Yaw); |
178 | LCD_printfxy(0,2,"Gs:%4i Ya:%4i ",ExternControl.Thrust, ExternControl.Yaw); |
172 | LCD_printfxy(0,3,"Hi:%4i Cf:%4i ",ExternControl.Hight, ExternControl.Config); |
179 | LCD_printfxy(0,3,"Hi:%4i Cf:%4i ",ExternControl.Hight, ExternControl.Config); |
173 | break; |
180 | break; |
174 | case 12:// MM3 Kompass |
- | |
175 | LCD_printfxy(0,0,"MM3 Offset"); |
- | |
176 | LCD_printfxy(0,1,"X_Offset: %3i",MM3_calib.X_off); |
- | |
177 | LCD_printfxy(0,2,"Y_Offset: %3i",MM3_calib.Y_off); |
- | |
178 | LCD_printfxy(0,3,"Z_Offset: %3i",MM3_calib.Z_off); |
- | |
179 | break; |
- | |
180 | case 13://MM3 Range |
- | |
181 | LCD_printfxy(0,0,"MM3 Range"); |
- | |
182 | LCD_printfxy(0,1,"X_Range: %4i",MM3_calib.X_range); |
- | |
183 | LCD_printfxy(0,2,"Y_Range: %4i",MM3_calib.Y_range); |
- | |
184 | LCD_printfxy(0,3,"Z_Range: %4i",MM3_calib.Z_range); |
- | |
185 | break; |
- | |
186 | case 14://GPS Lat/Lon coords |
181 | case 12://GPS Lat/Lon coords |
187 | if (GPSInfo.status == INVALID) |
182 | if (GPSInfo.status == INVALID) |
188 | { |
183 | { |
189 | LCD_printfxy(0,0,"No data available!"); |
184 | LCD_printfxy(0,0,"No data available!"); |
190 | } |
185 | } |
191 | else |
186 | else |
Line 208... | Line 203... | ||
208 | LCD_printfxy(0,1,"Lon: %d.%d deg",GPSInfo.longitude/10000000L, (GPSInfo.longitude%10000000L)/10000L); |
203 | LCD_printfxy(0,1,"Lon: %d.%d deg",GPSInfo.longitude/10000000L, (GPSInfo.longitude%10000000L)/10000L); |
209 | LCD_printfxy(0,2,"Lat: %d.%d deg",GPSInfo.latitude/10000000L, (GPSInfo.latitude%10000000L)/10000L); |
204 | LCD_printfxy(0,2,"Lat: %d.%d deg",GPSInfo.latitude/10000000L, (GPSInfo.latitude%10000000L)/10000L); |
210 | LCD_printfxy(0,3,"Alt: %d.%d m",GPSInfo.altitude/1000L,GPSInfo.altitude%1000L); |
205 | LCD_printfxy(0,3,"Alt: %d.%d m",GPSInfo.altitude/1000L,GPSInfo.altitude%1000L); |
211 | } |
206 | } |
212 | break; |
207 | break; |
- | 208 | #ifdef USE_MM3 |
|
- | 209 | case 13:// MM3 Kompass |
|
- | 210 | LCD_printfxy(0,0,"MM3 Offset"); |
|
- | 211 | LCD_printfxy(0,1,"X_Offset: %3i",MM3_calib.X_off); |
|
- | 212 | LCD_printfxy(0,2,"Y_Offset: %3i",MM3_calib.Y_off); |
|
- | 213 | LCD_printfxy(0,3,"Z_Offset: %3i",MM3_calib.Z_off); |
|
- | 214 | break; |
|
- | 215 | case 14://MM3 Range |
|
- | 216 | LCD_printfxy(0,0,"MM3 Range"); |
|
- | 217 | LCD_printfxy(0,1,"X_Range: %4i",MM3_calib.X_range); |
|
- | 218 | LCD_printfxy(0,2,"Y_Range: %4i",MM3_calib.Y_range); |
|
- | 219 | LCD_printfxy(0,3,"Z_Range: %4i",MM3_calib.Z_range); |
|
- | 220 | break; |
|
- | 221 | #endif |
|
213 | default: MaxMenuItem = MenuItem - 1; |
222 | default: MaxMenuItem = MenuItem - 1; |
214 | MenuItem = 0; |
223 | MenuItem = 0; |
215 | break; |
224 | break; |
216 | } |
225 | } |
217 | RemoteButtons = 0; |
226 | RemoteButtons = 0; |