Subversion Repositories FlightCtrl

Rev

Rev 903 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 903 Rev 909
Line 15... Line 15...
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_KILLAGREG
18
#ifdef USE_KILLAGREG
19
#include "mm3.h"
19
#include "mm3.h"
-
 
20
#endif
-
 
21
#if defined (USE_KILLAGREG) || defined (USE_MK3MAG)
20
#include "ubx.h"
22
#include "ubx.h"
21
#endif
23
#endif
22
#include "_Settings.h"
24
#include "_Settings.h"
Line 48... Line 50...
48
/************************************/
50
/************************************/
49
/*        Update Menu on LCD        */
51
/*        Update Menu on LCD        */
50
/************************************/
52
/************************************/
51
// Display with 20 characters in 4 lines
53
// Display with 20 characters in 4 lines
52
void LCD_PrintMenu(void)
54
void LCD_PrintMenu(void)
53
 {
55
{
-
 
56
 
-
 
57
  #if !defined (USE_MK3MAG) & !defined (USE_MK3MAG)
-
 
58
  static uint8_t MaxMenuItem = 11;
-
 
59
  #else
-
 
60
  #ifdef USE_MK3MAG
-
 
61
  static uint8_t MaxMenuItem = 12;
-
 
62
  #endif
54
  #ifdef USE_KILLAGREG
63
  #ifdef USE_KILLAGREG
55
  static uint8_t MaxMenuItem = 14;
64
  static uint8_t MaxMenuItem = 14;
56
  #else
65
  #endif
57
  static uint8_t MaxMenuItem = 11;
-
 
58
  #endif
66
  #endif
59
  static uint8_t MenuItem=0;
67
  static uint8_t MenuItem=0;
Line 60... Line 68...
60
 
68
 
61
  //  if KEY1 is activated goto previous menu item
69
  //  if KEY1 is activated goto previous menu item
Line 177... Line 185...
177
           LCD_printfxy(0,1,"Pi:%4i  Ro:%4i ",ExternControl.Pitch, ExternControl.Roll);
185
           LCD_printfxy(0,1,"Pi:%4i  Ro:%4i ",ExternControl.Pitch, ExternControl.Roll);
178
           LCD_printfxy(0,2,"Th:%4i  Ya:%4i ",ExternControl.Thrust, ExternControl.Yaw);
186
           LCD_printfxy(0,2,"Th:%4i  Ya:%4i ",ExternControl.Thrust, ExternControl.Yaw);
179
           LCD_printfxy(0,3,"Hi:%4i  Cf:%4i ",ExternControl.Height, ExternControl.Config);
187
           LCD_printfxy(0,3,"Hi:%4i  Cf:%4i ",ExternControl.Height, ExternControl.Config);
180
           break;
188
           break;
Line 181... Line 189...
181
 
189
 
182
    #ifdef USE_KILLAGREG
190
    #if defined (USE_KILLAGREG) || defined (USE_MK3MAG)
183
        case 12://GPS Lat/Lon coords
191
        case 12://GPS Lat/Lon coords
184
                        if (GPSInfo.status == INVALID)
192
                        if (GPSInfo.status == INVALID)
185
                        {
193
                        {
186
                                LCD_printfxy(0,0,"No GPS data!");
194
                                LCD_printfxy(0,0,"No GPS data!");
Line 214... Line 222...
214
                                i1 = (int16_t)(GPSInfo.altitude/1000L);
222
                                i1 = (int16_t)(GPSInfo.altitude/1000L);
215
                                i2 = abs((int16_t)(GPSInfo.altitude%1000L));
223
                                i2 = abs((int16_t)(GPSInfo.altitude%1000L));
216
                                LCD_printfxy(0,3,"Alt: %d.%.3d m",i1, i2);
224
                                LCD_printfxy(0,3,"Alt: %d.%.3d m",i1, i2);
217
                        }
225
                        }
218
                        break;
226
                        break;
-
 
227
        #endif
-
 
228
        #ifdef USE_KILLAGREG
219
        case 13:// MM3 Kompass
229
        case 13:// MM3 Kompass
220
                        LCD_printfxy(0,0,"MM3 Offset");
230
                        LCD_printfxy(0,0,"MM3 Offset");
221
                        LCD_printfxy(0,1,"X_Offset:  %3i",MM3_calib.X_off);
231
                        LCD_printfxy(0,1,"X_Offset:  %3i",MM3_calib.X_off);
222
                        LCD_printfxy(0,2,"Y_Offset:  %3i",MM3_calib.Y_off);
232
                        LCD_printfxy(0,2,"Y_Offset:  %3i",MM3_calib.Y_off);
223
                        LCD_printfxy(0,3,"Z_Offset:  %3i",MM3_calib.Z_off);
233
                        LCD_printfxy(0,3,"Z_Offset:  %3i",MM3_calib.Z_off);