Subversion Repositories FlightCtrl

Rev

Rev 711 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 711 Rev 722
1
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
// + Copyright (c) 04.2007 Holger Buss
2
// + Copyright (c) 04.2007 Holger Buss
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
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7
 
7
 
8
 
8
 
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"
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
#include "mm3.h"
18
#include "mm3.h"
19
#include "ubx.h"
19
#include "ubx.h"
20
#include "_Settings.h"
20
#include "_Settings.h"
21
 
21
 
22
#define ARRAYSIZE 10
22
#define ARRAYSIZE 10
23
uint8_t Array[ARRAYSIZE] = {1,2,3,4,5,6,7,8,9,10};
23
uint8_t Array[ARRAYSIZE] = {1,2,3,4,5,6,7,8,9,10};
24
#define DISPLAYBUFFSIZE 80
24
#define DISPLAYBUFFSIZE 80
25
int8_t DisplayBuff[DISPLAYBUFFSIZE] = "Hello World";
25
int8_t DisplayBuff[DISPLAYBUFFSIZE] = "Hello World";
26
uint8_t DispPtr = 0;
26
uint8_t DispPtr = 0;
27
uint8_t RemoteButtons = 0;
27
uint8_t RemoteButtons = 0;
28
 
28
 
29
#define KEY1    0x01
29
#define KEY1    0x01
30
#define KEY2    0x02
30
#define KEY2    0x02
31
#define KEY3    0x04
31
#define KEY3    0x04
32
#define KEY4    0x08
32
#define KEY4    0x08
33
#define KEY5    0x10
33
#define KEY5    0x10
34
 
34
 
35
/************************************/
35
/************************************/
36
/*        Clear LCD Buffer          */
36
/*        Clear LCD Buffer          */
37
/************************************/
37
/************************************/
38
void LCD_Clear(void)
38
void LCD_Clear(void)
39
{
39
{
40
 uint8_t i;
40
 uint8_t i;
41
 for( i = 0; i < DISPLAYBUFFSIZE; i++) DisplayBuff[i] = ' ';
41
 for( i = 0; i < DISPLAYBUFFSIZE; i++) DisplayBuff[i] = ' ';
42
}
42
}
43
 
43
 
44
 
44
 
45
/************************************/
45
/************************************/
46
/*        Update Menu on LCD        */
46
/*        Update Menu on LCD        */
47
/************************************/
47
/************************************/
48
// Display with 20 characters in 4 lines
48
// Display with 20 characters in 4 lines
49
void LCD_PrintMenu(void)
49
void LCD_PrintMenu(void)
50
 {
50
 {
51
  static uint8_t MaxMenuItem = 14, MenuItem=0;
51
  static uint8_t MaxMenuItem = 16, MenuItem=0;
52
 
52
 
53
  //  if KEY1 is activated goto previous menu item
53
  //  if KEY1 is activated goto previous menu item
54
  if(RemoteButtons & KEY1)
54
  if(RemoteButtons & KEY1)
55
  {
55
  {
56
          if(MenuItem) MenuItem--;
56
          if(MenuItem) MenuItem--;
57
          else MenuItem = MaxMenuItem;
57
          else MenuItem = MaxMenuItem;
58
          LCD_Clear();
58
          LCD_Clear();
59
          RemotePollDisplayLine = -1;
59
          RemotePollDisplayLine = -1;
60
  }
60
  }
61
  // if KEY2 is activated goto next menu item
61
  // if KEY2 is activated goto next menu item
62
  if(RemoteButtons & KEY2)
62
  if(RemoteButtons & KEY2)
63
  {
63
  {
64
          if (MenuItem == MaxMenuItem) MenuItem = 0;
64
          if (MenuItem == MaxMenuItem) MenuItem = 0;
65
          else MenuItem++;
65
          else MenuItem++;
66
          LCD_Clear();
66
          LCD_Clear();
67
          RemotePollDisplayLine = -1;
67
          RemotePollDisplayLine = -1;
68
   }
68
   }
69
 
69
 
70
  // if KEY1 and KEY2 is activated goto initial menu item
70
  // if KEY1 and KEY2 is activated goto initial menu item
71
  if((RemoteButtons & KEY1) && (RemoteButtons & KEY2)) MenuItem = 0;
71
  if((RemoteButtons & KEY1) && (RemoteButtons & KEY2)) MenuItem = 0;
72
 
72
 
73
  // print menu item number in the upper right corner
73
  // print menu item number in the upper right corner
74
  if(MenuItem < 10)
74
  if(MenuItem < 10)
75
  {
75
  {
76
          LCD_printfxy(17,0,"[%i]",MenuItem);
76
          LCD_printfxy(17,0,"[%i]",MenuItem);
77
  }
77
  }
78
  else
78
  else
79
  {
79
  {
80
          LCD_printfxy(16,0,"[%i]",MenuItem);
80
          LCD_printfxy(16,0,"[%i]",MenuItem);
81
  }
81
  }
82
 
82
 
83
  switch(MenuItem)
83
  switch(MenuItem)
84
  {
84
  {
85
    case 0:// Version Info Menu Item
85
    case 0:// Version Info Menu Item
86
           LCD_printfxy(0,0,"+ MikroKopter +");
86
           LCD_printfxy(0,0,"+ MikroKopter +");
87
           LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c",BoardRelease/10,BoardRelease%10,VERSION_HAUPTVERSION, VERSION_NEBENVERSION,VERSION_INDEX+'a');
87
           LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c",BoardRelease/10,BoardRelease%10,VERSION_HAUPTVERSION, VERSION_NEBENVERSION,VERSION_INDEX+'a');
88
           LCD_printfxy(0,2,"Setting: %d ", GetActiveParamSet());
88
           LCD_printfxy(0,2,"Setting: %d ", GetActiveParamSet());
89
           LCD_printfxy(0,3,"(c) Holger Buss");
89
           LCD_printfxy(0,3,"(c) Holger Buss");
90
           break;
90
           break;
91
    case 1:// Hight Control Menu Item
91
    case 1:// Hight Control Menu Item
92
          if(ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL)
92
          if(ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL)
93
           {
93
           {
94
           LCD_printfxy(0,0,"Hight:      %5i",ReadingHight);
94
           LCD_printfxy(0,0,"Hight:      %5i",ReadingHight);
95
           LCD_printfxy(0,1,"Set Point:  %5i",SetPointHight);
95
           LCD_printfxy(0,1,"Set Point:  %5i",SetPointHight);
96
           LCD_printfxy(0,2,"Air Press.: %5i",ReadingAirPressure);
96
           LCD_printfxy(0,2,"Air Press.: %5i",ReadingAirPressure);
97
           LCD_printfxy(0,3,"Offset    : %5i",PressureSensorOffset);
97
           LCD_printfxy(0,3,"Offset    : %5i",PressureSensorOffset);
98
           }
98
           }
99
           else
99
           else
100
           {
100
           {
101
           LCD_printfxy(0,1,"No ");
101
           LCD_printfxy(0,1,"No ");
102
           LCD_printfxy(0,2,"Hight Control");
102
           LCD_printfxy(0,2,"Hight Control");
103
           }
103
           }
104
 
104
 
105
           break;
105
           break;
106
    case 2:// Attitude Menu Item
106
    case 2:// Attitude Menu Item
107
           LCD_printfxy(0,0,"Attitude");
107
           LCD_printfxy(0,0,"Attitude");
108
           LCD_printfxy(0,1,"Pitch:     %5i",IntegralPitch/1024);
108
           LCD_printfxy(0,1,"Pitch:     %5i",IntegralPitch/1024);
109
           LCD_printfxy(0,2,"Roll:      %5i",IntegralRoll/1024);
109
           LCD_printfxy(0,2,"Roll:      %5i",IntegralRoll/1024);
110
           LCD_printfxy(0,3,"Compass:   %5i",CompassHeading);
110
           LCD_printfxy(0,3,"Compass:   %5i",CompassHeading);
111
           break;
111
           break;
112
    case 3:// Remote Control Channel Menu Item
112
    case 3:// Remote Control Channel Menu Item
113
           LCD_printfxy(0,0,"C1:%4i  C2:%4i ",PPM_in[1],PPM_in[2]);
113
           LCD_printfxy(0,0,"C1:%4i  C2:%4i ",PPM_in[1],PPM_in[2]);
114
           LCD_printfxy(0,1,"C3:%4i  C4:%4i ",PPM_in[3],PPM_in[4]);
114
           LCD_printfxy(0,1,"C3:%4i  C4:%4i ",PPM_in[3],PPM_in[4]);
115
           LCD_printfxy(0,2,"C5:%4i  C6:%4i ",PPM_in[5],PPM_in[6]);
115
           LCD_printfxy(0,2,"C5:%4i  C6:%4i ",PPM_in[5],PPM_in[6]);
116
           LCD_printfxy(0,3,"C7:%4i  C8:%4i ",PPM_in[7],PPM_in[8]);
116
           LCD_printfxy(0,3,"C7:%4i  C8:%4i ",PPM_in[7],PPM_in[8]);
117
           break;
117
           break;
118
    case 4:// Remote Control Mapping Menu Item
118
    case 4:// Remote Control Mapping Menu Item
119
           LCD_printfxy(0,0,"Pi:%4i  Ro:%4i ",PPM_in[ParamSet.ChannelAssignment[CH_PITCH]],PPM_in[ParamSet.ChannelAssignment[CH_ROLL]]);
119
           LCD_printfxy(0,0,"Pi:%4i  Ro:%4i ",PPM_in[ParamSet.ChannelAssignment[CH_PITCH]],PPM_in[ParamSet.ChannelAssignment[CH_ROLL]]);
120
           LCD_printfxy(0,1,"Gs:%4i  Ya:%4i ",PPM_in[ParamSet.ChannelAssignment[CH_THRUST]],PPM_in[ParamSet.ChannelAssignment[CH_YAW]]);
120
           LCD_printfxy(0,1,"Gs:%4i  Ya:%4i ",PPM_in[ParamSet.ChannelAssignment[CH_THRUST]],PPM_in[ParamSet.ChannelAssignment[CH_YAW]]);
121
           LCD_printfxy(0,2,"P1:%4i  P2:%4i ",PPM_in[ParamSet.ChannelAssignment[CH_POTI1]],PPM_in[ParamSet.ChannelAssignment[CH_POTI2]]);
121
           LCD_printfxy(0,2,"P1:%4i  P2:%4i ",PPM_in[ParamSet.ChannelAssignment[CH_POTI1]],PPM_in[ParamSet.ChannelAssignment[CH_POTI2]]);
122
           LCD_printfxy(0,3,"P3:%4i  P4:%4i ",PPM_in[ParamSet.ChannelAssignment[CH_POTI3]],PPM_in[ParamSet.ChannelAssignment[CH_POTI4]]);
122
           LCD_printfxy(0,3,"P3:%4i  P4:%4i ",PPM_in[ParamSet.ChannelAssignment[CH_POTI3]],PPM_in[ParamSet.ChannelAssignment[CH_POTI4]]);
123
           break;
123
           break;
124
    case 5:// Gyro Sensor Menu Item
124
    case 5:// Gyro Sensor Menu Item
125
           LCD_printfxy(0,0,"Gyro - Sensor");
125
           LCD_printfxy(0,0,"Gyro - Sensor");
126
          if(BoardRelease == 10)
126
          if(BoardRelease == 10)
127
          {
127
          {
128
           LCD_printfxy(0,1,"Pitch %4i (%3i)",AdValueGyrPitch - AdNeutralPitch, AdNeutralPitch);
128
           LCD_printfxy(0,1,"Pitch %4i (%3i)",AdValueGyrPitch - AdNeutralPitch, AdNeutralPitch);
129
           LCD_printfxy(0,2,"Roll  %4i (%3i)",AdValueGyrRoll - AdNeutralRoll, AdNeutralRoll);
129
           LCD_printfxy(0,2,"Roll  %4i (%3i)",AdValueGyrRoll - AdNeutralRoll, AdNeutralRoll);
130
           LCD_printfxy(0,3,"Yaw   %4i (%3i)",Reading_GyroYaw, AdNeutralYaw);
130
           LCD_printfxy(0,3,"Yaw   %4i (%3i)",Reading_GyroYaw, AdNeutralYaw);
131
          }
131
          }
132
          else
132
          else
133
          {
133
          {
134
           LCD_printfxy(0,1,"Pitch %4i (%3i)",AdValueGyrPitch - AdNeutralPitch, AdNeutralPitch/2);
134
           LCD_printfxy(0,1,"Pitch %4i (%3i)",AdValueGyrPitch - AdNeutralPitch, AdNeutralPitch/2);
135
           LCD_printfxy(0,2,"Roll  %4i (%3i)",AdValueGyrRoll - AdNeutralRoll, AdNeutralRoll/2);
135
           LCD_printfxy(0,2,"Roll  %4i (%3i)",AdValueGyrRoll - AdNeutralRoll, AdNeutralRoll/2);
136
           LCD_printfxy(0,3,"Yaw   %4i (%3i)",Reading_GyroYaw, AdNeutralYaw/2);
136
           LCD_printfxy(0,3,"Yaw   %4i (%3i)",Reading_GyroYaw, AdNeutralYaw/2);
137
          }
137
          }
138
           break;
138
           break;
139
    case 6:// Acceleration Sensor Menu Item
139
    case 6:// Acceleration Sensor Menu Item
140
           LCD_printfxy(0,0,"ACC - Sensor");
140
           LCD_printfxy(0,0,"ACC - Sensor");
141
           LCD_printfxy(0,1,"Pitch %4i (%3i)",AdValueAccPitch, NeutralAccX);
141
           LCD_printfxy(0,1,"Pitch %4i (%3i)",AdValueAccPitch, NeutralAccX);
142
           LCD_printfxy(0,2,"Roll  %4i (%3i)",AdValueAccRoll, NeutralAccY);
142
           LCD_printfxy(0,2,"Roll  %4i (%3i)",AdValueAccRoll, NeutralAccY);
143
           LCD_printfxy(0,3,"Hight %4i (%3i)",Mean_AccTop, (int)NeutralAccZ);
143
           LCD_printfxy(0,3,"Hight %4i (%3i)",Mean_AccTop, (int)NeutralAccZ);
144
           break;
144
           break;
145
    case 7:// Accumulator Voltage / Remote Control Level
145
    case 7:// Accumulator Voltage / Remote Control Level
146
           LCD_printfxy(0,1,"Voltage:  %5i",UBat);
146
           LCD_printfxy(0,1,"Voltage:  %5i",UBat);
147
           LCD_printfxy(0,2,"RC-Level: %5i",SenderOkay);
147
           LCD_printfxy(0,2,"RC-Level: %5i",SenderOkay);
148
           break;
148
           break;
149
    case 8:// Compass Menu Item
149
    case 8:// Compass Menu Item
150
           LCD_printfxy(0,0,"Compass       ");
150
           LCD_printfxy(0,0,"Compass       ");
151
           LCD_printfxy(0,1,"Course:    %5i",CompassCourse);
151
           LCD_printfxy(0,1,"Course:    %5i",CompassCourse);
152
           LCD_printfxy(0,2,"Heading:   %5i",CompassHeading);
152
           LCD_printfxy(0,2,"Heading:   %5i",CompassHeading);
153
           LCD_printfxy(0,3,"OffCourse: %5i",CompassOffCourse);
153
           LCD_printfxy(0,3,"OffCourse: %5i",CompassOffCourse);
154
           break;
154
           break;
155
    case 9:// Poti Menu Item
155
    case 9:// Poti Menu Item
156
           LCD_printfxy(0,0,"Poti1:  %3i",Poti1);
156
           LCD_printfxy(0,0,"Poti1:  %3i",Poti1);
157
           LCD_printfxy(0,1,"Poti2:  %3i",Poti2);
157
           LCD_printfxy(0,1,"Poti2:  %3i",Poti2);
158
           LCD_printfxy(0,2,"Poti3:  %3i",Poti3);
158
           LCD_printfxy(0,2,"Poti3:  %3i",Poti3);
159
           LCD_printfxy(0,3,"Poti4:  %3i",Poti4);
159
           LCD_printfxy(0,3,"Poti4:  %3i",Poti4);
160
           break;
160
           break;
161
    case 10:// Servo Menu Item
161
    case 10:// Servo Menu Item
162
           LCD_printfxy(0,0,"Servo  " );
162
           LCD_printfxy(0,0,"Servo  " );
163
           LCD_printfxy(0,1,"Setpoint  %3i",FCParam.ServoPitchControl);
163
           LCD_printfxy(0,1,"Setpoint  %3i",FCParam.ServoPitchControl);
164
           LCD_printfxy(0,2,"Position: %3i",ServoValue);
164
           LCD_printfxy(0,2,"Position: %3i",ServoValue);
165
           LCD_printfxy(0,3,"Range:%3i-%3i",ParamSet.ServoPitchMin, ParamSet.ServoPitchMax);
165
           LCD_printfxy(0,3,"Range:%3i-%3i",ParamSet.ServoPitchMin, ParamSet.ServoPitchMax);
166
           break;
166
           break;
167
    case 11://Extern Control
167
    case 11://Extern Control
168
           LCD_printfxy(0,0,"ExternControl  " );
168
           LCD_printfxy(0,0,"ExternControl  " );
169
           LCD_printfxy(0,1,"Pi:%4i  Ro:%4i ",ExternControl.Pitch, ExternControl.Roll);
169
           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);
170
           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);
171
           LCD_printfxy(0,3,"Hi:%4i  Cf:%4i ",ExternControl.Hight, ExternControl.Config);
172
           break;
172
           break;
173
   case 12:// MM3 Kompass
173
   case 12:// MM3 Kompass
174
                        LCD_printfxy(0,0,"MM3 Offset");
174
                        LCD_printfxy(0,0,"MM3 Offset");
175
                        LCD_printfxy(0,1,"X_Offset:  %3i",MM3_calib.X_off);
175
                        LCD_printfxy(0,1,"X_Offset:  %3i",MM3_calib.X_off);
176
                        LCD_printfxy(0,2,"Y_Offset:  %3i",MM3_calib.Y_off);
176
                        LCD_printfxy(0,2,"Y_Offset:  %3i",MM3_calib.Y_off);
177
                        LCD_printfxy(0,3,"Z_Offset:  %3i",MM3_calib.Z_off);
177
                        LCD_printfxy(0,3,"Z_Offset:  %3i",MM3_calib.Z_off);
178
                        break;
178
                        break;
179
        case 13://MM3 Range
179
        case 13://MM3 Range
180
                        LCD_printfxy(0,0,"MM3 Range");
180
                        LCD_printfxy(0,0,"MM3 Range");
181
                        LCD_printfxy(0,1,"X_Range:  %4i",MM3_calib.X_range);
181
                        LCD_printfxy(0,1,"X_Range:  %4i",MM3_calib.X_range);
182
                        LCD_printfxy(0,2,"Y_Range:  %4i",MM3_calib.Y_range);
182
                        LCD_printfxy(0,2,"Y_Range:  %4i",MM3_calib.Y_range);
183
                        LCD_printfxy(0,3,"Z_Range:  %4i",MM3_calib.Z_range);
183
                        LCD_printfxy(0,3,"Z_Range:  %4i",MM3_calib.Z_range);
184
                        break;
184
                        break;
185
        case 14://GPS Status
185
        case 14://GPS Lat/Lon coords
186
                        LCD_printfxy(0,0,"GPS Status");
-
 
187
                        if (GPSInfo.status == INVALID)
186
                        if (GPSInfo.status == INVALID)
188
                        {
187
                        {
189
                                LCD_printfxy(0,1,"No data available!");
188
                                LCD_printfxy(0,0,"No data available!");
190
                        }
189
                        }
191
                        else
190
                        else
192
                        {
191
                        {
193
                                switch (GPSInfo.satfix)
192
                                switch (GPSInfo.satfix)
194
                                {
193
                                {
195
                                case SATFIX_NONE:
194
                                case SATFIX_NONE:
196
                                        LCD_printfxy(0,1,"Satfix:   None");
195
                                        LCD_printfxy(0,0,"Satfix:   None ");
197
                                        break;
196
                                        break;
198
                                case SATFIX_2D:
197
                                case SATFIX_2D:
199
                                        LCD_printfxy(0,1,"Satfix:   2D");
198
                                        LCD_printfxy(0,0,"Satfix:   2D   ");
200
                                        break;
199
                                        break;
201
                                case SATFIX_3D:
200
                                case SATFIX_3D:
202
                                        LCD_printfxy(0,1,"Satfix:   3D");
201
                                        LCD_printfxy(0,0,"Satfix:   3D   ");
203
                                        break;
202
                                        break;
204
                                default:
203
                                default:
205
                                        LCD_printfxy(0,1,"Satfix: Unknown");
204
                                        LCD_printfxy(0,0,"Satfix: Unknown");
206
                                        break;
205
                                        break;
207
                                }
206
                                }
-
 
207
                                LCD_printfxy(0,1,"Lon: %d.%d deg",GPSInfo.longitude/10000000L, (int16_t)(GPSInfo.longitude/100000L)%100);
-
 
208
                                LCD_printfxy(0,2,"Lat: %d.%d deg",GPSInfo.latitude/10000000L, GPSInfo.latitude%10000000L);
-
 
209
                                LCD_printfxy(0,3,"Alt: %d.%d m",GPSInfo.altitude/1000L,GPSInfo.altitude%1000L);
208
                        }
210
                        }
209
                        break;
211
                        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;
210
    default: MaxMenuItem = MenuItem - 1;
266
    default: MaxMenuItem = MenuItem - 1;
211
             MenuItem = 0;
267
             MenuItem = 0;
212
           break;
268
           break;
213
    }
269
    }
214
 RemoteButtons = 0;
270
 RemoteButtons = 0;
215
}
271
}
216
 
272