Subversion Repositories FlightCtrl

Rev

Rev 528 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 528 Rev 529
Line 8... Line 8...
8
 
8
 
9
unsigned int  TestInt = 0;
9
unsigned int  TestInt = 0;
10
#define ARRAYGROESSE 10
10
#define ARRAYGROESSE 10
11
unsigned char Array[ARRAYGROESSE] = {1,2,3,4,5,6,7,8,9,10};
11
unsigned char Array[ARRAYGROESSE] = {1,2,3,4,5,6,7,8,9,10};
12
char DisplayBuff[80] = "Hallo Welt";
12
char DisplayBuff[80] = "Hallo Welt";
13
unsigned char DispPtr = 0;
13
unsigned char DispPtr = 0;
Line 14... Line 14...
14
unsigned char RemoteTasten = 0;
14
unsigned char RemoteTasten = 0;
15
 
15
 
16
#define KEY1    0x01
16
#define KEY1    0x01
Line 25... Line 25...
25
 for(i=0;i<80;i++) DisplayBuff[i] = ' ';
25
 for(i=0;i<80;i++) DisplayBuff[i] = ' ';
26
}
26
}
Line 27... Line 27...
27
 
27
 
28
void Menu(void)
28
void Menu(void)
29
 {
29
 {
Line 30... Line 30...
30
  static unsigned char MaxMenue = 10,MenuePunkt=0;      
30
  static unsigned char MaxMenue = 10,MenuePunkt=0;
31
 
31
 
32
  if(RemoteTasten & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue; LcdClear(); }
32
  if(RemoteTasten & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue; LcdClear(); RemotePollDisplayLine = -1; }
33
  if(RemoteTasten & KEY2) { MenuePunkt++; LcdClear(); }
33
  if(RemoteTasten & KEY2) { MenuePunkt++; LcdClear(); RemotePollDisplayLine = -1;}
34
  if((RemoteTasten & KEY1) && (RemoteTasten & KEY2)) MenuePunkt = 0;
34
  if((RemoteTasten & KEY1) && (RemoteTasten & KEY2)) MenuePunkt = 0;
35
  LCD_printfxy(17,0,"[%i]",MenuePunkt);
35
  LCD_printfxy(17,0,"[%i]",MenuePunkt);
36
  switch(MenuePunkt)
36
  switch(MenuePunkt)
37
   {
37
   {
38
    case 0:
38
    case 0:
39
           LCD_printfxy(0,0,"++ MikroKopter ++");
39
           LCD_printfxy(0,0,"++ MikroKopter ++");
40
           LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d",PlatinenVersion/10,PlatinenVersion%10,VERSION_HAUPTVERSION, VERSION_NEBENVERSION);
40
           LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c",PlatinenVersion/10,PlatinenVersion%10,VERSION_HAUPTVERSION, VERSION_NEBENVERSION,VERSION_INDEX+'a');
41
           LCD_printfxy(0,2,"Setting: %d ",GetActiveParamSetNumber());
41
           LCD_printfxy(0,2,"Setting: %d ",GetActiveParamSetNumber());
42
           LCD_printfxy(0,3,"(c) Holger Buss");
42
           LCD_printfxy(0,3,"(c) Holger Buss");
43
//           if(RemoteTasten & KEY3) TestInt--;
43
//           if(RemoteTasten & KEY3) TestInt--;
Line 76... Line 76...
76
           LCD_printfxy(0,2,"P1:%4i  P2:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]],PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]]);
76
           LCD_printfxy(0,2,"P1:%4i  P2:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]],PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]]);
77
           LCD_printfxy(0,3,"P3:%4i  P4:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]],PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]]);
77
           LCD_printfxy(0,3,"P3:%4i  P4:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]],PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]]);
78
           break;
78
           break;
79
    case 5:
79
    case 5:
80
           LCD_printfxy(0,0,"Gyro - Sensor");
80
           LCD_printfxy(0,0,"Gyro - Sensor");
-
 
81
          if(PlatinenVersion == 10)
-
 
82
          {
81
           LCD_printfxy(0,1,"Nick %4i (%3i)",AccumulateNick / MessanzahlNick, AdNeutralNick);
83
           LCD_printfxy(0,1,"Nick %4i (%3i)",AdWertNick - AdNeutralNick, AdNeutralNick);
82
           LCD_printfxy(0,2,"Roll %4i (%3i)",AccumulateRoll / MessanzahlRoll, AdNeutralRoll);
84
           LCD_printfxy(0,2,"Roll %4i (%3i)",AdWertRoll - AdNeutralRoll, AdNeutralRoll);
83
           LCD_printfxy(0,3,"Gier %4i (%3i)",AccumulateGier / MessanzahlGier, AdNeutralGier);
85
           LCD_printfxy(0,3,"Gier %4i (%3i)",MesswertGier, AdNeutralGier);
-
 
86
          }
-
 
87
          else  
-
 
88
          {
-
 
89
           LCD_printfxy(0,1,"Nick %4i (%3i)",AdWertNick - AdNeutralNick, AdNeutralNick/2);
-
 
90
           LCD_printfxy(0,2,"Roll %4i (%3i)",AdWertRoll - AdNeutralRoll, AdNeutralRoll/2);
-
 
91
           LCD_printfxy(0,3,"Gier %4i (%3i)",MesswertGier, AdNeutralGier/2);
-
 
92
          }
84
           break;
93
           break;
85
    case 6:
94
    case 6:
86
           LCD_printfxy(0,0,"ACC - Sensor");
95
           LCD_printfxy(0,0,"ACC - Sensor");
87
           LCD_printfxy(0,1,"Nick %4i (%3i)",accumulate_AccNick / messanzahl_AccNick,NeutralAccX);
96
           LCD_printfxy(0,1,"Nick %4i (%3i)",AdWertAccNick,NeutralAccX);
88
           LCD_printfxy(0,2,"Roll %4i (%3i)",accumulate_AccRoll / messanzahl_AccRoll,NeutralAccY);
97
           LCD_printfxy(0,2,"Roll %4i (%3i)",AdWertAccRoll,NeutralAccY);
89
           LCD_printfxy(0,3,"Hoch %4i (%3i)",Aktuell_az/*accumulate_AccHoch / messanzahl_AccHoch*/,(int)NeutralAccZ);
98
           LCD_printfxy(0,3,"Hoch %4i (%3i)",Mittelwert_AccHoch/*accumulate_AccHoch / messanzahl_AccHoch*/,(int)NeutralAccZ);
90
           break;
99
           break;
91
    case 7:
100
    case 7:
92
           LCD_printfxy(0,1,"Spannung:  %5i",UBat);
101
           LCD_printfxy(0,1,"Spannung:  %5i",UBat);
93
           LCD_printfxy(0,2,"Empf.Pegel:%5i",SenderOkay);
102
           LCD_printfxy(0,2,"Empf.Pegel:%5i",SenderOkay);
94
           break;
103
           break;
Line 113... Line 122...
113
    default: MaxMenue = MenuePunkt - 1;
122
    default: MaxMenue = MenuePunkt - 1;
114
             MenuePunkt = 0;
123
             MenuePunkt = 0;
115
           break;
124
           break;
116
    }
125
    }
117
 RemoteTasten = 0;
126
 RemoteTasten = 0;
118
}
-
 
119
127
}
-
 
128