1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 21:05:26 +03:00

No more global warning displayed only on Main View. Global warning will

be displayed on all menus. Saves flash on stock 9x!
This commit is contained in:
bsongis 2014-04-09 09:55:24 +02:00
parent 7ba16bccb4
commit aaec5f8fb0
19 changed files with 38 additions and 31 deletions

View file

@ -499,13 +499,8 @@ void menuMainView(uint8_t event)
uint8_t view_base = view & 0x0f;
#endif
uint8_t _event = event;
if (s_global_warning) {
event = 0;
}
switch(event) {
switch(event)
{
case EVT_ENTRY:
killEvents(KEY_EXIT);
killEvents(KEY_UP);
@ -637,16 +632,13 @@ void menuMainView(uint8_t event)
return;
case EVT_KEY_FIRST(KEY_EXIT):
if (s_global_warning) {
s_global_warning = NULL;
}
#if defined(GVARS) && !defined(PCBSTD)
else if (s_gvar_timer > 0) {
if (s_gvar_timer > 0) {
s_gvar_timer = 0;
}
#endif
#if !defined(PCBTARANIS)
else if (view == VIEW_TIMER2) {
if (view == VIEW_TIMER2) {
resetTimer(1);
}
#endif
@ -871,15 +863,8 @@ void menuMainView(uint8_t event)
}
#endif
if (s_global_warning) {
s_warning = s_global_warning;
displayWarning(_event);
if (!s_warning) s_global_warning = NULL;
s_warning = NULL;
}
#if defined(GVARS) && !defined(PCBSTD)
else if (s_gvar_timer > 0) {
if (s_gvar_timer > 0) {
s_gvar_timer--;
#if LCD_W >= 212
lcd_filled_rect(BITMAP_X, BITMAP_Y, 64, 32, SOLID, ERASE);