Rev 2041 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2041 | Rev 2048 | ||
---|---|---|---|
Line 83... | Line 83... | ||
83 | 83 | ||
84 | /************************************/ |
84 | /************************************/ |
85 | /* Clear LCD Buffer */ |
85 | /* Clear LCD Buffer */ |
86 | /************************************/ |
86 | /************************************/ |
87 | void LCD_clear(void) { |
87 | void LCD_clear(void) { |
88 | uint8_t i; |
88 | uint8_t i; |
89 | for (i = 0; i < DISPLAYBUFFSIZE; i++) |
89 | for (i = 0; i < DISPLAYBUFFSIZE; i++) |
90 | displayBuff[i] = ' '; |
90 | displayBuff[i] = ' '; |
Line 91... | Line 91... | ||
91 | } |
91 | } |
92 | 92 | ||
93 | /************************************/ |
93 | /************************************/ |
94 | /* Update Menu on LCD */ |
94 | /* Update Menu on LCD */ |
95 | /************************************/ |
95 | /************************************/ |
Line 252... | Line 278... | ||
252 | LCD_printfxy(12,3,"12"); |
278 | LCD_printfxy(12, 3, "12"); |
253 | break; |
279 | break; |
254 | 280 | ||
255 | #if (defined (USE_NAVICTRL)) |
281 | #if (defined (USE_NAVICTRL)) |
256 | case 14://GPS Lat/Lon coords |
282 | case 14: //GPS Lat/Lon coords |
257 | if (GPSInfo.status == INVALID) { |
283 | if (GPSInfo.status == INVALID) { |
258 | LCD_printfxy(0,0,"No GPS data!"); |
284 | LCD_printfxy(0,0,"No GPS data!"); |
259 | } else { |
285 | } else { |
260 | switch (GPSInfo.satfix) |
286 | switch (GPSInfo.satfix) |
261 | { |
287 | { |
262 | case SATFIX_NONE: |
288 | case SATFIX_NONE: |
263 | LCD_printfxy(0,0,"Sats: %d Fix: No", GPSInfo.satnum); |
289 | LCD_printfxy(0,0,"Sats: %d Fix: No", GPSInfo.satnum); |
264 | break; |
290 | break; |
265 | case SATFIX_2D: |
291 | case SATFIX_2D: |
266 | LCD_printfxy(0,0,"Sats: %d Fix: 2D", GPSInfo.satnum); |
292 | LCD_printfxy(0,0,"Sats: %d Fix: 2D", GPSInfo.satnum); |
267 | break; |
293 | break; |
268 | case SATFIX_3D: |
294 | case SATFIX_3D: |
269 | LCD_printfxy(0,0,"Sats: %d Fix: 3D", GPSInfo.satnum); |
295 | LCD_printfxy(0,0,"Sats: %d Fix: 3D", GPSInfo.satnum); |
270 | break; |
296 | break; |
271 | default: |
297 | default: |
272 | LCD_printfxy(0,0,"Sats: %d Fix: ??", GPSInfo.satnum); |
298 | LCD_printfxy(0,0,"Sats: %d Fix: ??", GPSInfo.satnum); |
273 | break; |
299 | break; |
274 | } |
300 | } |
275 | int16_t i1,i2,i3; |
301 | int16_t i1,i2,i3; |
276 | i1 = (int16_t)(GPSInfo.longitude/10000000L); |
302 | i1 = (int16_t)(GPSInfo.longitude/10000000L); |
277 | i2 = abs((int16_t)((GPSInfo.longitude%10000000L)/10000L)); |
303 | i2 = abs((int16_t)((GPSInfo.longitude%10000000L)/10000L)); |
278 | i3 = abs((int16_t)(((GPSInfo.longitude%10000000L)%10000L)/10L)); |
304 | i3 = abs((int16_t)(((GPSInfo.longitude%10000000L)%10000L)/10L)); |
279 | LCD_printfxy(0,1,"Lon: %d.%03d%03d deg",i1, i2, i3); |
305 | LCD_printfxy(0,1,"Lon: %d.%03d%03d deg",i1, i2, i3); |
280 | i1 = (int16_t)(GPSInfo.latitude/10000000L); |
306 | i1 = (int16_t)(GPSInfo.latitude/10000000L); |
281 | i2 = abs((int16_t)((GPSInfo.latitude%10000000L)/10000L)); |
307 | i2 = abs((int16_t)((GPSInfo.latitude%10000000L)/10000L)); |
282 | i3 = abs((int16_t)(((GPSInfo.latitude%10000000L)%10000L)/10L)); |
308 | i3 = abs((int16_t)(((GPSInfo.latitude%10000000L)%10000L)/10L)); |
283 | LCD_printfxy(0,2,"Lat: %d.%03d%03d deg",i1, i2, i3); |
309 | LCD_printfxy(0,2,"Lat: %d.%03d%03d deg",i1, i2, i3); |
284 | i1 = (int16_t)(GPSInfo.altitude/1000L); |
310 | i1 = (int16_t)(GPSInfo.altitude/1000L); |
285 | i2 = abs((int16_t)(GPSInfo.altitude%1000L)); |
311 | i2 = abs((int16_t)(GPSInfo.altitude%1000L)); |
286 | LCD_printfxy(0,3,"Alt: %d.%03d m",i1, i2); |
312 | LCD_printfxy(0,3,"Alt: %d.%03d m",i1, i2); |
Line 287... | Line 313... | ||
287 | } |
313 | } |
288 | break; |
314 | break; |
289 | #endif |
315 | #endif |
290 | 316 | ||
291 | default: |
317 | default: |
292 | maxMenuItem = menuItem - 1; |
318 | maxMenuItem = menuItem - 1; |
293 | menuItem = 0; |
319 | menuItem = 0; |