5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
23 #define BIGSIZE DBLSIZE
25 #define LBOX_CENTERX (LCD_W/4 + 14)
26 #define RBOX_CENTERX (3*LCD_W/4 - 13)
28 #define LBOX_CENTERX (LCD_W/4 + 10)
29 #define RBOX_CENTERX (3*LCD_W/4 - 10)
31 #define MODELNAME_X (2*FW-2)
32 #define MODELNAME_Y (0)
33 #define PHASE_X (6*FW-1)
34 #define PHASE_Y (2*FH)
36 #define VBATT_X (6*FW)
37 #define VBATT_Y (2*FH)
38 #define VBATTUNIT_X (VBATT_X-1)
39 #define VBATTUNIT_Y (3*FH)
40 #define REBOOT_X (20*FW-3)
41 #define BAR_HEIGHT (BOX_WIDTH-1)
42 #define TRIM_LH_X (LCD_W*1/4+2)
44 #define TRIM_RV_X (LCD_W-4)
45 #define TRIM_RH_X (LCD_W*3/4-2)
46 #define TRIM_LH_NEG (TRIM_LH_X+1*FW)
47 #define TRIM_LH_POS (TRIM_LH_X-4*FW)
48 #define TRIM_RH_NEG (TRIM_RH_X+1*FW)
49 #define TRIM_RH_POS (TRIM_RH_X-4*FW)
55 // Optimization by Mike Blandford
56 for (uint8_t x
=LCD_W
/2 - (NUM_POTS
+NUM_SLIDERS
-1) * 5 / 2, i
=NUM_STICKS
; i
<NUM_STICKS
+NUM_POTS
+NUM_SLIDERS
; x
+=5, i
++) {
57 if (IS_POT_SLIDER_AVAILABLE(i
)) {
58 uint8_t len
= ((calibratedAnalogs
[i
]+RESX
)*BAR_HEIGHT
/(RESX
*2))+1l; // calculate once per loop
59 V_BAR(x
, LCD_H
-8, len
);
64 void doMainScreenGraphics()
66 int16_t calibStickVert
= calibratedAnalogs
[CONVERT_MODE(1)];
67 if (g_model
.throttleReversed
&& CONVERT_MODE(1) == THR_STICK
)
68 calibStickVert
= -calibStickVert
;
69 drawStick(LBOX_CENTERX
, calibratedAnalogs
[CONVERT_MODE(0)], calibStickVert
);
71 calibStickVert
= calibratedAnalogs
[CONVERT_MODE(2)];
72 if (g_model
.throttleReversed
&& CONVERT_MODE(2) == THR_STICK
)
73 calibStickVert
= -calibStickVert
;
74 drawStick(RBOX_CENTERX
, calibratedAnalogs
[CONVERT_MODE(3)], calibStickVert
);
79 void displayTrims(uint8_t phase
)
81 for (uint8_t i
=0; i
<4; i
++) {
82 static coord_t x
[4] = {TRIM_LH_X
, TRIM_LV_X
, TRIM_RV_X
, TRIM_RH_X
};
83 static uint8_t vert
[4] = {0,1,1,0};
85 uint8_t stickIndex
= CONVERT_MODE(i
);
88 int16_t val
= getTrimValue(phase
, i
);
90 #if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
93 if (val
< TRIM_MIN
|| val
> TRIM_MAX
) {
97 if (val
< -(TRIM_LEN
+1)*4) {
100 else if (val
> (TRIM_LEN
+1)*4) {
109 lcdDrawSolidVerticalLine(xm
, ym
-TRIM_LEN
, TRIM_LEN
*2);
110 if (i
!=2 || !g_model
.thrTrim
) {
111 lcdDrawSolidVerticalLine(xm
-1, ym
-1, 3);
112 lcdDrawSolidVerticalLine(xm
+1, ym
-1, 3);
115 #if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
116 lcdDrawFilledRect(xm
-3, ym
-3, 7, 7, SOLID
, att
|ERASE
);
118 lcdDrawSolidHorizontalLine(xm
-1, ym
-1, 3);
121 lcdDrawSolidHorizontalLine(xm
-1, ym
+1, 3);
124 lcdDrawSolidHorizontalLine(xm
-1, ym
, 3);
128 if (g_model
.displayTrims
!= DISPLAY_TRIMS_NEVER
&& dir
!= 0) {
129 if (g_model
.displayTrims
== DISPLAY_TRIMS_ALWAYS
|| (trimsDisplayTimer
> 0 && (trimsDisplayMask
& (1<<i
)))) {
130 lcdDrawNumber(dir
>0 ? 12 : 40, xm
-2, -abs(dir
/5), TINSIZE
|VERTICAL
);
137 lcdDrawSolidHorizontalLine(xm
-TRIM_LEN
, ym
, TRIM_LEN
*2);
138 lcdDrawSolidHorizontalLine(xm
-1, ym
-1, 3);
139 lcdDrawSolidHorizontalLine(xm
-1, ym
+1, 3);
141 #if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
142 lcdDrawFilledRect(xm
-3, ym
-3, 7, 7, SOLID
, att
|ERASE
);
144 lcdDrawSolidVerticalLine(xm
+1, ym
-1, 3);
147 lcdDrawSolidVerticalLine(xm
-1, ym
-1, 3);
150 lcdDrawSolidVerticalLine(xm
, ym
-1, 3);
154 if (g_model
.displayTrims
!= DISPLAY_TRIMS_NEVER
&& dir
!= 0) {
155 if (g_model
.displayTrims
== DISPLAY_TRIMS_ALWAYS
|| (trimsDisplayTimer
> 0 && (trimsDisplayMask
& (1<<i
)))) {
156 lcdDrawNumber((stickIndex
==0 ? (dir
>0 ? TRIM_LH_POS
: TRIM_LH_NEG
) : (dir
>0 ? TRIM_RH_POS
: TRIM_RH_NEG
)), ym
-2, -abs(dir
/5), TINSIZE
);
161 lcdDrawSquare(xm
-3, ym
-3, 7, att
);
165 void drawTimerWithMode(coord_t x
, coord_t y
, uint8_t index
)
168 if (g_model
.timers
[index
].mode
) {
169 const TimerState
& timerState
= timersStates
[index
];
170 LcdFlags att
= RIGHT
| DBLSIZE
| (timerState
.val
<0 ? BLINK
|INVERS
: 0);
171 drawTimer(x
, y
, timerState
.val
, att
, att
);
173 uint8_t xLabel
= (timerState
.val
>= 0 ? x
-49 : x
-56);
174 uint8_t len
= zlen(g_model
.timers
[index
].name
, LEN_TIMER_NAME
);
176 lcdDrawSizedText(xLabel
, y
+FH
, g_model
.timers
[index
].name
, len
, RIGHT
| ZCHAR
);
179 drawTimerMode(xLabel
, y
+FH
, g_model
.timers
[index
].mode
, RIGHT
);
182 uint8_t xLabel
= (timerState
.val
>= 0 ? x
-69 : x
-76);
183 drawTimerMode(xLabel
, y
+FH
, g_model
.timers
[index
].mode
);
188 void displayBattVoltage()
190 #if defined(BATTGRAPH)
191 putsVBat(VBATT_X
-8, VBATT_Y
+1, RIGHT
);
192 lcdDrawSolidFilledRect(VBATT_X
-25, VBATT_Y
+9, 21, 5);
193 lcdDrawSolidVerticalLine(VBATT_X
-4, VBATT_Y
+10, 3);
194 uint8_t count
= GET_TXBATT_BARS();
195 for (uint8_t i
=0; i
<count
; i
+=2)
196 lcdDrawSolidVerticalLine(VBATT_X
-24+i
, VBATT_Y
+10, 3);
197 if (!IS_TXBATT_WARNING() || BLINK_ON_PHASE
)
198 lcdDrawSolidFilledRect(VBATT_X
-26, VBATT_Y
, 24, 15);
200 LcdFlags att
= (IS_TXBATT_WARNING() ? BLINK
|INVERS
: 0) | BIGSIZE
;
201 putsVBat(VBATT_X
-1, VBATT_Y
, att
|NO_UNIT
);
202 lcdDrawChar(VBATT_X
, VBATTUNIT_Y
, 'V');
206 #if defined(PCBSKY9X)
207 void displayVoltageOrAlarm()
209 if (g_eeGeneral
.temperatureWarn
&& getTemperature() >= g_eeGeneral
.temperatureWarn
) {
210 drawValueWithUnit(6*FW
-1, 2*FH
, getTemperature(), UNIT_TEMPERATURE
, BLINK
|INVERS
|DBLSIZE
|RIGHT
);
212 else if (g_eeGeneral
.mAhWarn
&& (g_eeGeneral
.mAhUsed
+ Current_used
* (488 + g_eeGeneral
.txCurrentCalibration
)/8192/36) / 500 >= g_eeGeneral
.mAhWarn
) {
213 drawValueWithUnit(7*FW
-1, 2*FH
, (g_eeGeneral
.mAhUsed
+ Current_used
*(488 + g_eeGeneral
.txCurrentCalibration
)/8192/36)/10, UNIT_MAH
, BLINK
|INVERS
|DBLSIZE
|RIGHT
);
216 displayBattVoltage();
220 #define displayVoltageOrAlarm() displayBattVoltage()
224 #define EVT_KEY_CONTEXT_MENU EVT_KEY_LONG(KEY_ENTER)
225 #define EVT_KEY_NEXT_VIEW EVT_KEY_BREAK(KEY_PAGE)
226 #define EVT_KEY_NEXT_PAGE EVT_ROTARY_RIGHT
227 #define EVT_KEY_PREVIOUS_PAGE EVT_ROTARY_LEFT
228 #define EVT_KEY_MODEL_MENU EVT_KEY_BREAK(KEY_MENU)
229 #define EVT_KEY_GENERAL_MENU EVT_KEY_LONG(KEY_MENU)
230 #define EVT_KEY_TELEMETRY EVT_KEY_LONG(KEY_PAGE)
232 #define EVT_KEY_CONTEXT_MENU EVT_KEY_BREAK(KEY_MENU)
233 #define EVT_KEY_PREVIOUS_VIEW EVT_KEY_BREAK(KEY_UP)
234 #define EVT_KEY_NEXT_VIEW EVT_KEY_BREAK(KEY_DOWN)
235 #define EVT_KEY_NEXT_PAGE EVT_KEY_BREAK(KEY_RIGHT)
236 #define EVT_KEY_PREVIOUS_PAGE EVT_KEY_BREAK(KEY_LEFT)
237 #define EVT_KEY_MODEL_MENU EVT_KEY_LONG(KEY_RIGHT)
238 #define EVT_KEY_GENERAL_MENU EVT_KEY_LONG(KEY_LEFT)
239 #define EVT_KEY_LAST_MENU EVT_KEY_LONG(KEY_MENU)
240 #define EVT_KEY_TELEMETRY EVT_KEY_LONG(KEY_DOWN)
241 #define EVT_KEY_STATISTICS EVT_KEY_LONG(KEY_UP)
244 #if defined(NAVIGATION_MENUS)
245 void onMainViewMenu(const char *result
)
247 if (result
== STR_RESET_TIMER1
) {
250 else if (result
== STR_RESET_TIMER2
) {
254 else if (result
== STR_RESET_TIMER3
) {
259 else if (result
== STR_VIEW_NOTES
) {
262 else if (result
== STR_RESET_SUBMENU
) {
263 POPUP_MENU_ADD_ITEM(STR_RESET_FLIGHT
);
264 POPUP_MENU_ADD_ITEM(STR_RESET_TIMER1
);
265 POPUP_MENU_ADD_ITEM(STR_RESET_TIMER2
);
266 POPUP_MENU_ADD_ITEM(STR_RESET_TIMER3
);
267 #if defined(TELEMETRY_FRSKY)
268 POPUP_MENU_ADD_ITEM(STR_RESET_TELEMETRY
);
272 #if defined(TELEMETRY_FRSKY)
273 else if (result
== STR_RESET_TELEMETRY
) {
277 else if (result
== STR_RESET_FLIGHT
) {
280 else if (result
== STR_STATISTICS
) {
281 chainMenu(menuStatisticsView
);
284 else if (result
== STR_ABOUT_US
) {
285 chainMenu(menuAboutView
);
291 void menuMainView(event_t event
)
293 STICK_SCROLL_DISABLE();
295 uint8_t view
= g_eeGeneral
.view
;
296 uint8_t view_base
= view
& 0x0f;
300 killEvents(KEY_EXIT
);
302 killEvents(KEY_DOWN
);
305 /* TODO if timer2 is OFF, it's possible to use this timer2 as in er9x...
306 case EVT_KEY_BREAK(KEY_MENU):
307 if (view_base == VIEW_TIMER2) {
308 Timer2_running = !Timer2_running;
314 case EVT_KEY_NEXT_PAGE
:
315 case EVT_KEY_PREVIOUS_PAGE
:
316 if (view_base
<= VIEW_INPUTS
) {
318 if (view_base
== VIEW_INPUTS
)
319 g_eeGeneral
.view
^= ALTERNATE_VIEW
;
321 g_eeGeneral
.view
= (g_eeGeneral
.view
+ (4*ALTERNATE_VIEW
) + ((event
==EVT_KEY_PREVIOUS_PAGE
) ? -ALTERNATE_VIEW
: ALTERNATE_VIEW
)) % (4*ALTERNATE_VIEW
);
323 g_eeGeneral
.view
^= ALTERNATE_VIEW
;
325 storageDirty(EE_GENERAL
);
330 #if defined(NAVIGATION_MENUS)
331 case EVT_KEY_CONTEXT_MENU
:
335 if (modelHasNotes()) {
336 POPUP_MENU_ADD_ITEM(STR_VIEW_NOTES
);
341 POPUP_MENU_ADD_ITEM(STR_RESET_SUBMENU
);
343 POPUP_MENU_ADD_ITEM(STR_RESET_TIMER1
);
344 POPUP_MENU_ADD_ITEM(STR_RESET_TIMER2
);
345 #if defined(TELEMETRY_FRSKY)
346 POPUP_MENU_ADD_ITEM(STR_RESET_TELEMETRY
);
348 POPUP_MENU_ADD_ITEM(STR_RESET_FLIGHT
);
351 POPUP_MENU_ADD_ITEM(STR_STATISTICS
);
353 POPUP_MENU_ADD_ITEM(STR_ABOUT_US
);
355 POPUP_MENU_START(onMainViewMenu
);
359 #if MENUS_LOCK != 2 /*no menus*/
360 #if defined(EVT_KEY_LAST_MENU)
361 case EVT_KEY_LAST_MENU
:
362 pushMenu(lastPopMenu());
367 CASE_EVT_ROTARY_BREAK
368 case EVT_KEY_MODEL_MENU
:
369 pushMenu(menuModelSelect
);
374 case EVT_KEY_GENERAL_MENU
:
375 pushMenu(menuRadioSetup
);
380 #if defined(EVT_KEY_PREVIOUS_VIEW)
381 // TODO try to split those 2 cases on 9X
382 case EVT_KEY_PREVIOUS_VIEW
:
383 case EVT_KEY_NEXT_VIEW
:
384 // TODO try to split those 2 cases on 9X
385 g_eeGeneral
.view
= (event
== EVT_KEY_PREVIOUS_VIEW
? (view_base
== VIEW_COUNT
-1 ? 0 : view_base
+1) : (view_base
== 0 ? VIEW_COUNT
-1 : view_base
-1));
386 storageDirty(EE_GENERAL
);
389 case EVT_KEY_NEXT_VIEW
:
390 g_eeGeneral
.view
= (view_base
== 0 ? VIEW_COUNT
-1 : view_base
-1);
391 storageDirty(EE_GENERAL
);
395 #if defined(EVT_KEY_STATISTICS)
396 case EVT_KEY_STATISTICS
:
397 chainMenu(menuStatisticsView
);
402 case EVT_KEY_TELEMETRY
:
403 #if defined(TELEMETRY_FRSKY)
404 if (!IS_FAI_ENABLED())
405 chainMenu(menuViewTelemetryFrsky
);
406 #elif defined(TELEMETRY_JETI)
407 JETI_EnableRXD(); // enable JETI-Telemetry reception
408 chainMenu(menuViewTelemetryJeti
);
409 #elif defined(TELEMETRY_ARDUPILOT)
410 ARDUPILOT_EnableRXD(); // enable ArduPilot-Telemetry reception
411 chainMenu(menuViewTelemetryArduPilot
);
412 #elif defined(TELEMETRY_NMEA)
413 NMEA_EnableRXD(); // enable NMEA-Telemetry reception
414 chainMenu(menuViewTelemetryNMEA
);
415 #elif defined(TELEMETRY_MAVLINK)
416 chainMenu(menuViewTelemetryMavlink
);
418 chainMenu(menuStatisticsDebug
);
423 case EVT_KEY_FIRST(KEY_EXIT
):
424 #if defined(GVARS) && !defined(PCBSTD)
425 if (gvarDisplayTimer
> 0) {
426 gvarDisplayTimer
= 0;
429 #if !defined(NAVIGATION_MENUS)
430 if (view
== VIEW_TIMER2
) {
436 #if !defined(NAVIGATION_MENUS)
437 case EVT_KEY_LONG(KEY_EXIT
):
445 uint8_t mode
= mixerCurrentFlightMode
;
446 lcdDrawSizedText(PHASE_X
, PHASE_Y
, g_model
.flightModeData
[mode
].name
, sizeof(g_model
.flightModeData
[mode
].name
), ZCHAR
|PHASE_FLAGS
);
449 putsModelName(MODELNAME_X
, MODELNAME_Y
, g_model
.header
.name
, g_eeGeneral
.currModel
, BIGSIZE
);
451 // Main Voltage (or alarm if any)
452 displayVoltageOrAlarm();
455 drawTimerWithMode(120, 2*FH
, 0);
461 if (view_base
< VIEW_INPUTS
) {
463 lcdDrawHorizontalLine(38, 34, 54, DOTTED
);
465 lcdDrawSolidHorizontalLine(38 + (g_eeGeneral
.view
/ ALTERNATE_VIEW
) * 13, 34, 13, SOLID
);
467 lcdDrawSolidHorizontalLine((g_eeGeneral
.view
& ALTERNATE_VIEW
) ? 64 : 38, 34, 26, SOLID
);
470 for (uint8_t i
=0; i
<8; i
++) {
473 uint8_t chan
= 8*(g_eeGeneral
.view
/ ALTERNATE_VIEW
) + i
;
475 uint8_t chan
= (g_eeGeneral
.view
& ALTERNATE_VIEW
) ? 8+i
: i
;
478 int16_t val
= channelOutputs
[chan
];
481 case VIEW_OUTPUTS_VALUES
:
484 #if defined(PPM_UNIT_US)
485 lcdDrawNumber(x0
+4*FW
, y0
, PPM_CH_CENTER(chan
)+val
/2, RIGHT
);
486 #elif defined(PPM_UNIT_PERCENT_PREC1)
487 lcdDrawNumber(x0
+4*FW
, y0
, calcRESXto1000(val
), RIGHT
|PREC1
);
489 lcdDrawNumber(x0
+4*FW
, y0
, calcRESXto1000(val
)/10, RIGHT
); // G: Don't like the decimal part*
493 case VIEW_OUTPUTS_BARS
:
495 x0
= i
<4 ? LCD_W
/4+2 : LCD_W
*3/4-2;
498 const uint16_t lim
= (g_model
.extendedLimits
? 512 * uint8_t(LIMIT_EXT_PERCENT
/ 100) : 512) * 2;
499 int8_t len
= (abs(val
) * WBAR2
+ lim
/2) / lim
;
502 len
= WBAR2
; // prevent bars from going over the end - comment for debugging
503 lcdDrawHorizontalLine(x0
-WBAR2
, y0
, WBAR2
*2+1, DOTTED
);
504 lcdDrawSolidVerticalLine(x0
, y0
-2,5 );
509 lcdDrawSolidHorizontalLine(x0
, y0
+1, len
);
510 lcdDrawSolidHorizontalLine(x0
, y0
-1, len
);
515 else if (view_base
== VIEW_INPUTS
) {
516 if (view
== VIEW_INPUTS
) {
518 doMainScreenGraphics();
522 for (int i
=0; i
<NUM_SWITCHES
; ++i
) {
523 if (SWITCH_EXISTS(i
)) {
524 uint8_t x
= 2*FW
-2, y
= 4*FH
+i
*FH
+1;
525 if (i
>= NUM_SWITCHES
/2) {
529 getvalue_t val
= getValue(MIXSRC_FIRST_SWITCH
+i
);
530 getvalue_t sw
= ((val
< 0) ? 3*i
+1 : ((val
== 0) ? 3*i
+2 : 3*i
+3));
531 drawSwitch(x
, y
, sw
, 0);
535 // The ID0 3-POS switch is merged with the TRN switch
536 for (uint8_t i
=SWSRC_THR
; i
<=SWSRC_TRN
; i
++) {
537 int8_t sw
= (i
== SWSRC_TRN
? (switchState(SW_ID0
) ? SWSRC_ID0
: (switchState(SW_ID1
) ? SWSRC_ID1
: SWSRC_ID2
)) : i
);
538 uint8_t x
= 2*FW
-2, y
= i
*FH
+1;
539 if (i
>= SWSRC_AIL
) {
543 drawSwitch(x
, y
, sw
, getSwitch(i
) ? INVERS
: 0);
548 #if defined(PCBMEGA2560) && defined(ROTARY_ENCODERS)
549 for (uint8_t i
=0; i
<NUM_ROTARY_ENCODERS
; i
++) {
550 int16_t val
= getRotaryEncoder(i
);
551 int8_t len
= limit((int16_t)0, (int16_t)(((val
+1024) * BAR_HEIGHT
) / 2048), (int16_t)BAR_HEIGHT
);
552 #if ROTARY_ENCODERS > 2
554 V_BAR(LCD_W
/2-8+V_BAR_W
*i
, LCD_H
-8, len
);
557 V_BAR(LCD_W
/2-3+V_BAR_W
*i
, LCD_H
-8, len
);
560 #endif // PCBGRUVIN9X && ROTARY_ENCODERS
565 uint8_t y
= LCD_H
-20;
566 for (uint8_t line
=0; line
<2; line
++) {
567 for (uint8_t column
=0; column
<MAX_LOGICAL_SWITCHES
/2; column
++) {
568 int8_t len
= getSwitch(SWSRC_SW1
+index
) ? 10 : 1;
569 uint8_t x
= (16 + 3*column
);
570 lcdDrawSolidVerticalLine(x
-1, y
-len
, len
);
571 lcdDrawSolidVerticalLine(x
, y
-len
, len
);
576 #elif defined(CPUM2560)
577 for (uint8_t i
=0; i
<MAX_LOGICAL_SWITCHES
; i
++) {
578 drawSwitch(2*FW
-3 + (i
/3)*(i
/3>2 ? 3*FW
+2 : (3*FW
-1)) + (i
/3>2 ? 2*FW
: 0), 4*FH
+1 + (i
%3)*FH
, SWSRC_SW1
+i
, getSwitch(SWSRC_SW1
+i
) ? INVERS
: 0);
580 #elif !defined(PCBSTD)
581 for (uint8_t i
=0; i
<MAX_LOGICAL_SWITCHES
; i
++) {
582 drawSwitch(2*FW
-2 + (i
/3)*(4*FW
-1), 4*FH
+1 + (i
%3)*FH
, SWSRC_SW1
+i
, getSwitch(SWSRC_SW1
+i
) ? INVERS
: 0);
585 for (uint8_t i
=0; i
<MAX_LOGICAL_SWITCHES
; i
++) {
586 drawSwitch(2*FW
-3 + (i
/3)*(4*FW
), 4*FH
+1 + (i
%3)*FH
, SWSRC_SW1
+i
, getSwitch(SWSRC_SW1
+i
) ? INVERS
: 0);
593 drawTimerWithMode(87, 5*FH
, 1);
596 // And ! in case of unexpected shutdown
597 #if defined(LOG_TELEMETRY) || defined(WATCHDOG_DISABLED)
598 lcdDrawChar(REBOOT_X
, 0*FH
, '!', INVERS
);
600 if (unexpectedShutdown
) {
601 lcdDrawChar(REBOOT_X
, 0*FH
, '!', INVERS
);
605 #if defined(GVARS) && !defined(PCBSTD)
606 if (gvarDisplayTimer
> 0) {
608 warningText
= STR_GLOBAL_VAR
;
610 lcdDrawSizedText(16, 5*FH
, g_model
.gvars
[gvarLastChanged
].name
, LEN_GVAR_NAME
, ZCHAR
);
611 lcdDrawText(16+7*FW
, 5*FH
, PSTR("[\010]"), BOLD
);
613 lcdDrawNumber(16+7*FW
+4*FW
+FW
/2, 5*FH
, GVAR_VALUE(gvarLastChanged
, getGVarFlightMode(mixerCurrentFlightMode
, gvarLastChanged
)), BOLD
);
619 if (moduleFlag
[0] == MODULE_BIND
) {
621 lcdDrawText(15*FW
, 0, PSTR("BIND"), 0);
626 #undef EVT_KEY_CONTEXT_MENU
627 #undef EVT_KEY_PREVIOUS_VIEW
628 #undef EVT_KEY_NEXT_VIEW
629 #undef EVT_KEY_NEXT_PAGE
630 #undef EVT_KEY_PREVIOUS_PAGE
631 #undef EVT_KEY_MODEL_MENU
632 #undef EVT_KEY_GENERAL_MENU
633 #undef EVT_KEY_LAST_MENU
634 #undef EVT_KEY_TELEMETRY
635 #undef EVT_KEY_STATISTICS