diff options
author | root <root@fedora-arm.domain.avtechpulse.com> | 1999-12-31 19:27:00 -0500 |
---|---|---|
committer | root <root@fedora-arm.domain.avtechpulse.com> | 1999-12-31 19:27:00 -0500 |
commit | 18782fcc486fe5a9d0901a73d2af3eebfca95b00 (patch) | |
tree | ec0d962185e26ab3bf2fe1e74521b59eb2f0b9ab | |
parent | 2615223eeedfefc605839bea350911574368e668 (diff) |
better main menu refreshing
-rw-r--r-- | instr-daemon.c | 2 | ||||
-rw-r--r-- | menus.c | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/instr-daemon.c b/instr-daemon.c index cb9f9b4..b90990d 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -237,7 +237,7 @@ int main(int argc, char **argv) I2C_Setup_Monitor(); Main_Rst(); - Menu_Update_Display(); // FIXME? + Menu_Update_Display(); // FIXME - self-cal here - or in thread beside user sessions? @@ -214,7 +214,6 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower void Menu_Refresh() { globals.Changes.update_whole_main_menu = YES; - LCD_clear(); Menu_Update_Display(); } @@ -237,10 +236,18 @@ void Menu_Update_Display(void) int show_item; int old_cursor_pos; + if ( (globals.MenuStatus.Type_Of_Menu != Main_Menu_On) || + (globals.MenuStatus.Error_Screen == YES) || + (globals.MenuStatus.Nonstd_Display == YES) ) { + LCD_clear(); + globals.Changes.update_whole_main_menu = TRUE; + } + LCD_entry=-1; sig_dig = 4; - globals.MenuStatus.Type_Of_Menu=Main_Menu_On; Submenu_extra_fine=NO; + + globals.MenuStatus.Type_Of_Menu=Main_Menu_On; globals.MenuStatus.Error_Screen=NO; globals.MenuStatus.Nonstd_Display=NO; @@ -1067,9 +1074,7 @@ static void Menu_Move_Pointer(int move_amount) new_page=menu_cursor_pos / LCD_max_entries_per_page; if (new_page!=old_page) { - globals.Changes.update_whole_main_menu=YES; - LCD_clear(); - Menu_Update_Display(); + Menu_Refresh(); } } @@ -1246,6 +1251,7 @@ static void Submenu_Display(int redraw) current_operating_mode=0; + // FIXME - check for redundant clearing if ( (globals.MenuStatus.Type_Of_Menu != Submenu_On) || (globals.MenuStatus.Error_Screen == YES) || (globals.MenuStatus.Nonstd_Display == YES) || |