summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-15 08:03:35 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-15 08:03:35 -0400
commit68791fff3f9dce335821b87f5404803e488de85d (patch)
treedafff013194bce9afa42134a02d83ab37f540b02 /menus.c
parent72b80d3dc84988f8a934395e07e174418a66457f (diff)
rename Menu_Update_Display to Show_Main_Menu
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/menus.c b/menus.c
index 3e57ab5..a7af850 100644
--- a/menus.c
+++ b/menus.c
@@ -30,13 +30,13 @@
/* To add a new menu: 1. add the menu name directly below */
/* 2. add the menu mode list choices directly below */
-/* 3. if it is to be shown on the main menu, update Menu_Update_Display(void); */
+/* 3. if it is to be shown on the main menu, update Show_Main_Menu(void); */
/* 4. update Submenu_Display(void), which builds the submenu */
/* 5. update Submenu_Implement_Changes(void), to do the actual functions */
/* KEY SUBROUTINES: */
-/* Menu_Update_Display(void); - displays the main menu */
+/* Show_Main_Menu(void); - displays the main menu */
/* Menu_Check_Buttons(void); - determines what to show based on button status */
/* (void); - clears any button presses */
/* Menu_Move_Pointer(int move_amount); - moves the pointer up and down the main menu */
@@ -219,7 +219,7 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower
void Menu_Refresh()
{
globals.Changes.update_whole_main_menu = YES;
- Menu_Update_Display();
+ Show_Main_Menu();
}
@@ -229,7 +229,16 @@ static int Menu_Is_Item_Visible(int LCD_entry)
}
-void Menu_Update_Display(void)
+
+void Update_Main_Menu_If_Visible(void)
+{
+ if (globals.MenuStatus.Type_Of_Menu == Main_Menu_On) {
+ Show_Main_Menu();
+ }
+}
+
+
+void Show_Main_Menu(void)
{
char a_string[2*LCD_col_width];
@@ -2890,7 +2899,7 @@ void Menu_Check_Buttons(void)
)
) {
if ((globals.MenuStatus.Type_Of_Menu==Main_Menu_On && globals.MenuStatus.Error_Screen==YES) || globals.MenuStatus.Nonstd_Display==YES) {
- Menu_Update_Display();
+ Show_Main_Menu();
} else if (globals.MenuStatus.Type_Of_Menu==Submenu_On && globals.MenuStatus.Error_Screen==YES) {
Submenu_Display(NO);
} else if (globals.MenuStatus.Type_Of_Menu==Main_Menu_On && globals.MenuStatus.Error_Screen==NO) {
@@ -2968,7 +2977,7 @@ static int Submenu_Implement_Changes(void)
/* this routine changes the pulse generator parameters, as chosen by the submenu settings */
if (Submenu_max_entry==0) {
- Menu_Update_Display();
+ Show_Main_Menu();
return OK;
}
@@ -3319,7 +3328,7 @@ static int Submenu_Implement_Changes(void)
if (call_new_submenu==NO) {
globals.Changes.update_whole_main_menu=YES;
- Menu_Update_Display();
+ Show_Main_Menu();
}
/* re-run error_check to update min/max values based on actual settings, not proposed settings */