Rev 746 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 746 | Rev 752 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | #include "analog.h" |
17 | #include "analog.h" |
18 | #include "mm3.h" |
18 | #include "mm3.h" |
19 | #include "ubx.h" |
19 | #include "ubx.h" |
20 | #include "_Settings.h" |
20 | #include "_Settings.h" |
Line -... | Line 21... | ||
- | 21 | ||
21 | 22 | ||
22 | #define ARRAYSIZE 10 |
23 | #define ARRAYSIZE 10 |
23 | uint8_t Array[ARRAYSIZE] = {1,2,3,4,5,6,7,8,9,10}; |
24 | uint8_t Array[ARRAYSIZE] = {1,2,3,4,5,6,7,8,9,10}; |
24 | #define DISPLAYBUFFSIZE 80 |
25 | #define DISPLAYBUFFSIZE 80 |
25 | int8_t DisplayBuff[DISPLAYBUFFSIZE] = "Hello World"; |
26 | int8_t DisplayBuff[DISPLAYBUFFSIZE] = "Hello World"; |
Line 46... | Line 47... | ||
46 | /* Update Menu on LCD */ |
47 | /* Update Menu on LCD */ |
47 | /************************************/ |
48 | /************************************/ |
48 | // Display with 20 characters in 4 lines |
49 | // Display with 20 characters in 4 lines |
49 | void LCD_PrintMenu(void) |
50 | void LCD_PrintMenu(void) |
50 | { |
51 | { |
51 | static uint8_t MaxMenuItem = 16, MenuItem=0; |
52 | static uint8_t MaxMenuItem = 14, MenuItem=0; |
Line 52... | Line 53... | ||
52 | 53 | ||
53 | // if KEY1 is activated goto previous menu item |
54 | // if KEY1 is activated goto previous menu item |
54 | if(RemoteButtons & KEY1) |
55 | if(RemoteButtons & KEY1) |
55 | { |
56 | { |
Line 168... | Line 169... | ||
168 | LCD_printfxy(0,0,"ExternControl " ); |
169 | LCD_printfxy(0,0,"ExternControl " ); |
169 | LCD_printfxy(0,1,"Pi:%4i Ro:%4i ",ExternControl.Pitch, ExternControl.Roll); |
170 | LCD_printfxy(0,1,"Pi:%4i Ro:%4i ",ExternControl.Pitch, ExternControl.Roll); |
170 | LCD_printfxy(0,2,"Gs:%4i Ya:%4i ",ExternControl.Thrust, ExternControl.Yaw); |
171 | LCD_printfxy(0,2,"Gs:%4i Ya:%4i ",ExternControl.Thrust, ExternControl.Yaw); |
171 | LCD_printfxy(0,3,"Hi:%4i Cf:%4i ",ExternControl.Hight, ExternControl.Config); |
172 | LCD_printfxy(0,3,"Hi:%4i Cf:%4i ",ExternControl.Hight, ExternControl.Config); |
172 | break; |
173 | break; |
173 | case 12:// MM3 Kompass |
174 | case 12:// MM3 Kompass |
174 | LCD_printfxy(0,0,"MM3 Offset"); |
175 | LCD_printfxy(0,0,"MM3 Offset"); |
175 | LCD_printfxy(0,1,"X_Offset: %3i",MM3_calib.X_off); |
176 | LCD_printfxy(0,1,"X_Offset: %3i",MM3_calib.X_off); |
176 | LCD_printfxy(0,2,"Y_Offset: %3i",MM3_calib.Y_off); |
177 | LCD_printfxy(0,2,"Y_Offset: %3i",MM3_calib.Y_off); |
177 | LCD_printfxy(0,3,"Z_Offset: %3i",MM3_calib.Z_off); |
178 | LCD_printfxy(0,3,"Z_Offset: %3i",MM3_calib.Z_off); |
178 | break; |
179 | break; |
Line 190... | Line 191... | ||
190 | else |
191 | else |
191 | { |
192 | { |
192 | switch (GPSInfo.satfix) |
193 | switch (GPSInfo.satfix) |
193 | { |
194 | { |
194 | case SATFIX_NONE: |
195 | case SATFIX_NONE: |
195 | LCD_printfxy(0,0,"Satfix: None "); |
196 | LCD_printfxy(0,0,"Sats: %d Fix: No", GPSInfo.satnum); |
196 | break; |
197 | break; |
197 | case SATFIX_2D: |
198 | case SATFIX_2D: |
198 | LCD_printfxy(0,0,"Satfix: 2D "); |
199 | LCD_printfxy(0,0,"Sats: %d Fix: 2D", GPSInfo.satnum); |
199 | break; |
200 | break; |
200 | case SATFIX_3D: |
201 | case SATFIX_3D: |
201 | LCD_printfxy(0,0,"Satfix: 3D "); |
202 | LCD_printfxy(0,0,"Sats: %d Fix: 3D", GPSInfo.satnum); |
202 | break; |
203 | break; |
203 | default: |
204 | default: |
204 | LCD_printfxy(0,0,"Satfix: Unknown"); |
205 | LCD_printfxy(0,0,"Sats: %d Fix: ??", GPSInfo.satnum); |
205 | break; |
206 | break; |
206 | } |
207 | } |
207 | LCD_printfxy(0,1,"Lon: %d.%d deg",GPSInfo.longitude/10000000L, (GPSInfo.longitude%10000000L)/10000L); |
208 | LCD_printfxy(0,1,"Lon: %d.%d deg",GPSInfo.longitude/10000000L, (GPSInfo.longitude%10000000L)/10000L); |
208 | LCD_printfxy(0,2,"Lat: %d.%d deg",GPSInfo.latitude/10000000L, (GPSInfo.latitude%10000000L)/10000L); |
209 | LCD_printfxy(0,2,"Lat: %d.%d deg",GPSInfo.latitude/10000000L, (GPSInfo.latitude%10000000L)/10000L); |
209 | LCD_printfxy(0,3,"Alt: %d.%d m",GPSInfo.altitude/1000L,GPSInfo.altitude%1000L); |
210 | LCD_printfxy(0,3,"Alt: %d.%d m",GPSInfo.altitude/1000L,GPSInfo.altitude%1000L); |
210 | } |
211 | } |
211 | break; |
212 | break; |
212 | case 15://GPS UTM coords |
- | |
213 | if (GPSInfo.status == INVALID) |
- | |
214 | { |
- | |
215 | LCD_printfxy(0,0,"No data available!"); |
- | |
216 | } |
- | |
217 | else |
- | |
218 | { |
- | |
219 | switch (GPSInfo.satfix) |
- | |
220 | { |
- | |
221 | case SATFIX_NONE: |
- | |
222 | LCD_printfxy(0,0,"No Satfix "); |
- | |
223 | break; |
- | |
224 | case SATFIX_2D: |
- | |
225 | LCD_printfxy(0,0,"Satfix: 2D "); |
- | |
226 | break; |
- | |
227 | case SATFIX_3D: |
- | |
228 | LCD_printfxy(0,0,"Satfix: 3D "); |
- | |
229 | break; |
- | |
230 | default: |
- | |
231 | LCD_printfxy(0,0,"Unknown Satfix "); |
- | |
232 | break; |
- | |
233 | } |
- | |
234 | LCD_printfxy(0,1,"N: %d",(int16_t)(GPSInfo.utmnorth/100L)); |
- | |
235 | LCD_printfxy(0,2,"E: %d",(int16_t)(GPSInfo.utmeast/100L)); |
- | |
236 | LCD_printfxy(0,3,"A: %d",(int16_t)(GPSInfo.utmalt/100L)); |
- | |
237 | } |
- | |
238 | break; |
- | |
239 | case 16://GPS UTM velocity |
- | |
240 | if (GPSInfo.status == INVALID) |
- | |
241 | { |
- | |
242 | LCD_printfxy(0,0,"No data available!"); |
- | |
243 | } |
- | |
244 | else |
- | |
245 | { |
- | |
246 | switch (GPSInfo.satfix) |
- | |
247 | { |
- | |
248 | case SATFIX_NONE: |
- | |
249 | LCD_printfxy(0,0,"No Satfix "); |
- | |
250 | break; |
- | |
251 | case SATFIX_2D: |
- | |
252 | LCD_printfxy(0,0,"Satfix: 2D "); |
- | |
253 | break; |
- | |
254 | case SATFIX_3D: |
- | |
255 | LCD_printfxy(0,0,"Satfix: 3D "); |
- | |
256 | break; |
- | |
257 | default: |
- | |
258 | LCD_printfxy(0,0,"Unknown Satfix "); |
- | |
259 | break; |
- | |
260 | } |
- | |
261 | LCD_printfxy(0,1,"VN: %d",GPSInfo.velnorth); |
- | |
262 | LCD_printfxy(0,2,"VE: %d",GPSInfo.veleast); |
- | |
263 | LCD_printfxy(0,3,"VA: %d",GPSInfo.veltop); |
- | |
264 | } |
- | |
265 | break; |
- | |
266 | default: MaxMenuItem = MenuItem - 1; |
213 | default: MaxMenuItem = MenuItem - 1; |
267 | MenuItem = 0; |
214 | MenuItem = 0; |
268 | break; |
215 | break; |
269 | } |
216 | } |
270 | RemoteButtons = 0; |
217 | RemoteButtons = 0; |