Subversion Repositories FlightCtrl

Rev

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

Rev 1051 Rev 1053
Line 12... Line 12...
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
 
14
 
15
unsigned char MaxMenue = 11;
15
unsigned char MaxMenue = 11;
-
 
16
unsigned char MenuePunkt = 0;
Line -... Line 17...
-
 
17
unsigned char RemoteKeys = 0;
-
 
18
 
-
 
19
#define KEY1    0x01
-
 
20
#define KEY2    0x02
-
 
21
#define KEY3    0x04
Line 16... Line 22...
16
unsigned char MenuePunkt = 0;
22
#define KEY4    0x08
17
 
23
#define KEY5    0x10
18
 
24
 
19
void LcdClear(void)
25
void LcdClear(void)
Line 24... Line 30...
24
 
30
 
25
void Menu(void)
31
void Menu(void)
Line 26... Line 32...
26
 {
32
 {
-
 
33
 
-
 
34
  if(MenuePunkt > MaxMenue) MenuePunkt = MaxMenue;
-
 
35
 
-
 
36
  if(RemoteKeys & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue;}
-
 
37
  if(RemoteKeys & KEY2) { MenuePunkt++;}
-
 
38
  if((RemoteKeys & KEY1) && (RemoteKeys & KEY2)) MenuePunkt = 0;
-
 
39
  LcdClear();
-
 
40
  if(MenuePunkt < 10) {LCD_printfxy(17,0,"[%i]",MenuePunkt);}
-
 
41
  else {LCD_printfxy(16,0,"[%i]",MenuePunkt);};
27
 
42
 
28
  if(MenuePunkt > MaxMenue) MenuePunkt = MaxMenue;
43
 
29
  switch(MenuePunkt)
44
  switch(MenuePunkt)
30
   {
45
   {
31
    case 0:
46
    case 0:
Line 129... Line 144...
129
           break;
144
           break;
130
    default: MaxMenue = MenuePunkt - 1;
145
    default: MaxMenue = MenuePunkt - 1;
131
             MenuePunkt = 0;
146
             MenuePunkt = 0;
132
           break;
147
           break;
133
    }
148
    }
-
 
149
    RemoteKeys = 0;
134
}
150
}