Rev 274 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 274 | Rev 319 | ||
---|---|---|---|
Line 43... | Line 43... | ||
43 | /* Update Menu on LCD */ |
43 | /* Update Menu on LCD */ |
44 | /************************************/ |
44 | /************************************/ |
45 | // Display with 20 characters in 4 lines |
45 | // Display with 20 characters in 4 lines |
46 | void LCD_PrintMenu(void) |
46 | void LCD_PrintMenu(void) |
47 | { |
47 | { |
48 | int32_t i1,i2; |
48 | int16_t i1,i2,i3; |
49 | uint8_t sign; |
49 | uint8_t sign; |
Line 50... | Line 50... | ||
50 | 50 | ||
51 | if(RemoteKeys & KEY1) |
51 | if(RemoteKeys & KEY1) |
52 | { |
52 | { |
Line 111... | Line 111... | ||
111 | LCD_printfxy(0,0,"Sats:%02d Fix:?? ", GPSData.NumOfSats); |
111 | LCD_printfxy(0,0,"Sats:%02d Fix:?? ", GPSData.NumOfSats); |
112 | break; |
112 | break; |
113 | } |
113 | } |
114 | if(GPSData.Position.Longitude < 0) sign = '-'; |
114 | if(GPSData.Position.Longitude < 0) sign = '-'; |
115 | else sign = '+'; |
115 | else sign = '+'; |
116 | i1 = abs(GPSData.Position.Longitude)/10000000L; |
116 | i1 = (int16_t)(GPSData.Position.Longitude/10000000L); |
117 | i2 = abs(GPSData.Position.Longitude)%10000000L; |
117 | i2 = abs((int16_t)((GPSData.Position.Longitude%10000000L)/10000L)); |
- | 118 | i3 = abs((int16_t)(((GPSData.Position.Longitude%10000000L)%10000L)/10L)); |
|
118 | LCD_printfxy(0,1,"Lon:%c%03ld.%07ld deg",sign, i1, i2); |
119 | LCD_printfxy(0,1,"Lon: %c%d.%.3d%.3d deg",sign, i1, i2, i3); |
119 | if(GPSData.Position.Latitude < 0) sign = '-'; |
120 | if(GPSData.Position.Latitude < 0) sign = '-'; |
120 | else sign = '+'; |
121 | else sign = '+'; |
121 | i1 = abs(GPSData.Position.Latitude)/10000000L; |
122 | i1 = (int16_t)(GPSData.Position.Latitude/10000000L); |
122 | i2 = abs(GPSData.Position.Latitude)%10000000L; |
123 | i2 = abs((int16_t)((GPSData.Position.Latitude%10000000L)/10000L)); |
- | 124 | i3 = abs((int16_t)(((GPSData.Position.Latitude%10000000L)%10000L)/10L)); |
|
123 | LCD_printfxy(0,2,"Lat:%c%03ld.%07ld deg",sign, i1, i2); |
125 | LCD_printfxy(0,2,"Lat: %c%d.%.3d%.3d deg",sign, i1, i2, i3); |
124 | if(GPSData.Position.Altitude < 0) sign = '-'; |
126 | if(GPSData.Position.Altitude < 0) sign = '-'; |
125 | else sign = '+'; |
127 | else sign = '+'; |
126 | i1 = abs(GPSData.Position.Altitude)/1000L; |
128 | i1 = (int16_t)(GPSData.Position.Altitude/1000L); |
127 | i2 = abs(GPSData.Position.Altitude)%1000L; |
129 | i2 = abs((int16_t)(GPSData.Position.Altitude%1000L)); |
128 | LCD_printfxy(0,3,"Alt:%c%04ld.%03ld m", sign, i1, i2); |
130 | LCD_printfxy(0,3,"Alt: %c%04d.%.03d m",sign, i1, i2); |
129 | } |
131 | } |
130 | break; |
132 | break; |
131 | case 2: |
133 | case 2: |
132 | if (GPSData.Status == INVALID) |
134 | if (GPSData.Status == INVALID) |
133 | { |
135 | { |
Line 151... | Line 153... | ||
151 | break; |
153 | break; |
152 | default: |
154 | default: |
153 | LCD_printfxy(0,0,"Sats:%02d Fix:?? ", GPSData.NumOfSats); |
155 | LCD_printfxy(0,0,"Sats:%02d Fix:?? ", GPSData.NumOfSats); |
154 | break; |
156 | break; |
155 | } |
157 | } |
156 | LCD_printfxy(0,1,"Speed N: %+4ld cm/s",GPSData.Speed_North); |
158 | LCD_printfxy(0,1,"Speed N: %+4d cm/s",(int16_t)GPSData.Speed_North); |
157 | LCD_printfxy(0,2,"Speed E: %+4ld cm/s",GPSData.Speed_East); |
159 | LCD_printfxy(0,2,"Speed E: %+4d cm/s",(int16_t)GPSData.Speed_East); |
158 | LCD_printfxy(0,3,"Speed T: %+4ld cm/s",GPSData.Speed_Top); |
160 | LCD_printfxy(0,3,"Speed T: %+4d cm/s",(int16_t)GPSData.Speed_Top); |
159 | } |
161 | } |
160 | break; |
162 | break; |
161 | case 3: |
163 | case 3: |
162 | LCD_printfxy(0,0,"GPS UTC Time"); |
164 | LCD_printfxy(0,0,"GPS UTC Time"); |
163 | if (!SystemTime.Valid) |
165 | if (!SystemTime.Valid) |