Rev 1944 | Rev 2030 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1944 | Rev 1972 | ||
---|---|---|---|
Line 76... | Line 76... | ||
76 | 76 | ||
Line 77... | Line 77... | ||
77 | } |
77 | } |
78 | 78 | ||
79 | void Menu_Battery(uint8_t key) |
79 | void Menu_Battery(uint8_t key) |
80 | { //0123456789ABCDEF |
80 | { //0123456789ABCDEF |
81 | 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); |
Line -... | Line 82... | ||
- | 82 | JetiBox_printfxy(0,1,"%4iW %6imAh",Capacity.ActualPower, Capacity.UsedCapacity); |
|
- | 83 | } |
|
- | 84 | ||
- | 85 | void Magnet_Values(uint8_t key) |
|
- | 86 | { //0123456789ABCDEF |
|
- | 87 | JetiBox_printfxy(0,0,"Magnet:%3i%% %3i%c",EarthMagneticField, KompassValue,0xDF); |
|
Line 82... | Line 88... | ||
82 | JetiBox_printfxy(0,1,"%4iW %6imAh",Capacity.ActualPower, Capacity.UsedCapacity); |
88 | JetiBox_printfxy(0,1,"Incli.:%3i%c (%i) ",EarthMagneticInclination, 0xDF,EarthMagneticInclinationTheoretic); |
83 | } |
89 | } |
84 | 90 | ||
85 | 91 | ||
Line 133... | Line 139... | ||
133 | 139 | ||
Line 134... | Line 140... | ||
134 | */ |
140 | */ |
135 | 141 | ||
136 | const MENU_ENTRY JetiBox_Menu[] PROGMEM= |
142 | const MENU_ENTRY JetiBox_Menu[] PROGMEM= |
137 | { // l r u d pHandler |
143 | { // l r u d pHandler |
138 | {3, 1, 0, 0, &Menu_Status }, // 0 |
144 | {4, 1, 0, 0, &Menu_Status }, // 0 |
139 | {0, 2, 1, 1, &Menu_Temperature }, // 1 |
145 | {0, 2, 1, 1, &Menu_Temperature }, // 1 |
- | 146 | {1, 3, 2, 2, &Menu_Battery }, // 2 |
|
140 | {1, 3, 2, 2, &Menu_Battery }, // 2 |
147 | {2, 4, 3, 3, &Menu_PosInfo }, // 3 |
Line 141... | Line 148... | ||
141 | {2, 0, 3, 3, &Menu_PosInfo }, // 3 |
148 | {3, 0, 4, 4, &Magnet_Values } // 4 |
142 | }; |
149 | }; |
143 | 150 | ||
Line 151... | Line 158... | ||
151 | // navigate within the menu by key action |
158 | // navigate within the menu by key action |
152 | last_item = item; |
159 | last_item = item; |
153 | switch(key) |
160 | switch(key) |
154 | { |
161 | { |
155 | case JETIBOX_KEY_LEFT: |
162 | case JETIBOX_KEY_LEFT: |
156 | if (item == 0) return (1); // switch back to jeti expander menu |
163 | //if (item == 0) return (1); // switch back to jeti expander menu |
- | 164 | // else |
|
157 | else item = pgm_read_byte(&JetiBox_Menu[item].left); //trigger to left menu item |
165 | item = pgm_read_byte(&JetiBox_Menu[item].left); //trigger to left menu item |
158 | break; |
166 | break; |
159 | case JETIBOX_KEY_RIGHT: |
167 | case JETIBOX_KEY_RIGHT: |
160 | item = pgm_read_byte(&JetiBox_Menu[item].right); //trigger to right menu item |
168 | item = pgm_read_byte(&JetiBox_Menu[item].right); //trigger to right menu item |
161 | break; |
169 | break; |
162 | case JETIBOX_KEY_UP: |
170 | case JETIBOX_KEY_UP: |