Rev 1972 | Rev 2050 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1972 | Rev 2030 | ||
---|---|---|---|
Line 19... | Line 19... | ||
19 | // ----------------------------------------------------------- |
19 | // ----------------------------------------------------------- |
20 | // the menu functions |
20 | // the menu functions |
21 | // ----------------------------------------------------------- |
21 | // ----------------------------------------------------------- |
22 | void Menu_Status(uint8_t key) |
22 | void Menu_Status(uint8_t key) |
23 | { //0123456789ABCDEF |
23 | { //0123456789ABCDEF |
- | 24 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
|
24 | JetiBox_printfxy(0,0,"%2i.%1iV",UBat/10, UBat%10); |
25 | JetiBox_printfxy(0,0,"%2i.%1iV",UBat/10, UBat%10); |
25 | if(NaviDataOkay) |
26 | if(NaviDataOkay) |
26 | { |
27 | { |
27 | JetiBox_printfxy(6,0,"%3d%c %03dm%c",ErsatzKompassInGrad, 0xDF, GPSInfo.HomeDistance/10,NC_GPS_ModeCharacter); |
28 | JetiBox_printfxy(6,0,"%3d%c %03dm%c",ErsatzKompassInGrad, 0xDF, GPSInfo.HomeDistance/10,NC_GPS_ModeCharacter); |
28 | } |
29 | } |
Line 55... | Line 56... | ||
55 | JetiBox_printfxy(0,1,"%4i %2i:%02i",Capacity.UsedCapacity,FlugSekunden/60,FlugSekunden%60); |
56 | JetiBox_printfxy(0,1,"%4i %2i:%02i",Capacity.UsedCapacity,FlugSekunden/60,FlugSekunden%60); |
56 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
57 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
57 | { |
58 | { |
58 | JetiBox_printfxy(10,1,"%4im%c", (int16_t)(HoehenWert/100),VarioCharacter); |
59 | JetiBox_printfxy(10,1,"%4im%c", (int16_t)(HoehenWert/100),VarioCharacter); |
59 | } |
60 | } |
- | 61 | #endif |
|
60 | } |
62 | } |
Line 61... | Line 63... | ||
61 | 63 | ||
62 | 64 | ||
- | 65 | void Menu_Temperature(uint8_t key) |
|
63 | void Menu_Temperature(uint8_t key) |
66 | { //0123456789ABCDEF |
64 | { //0123456789ABCDEF |
67 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
65 | JetiBox_printfxy(0,0,"%3i %3i %3i %3i", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature); |
68 | JetiBox_printfxy(0,0,"%3i %3i %3i %3i", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature); |
66 | JetiBox_printfxy(0,1,"%3i %3i %3i %3i", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature); |
69 | JetiBox_printfxy(0,1,"%3i %3i %3i %3i", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature); |
67 | if(RequiredMotors <= 4) |
70 | if(RequiredMotors <= 4) |
Line 72... | Line 75... | ||
72 | if(RequiredMotors <= 6) |
75 | if(RequiredMotors <= 6) |
73 | { |
76 | { |
74 | JetiBox_printfxy(8,1,"\%cC ",0xdf); |
77 | JetiBox_printfxy(8,1,"\%cC ",0xdf); |
75 | } |
78 | } |
Line -... | Line 79... | ||
- | 79 | ||
76 | 80 | #endif |
|
Line 77... | Line 81... | ||
77 | } |
81 | } |
78 | 82 | ||
- | 83 | void Menu_Battery(uint8_t key) |
|
79 | void Menu_Battery(uint8_t key) |
84 | { //0123456789ABCDEF |
80 | { //0123456789ABCDEF |
85 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
- | 86 | JetiBox_printfxy(0,0,"%2i.%1iV %3i.%1iA", UBat/10, UBat%10, Capacity.ActualCurrent/10, Capacity.ActualCurrent%10); |
|
81 | JetiBox_printfxy(0,0,"%2i.%1iV %3i.%1iA", UBat/10, UBat%10, Capacity.ActualCurrent/10, Capacity.ActualCurrent%10); |
87 | JetiBox_printfxy(0,1,"%4iW %6imAh",Capacity.ActualPower, Capacity.UsedCapacity); |
Line 82... | Line 88... | ||
82 | JetiBox_printfxy(0,1,"%4iW %6imAh",Capacity.ActualPower, Capacity.UsedCapacity); |
88 | #endif |
83 | } |
89 | } |
- | 90 | ||
84 | 91 | void Magnet_Values(uint8_t key) |
|
85 | void Magnet_Values(uint8_t key) |
92 | { //0123456789ABCDEF |
- | 93 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
|
86 | { //0123456789ABCDEF |
94 | JetiBox_printfxy(0,0,"Magnet:%3i%% %3i%c",EarthMagneticField, KompassValue,0xDF); |
Line 87... | Line 95... | ||
87 | JetiBox_printfxy(0,0,"Magnet:%3i%% %3i%c",EarthMagneticField, KompassValue,0xDF); |
95 | JetiBox_printfxy(0,1,"Incli.:%3i%c (%i) ",EarthMagneticInclination, 0xDF,EarthMagneticInclinationTheoretic); |
88 | JetiBox_printfxy(0,1,"Incli.:%3i%c (%i) ",EarthMagneticInclination, 0xDF,EarthMagneticInclinationTheoretic); |
96 | #endif |
- | 97 | } |
|
89 | } |
98 | |
90 | 99 | ||
91 | 100 | void Menu_PosInfo(uint8_t key) |
|
92 | void Menu_PosInfo(uint8_t key) |
101 | { |
93 | { |
102 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
Line 113... | Line 122... | ||
113 | } |
122 | } |
114 | else |
123 | else |
115 | { //0123456789ABCDEF |
124 | { //0123456789ABCDEF |
116 | JetiBox_printfxy(2,0,"No NaviCtrl!"); |
125 | JetiBox_printfxy(2,0,"No NaviCtrl!"); |
117 | } |
126 | } |
- | 127 | #endif |
|
118 | } |
128 | } |
Line 119... | Line 129... | ||
119 | 129 | ||
120 | 130 | ||
Line 139... | Line 149... | ||
139 | 149 | ||
Line 140... | Line 150... | ||
140 | */ |
150 | */ |
141 | 151 | ||
- | 152 | const MENU_ENTRY JetiBox_Menu[] PROGMEM= |
|
142 | const MENU_ENTRY JetiBox_Menu[] PROGMEM= |
153 | { // l r u d pHandler |
143 | { // l r u d pHandler |
154 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
144 | {4, 1, 0, 0, &Menu_Status }, // 0 |
155 | {4, 1, 0, 0, &Menu_Status }, // 0 |
145 | {0, 2, 1, 1, &Menu_Temperature }, // 1 |
156 | {0, 2, 1, 1, &Menu_Temperature }, // 1 |
146 | {1, 3, 2, 2, &Menu_Battery }, // 2 |
157 | {1, 3, 2, 2, &Menu_Battery }, // 2 |
- | 158 | {2, 4, 3, 3, &Menu_PosInfo }, // 3 |
|
147 | {2, 4, 3, 3, &Menu_PosInfo }, // 3 |
159 | {3, 0, 4, 4, &Magnet_Values } // 4 |
Line 148... | Line 160... | ||
148 | {3, 0, 4, 4, &Magnet_Values } // 4 |
160 | #endif |
149 | }; |
161 | }; |
150 | 162 | ||
151 | // ----------------------------------------------------------- |
163 | // ----------------------------------------------------------- |
152 | // Update display buffer |
164 | // Update display buffer |
- | 165 | // ----------------------------------------------------------- |
|
153 | // ----------------------------------------------------------- |
166 | unsigned char JetiBox_Update(unsigned char key) |
Line 154... | Line 167... | ||
154 | unsigned char JetiBox_Update(unsigned char key) |
167 | { |
155 | { |
168 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
156 | static uint8_t item = 0, last_item = 0; // the menu item |
169 | static uint8_t item = 0, last_item = 0; // the menu item |
Line 181... | Line 194... | ||
181 | if(item != last_item) key = JETIBOX_KEY_UNDEF; |
194 | if(item != last_item) key = JETIBOX_KEY_UNDEF; |
Line 182... | Line 195... | ||
182 | 195 | ||
183 | LIBFC_JetiBox_Clear(); |
196 | LIBFC_JetiBox_Clear(); |
184 | //execute menu item handler |
197 | //execute menu item handler |
185 | ((pFctMenu)(pgm_read_word(&(JetiBox_Menu[item].pHandler))))(key); |
198 | ((pFctMenu)(pgm_read_word(&(JetiBox_Menu[item].pHandler))))(key); |
186 | 199 | #endif |
|
187 | return (0); |
200 | return (0); |