Subversion Repositories FlightCtrl

Rev

Rev 1021 | Rev 1053 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1021 Rev 1051
Line 9... Line 9...
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;
14
unsigned char RemoteTasten = 0;
-
 
Line 15... Line 14...
15
 
14
 
16
#define KEY1    0x01
15
unsigned char MaxMenue = 11;
17
#define KEY2    0x02
-
 
18
#define KEY3    0x04
-
 
19
#define KEY4    0x08
-
 
-
 
16
unsigned char MenuePunkt = 0;
Line 20... Line 17...
20
#define KEY5    0x10
17
 
21
 
18
 
22
void LcdClear(void)
19
void LcdClear(void)
23
{
20
{
24
 unsigned char i;
21
 unsigned char i;
Line 25... Line 22...
25
 for(i=0;i<80;i++) DisplayBuff[i] = ' ';
22
 for(i=0;i<80;i++) DisplayBuff[i] = ' ';
26
}
23
}
27
 
-
 
28
void Menu(void)
-
 
Line 29... Line -...
29
 {
-
 
30
  static unsigned char MaxMenue = 11,MenuePunkt=255;
-
 
31
  if(MenuePunkt == 255) {if(eeprom_read_byte(&EEPromArray[EEPROM_ADR_ACC_NICK]) != 255) MenuePunkt = 0; else MenuePunkt = 5;}
24
 
32
 
-
 
33
  if(RemoteTasten & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue; LcdClear(); RemotePollDisplayLine = -1; }
25
void Menu(void)
34
  if(RemoteTasten & KEY2) { MenuePunkt++; LcdClear(); RemotePollDisplayLine = -1;}
26
 {
35
  if((RemoteTasten & KEY1) && (RemoteTasten & KEY2)) MenuePunkt = 0;
27
 
36
  if(MenuePunkt < 10) {LCD_printfxy(17,0,"[%i]",MenuePunkt);} else {LCD_printfxy(16,0,"[%i]",MenuePunkt);};
28
  if(MenuePunkt > MaxMenue) MenuePunkt = MaxMenue;
37
  switch(MenuePunkt)
29
  switch(MenuePunkt)
38
   {
30
   {
39
    case 0:
31
    case 0:
40
           LCD_printfxy(0,0,"+ MikroKopter +");
32
           LCD_printfxy(0,0,"+ MikroKopter +");
41
           LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c",PlatinenVersion/10,PlatinenVersion%10,VERSION_HAUPTVERSION, VERSION_NEBENVERSION,VERSION_INDEX+'a');
33
           LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c",PlatinenVersion/10,PlatinenVersion%10, VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH +'a');
42
           LCD_printfxy(0,2,"Setting: %d ",GetActiveParamSetNumber());
34
           LCD_printfxy(0,2,"Setting: %d ",GetActiveParamSetNumber());
Line 137... Line 129...
137
           break;
129
           break;
138
    default: MaxMenue = MenuePunkt - 1;
130
    default: MaxMenue = MenuePunkt - 1;
139
             MenuePunkt = 0;
131
             MenuePunkt = 0;
140
           break;
132
           break;
141
    }
133
    }
142
 RemoteTasten = 0;
-
 
143
}
134
}