Rev 768 | Rev 800 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 768 | Rev 794 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | // + only for non-profit use |
3 | // + only for non-profit use |
4 | // + www.MikroKopter.com |
4 | // + www.MikroKopter.com |
5 | // + see the File "License.txt" for further Informations |
5 | // + see the File "License.txt" for further Informations |
6 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
6 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
Line 7... | Line -... | ||
7 | - | ||
- | 7 | ||
8 | 8 | #include <stdlib.h> |
|
9 | #include <inttypes.h> |
9 | #include <inttypes.h> |
10 | #include "main.h" |
10 | #include "main.h" |
11 | #include "eeprom.h" |
11 | #include "eeprom.h" |
12 | #include "timer2.h" |
12 | #include "timer2.h" |
Line 54... | Line 54... | ||
54 | #ifdef USE_MM3 |
54 | #ifdef USE_MM3 |
55 | static uint8_t MaxMenuItem = 14; |
55 | static uint8_t MaxMenuItem = 14; |
56 | #else |
56 | #else |
57 | static uint8_t MaxMenuItem = 12; |
57 | static uint8_t MaxMenuItem = 12; |
58 | #endif |
58 | #endif |
59 | - | ||
60 | static uint8_t MenuItem=0; |
59 | static uint8_t MenuItem=0; |
- | 60 | ||
61 | // if KEY1 is activated goto previous menu item |
61 | // if KEY1 is activated goto previous menu item |
62 | if(RemoteButtons & KEY1) |
62 | if(RemoteButtons & KEY1) |
63 | { |
63 | { |
64 | if(MenuItem) MenuItem--; |
64 | if(MenuItem) MenuItem--; |
65 | else MenuItem = MaxMenuItem; |
65 | else MenuItem = MaxMenuItem; |
Line 198... | Line 198... | ||
198 | break; |
198 | break; |
199 | default: |
199 | default: |
200 | LCD_printfxy(0,0,"Sats: %d Fix: ??", GPSInfo.satnum); |
200 | LCD_printfxy(0,0,"Sats: %d Fix: ??", GPSInfo.satnum); |
201 | break; |
201 | break; |
202 | } |
202 | } |
- | 203 | int16_t i1,i2,i3; |
|
- | 204 | i1 = (int16_t)(GPSInfo.longitude/10000000L); |
|
- | 205 | i2 = abs((int16_t)((GPSInfo.longitude%10000000L)/10000L)); |
|
203 | LCD_printfxy(0,1,"Lon: %d.%d deg",GPSInfo.longitude/10000000L, (GPSInfo.longitude%10000000L)/10000L); |
206 | i3 = abs((int16_t)(((GPSInfo.longitude%10000000L)%10000L)/10L)); |
- | 207 | LCD_printfxy(0,1,"Lon: %d.%.3d%.3d deg",i1, i2, i3); |
|
- | 208 | i1 = (int16_t)(GPSInfo.latitude/10000000L); |
|
204 | LCD_printfxy(0,2,"Lat: %d.%d deg",GPSInfo.latitude/10000000L, (GPSInfo.latitude%10000000L)/10000L); |
209 | i2 = abs((int16_t)((GPSInfo.latitude%10000000L)/10000L)); |
- | 210 | i3 = abs((int16_t)(((GPSInfo.latitude%10000000L)%10000L)/10L)); |
|
- | 211 | LCD_printfxy(0,2,"Lat: %d.%.3d%.3d deg",i1, i2, i3); |
|
- | 212 | i1 = (int16_t)(GPSInfo.altitude/1000L); |
|
- | 213 | i2 = abs((int16_t)(GPSInfo.altitude%1000L)); |
|
205 | LCD_printfxy(0,3,"Alt: %d.%d m",GPSInfo.altitude/1000L,GPSInfo.altitude%1000L); |
214 | LCD_printfxy(0,3,"Alt: %d.%.3d m",i1, i2); |
206 | } |
215 | } |
207 | break; |
216 | break; |
208 | #ifdef USE_MM3 |
217 | #ifdef USE_MM3 |
209 | case 13:// MM3 Kompass |
218 | case 13:// MM3 Kompass |
210 | LCD_printfxy(0,0,"MM3 Offset"); |
219 | LCD_printfxy(0,0,"MM3 Offset"); |