Subversion Repositories FlightCtrl

Rev

Rev 794 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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