summaryrefslogtreecommitdiff
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
parent72b80d3dc84988f8a934395e07e174418a66457f (diff)
rename Menu_Update_Display to Show_Main_Menu
-rw-r--r--device-functions.c10
-rw-r--r--instr-daemon.c2
-rw-r--r--menus.c23
-rw-r--r--menus.h3
-rw-r--r--monitor.c2
-rw-r--r--parser.c2
6 files changed, 26 insertions, 16 deletions
diff --git a/device-functions.c b/device-functions.c
index 1fe6c56..dd17ecd 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -1796,7 +1796,7 @@ int Set_Dly_Shr_Nom(int channel,int calibration_point_number)
Main_update_shift_registers();
- Menu_Update_Display();
+ Show_Main_Menu();
return OK;
}
@@ -2055,7 +2055,7 @@ int Set_Cal_Nom(int channel,int calibration_point_number,int parameter, float *n
Set_Mux(true_channel);
Main_update_shift_registers();
- Menu_Update_Display();
+ Show_Main_Menu();
/* re-enable error-checking */
globals.Flash.fully_programmed=All_Programmed;
@@ -2234,7 +2234,7 @@ int Set_VI_Cal_Pnt(int parameter,int channel,int calibration_point_number,float
Set_Cal_Nom(channel,calibration_point_number,parameter,NULL);
Main_update_shift_registers();
- Menu_Update_Display();
+ Show_Main_Menu();
eprom_loc = (char *) (&pwl_amp[index]) - (char *) &(globals.Flash.flash_start);
writeUserBlock(&globals.Flash, eprom_loc, sizeof(nom_ampl));
@@ -2397,7 +2397,7 @@ int Set_VI_Del_Cal(int parameter,int channel,int calibration_point_number)
Set_Offset(0,0,0,0,channel,0.0);
Main_update_shift_registers();
- Menu_Update_Display();
+ Show_Main_Menu();
eprom_loc = (char *) pointer_short1 - (char *) &(globals.Flash.flash_start);
writeUserBlock(&globals.Flash, eprom_loc, size_of_short1);
@@ -4182,7 +4182,7 @@ int do_full_self_cal(CalStruct *caldata)
LCD_write(2,0,"More details are provided by \"cal?\"");
g_usleep (3e6);
- Menu_Update_Display();
+ Show_Main_Menu();
diff_timer = sec_timer() - start_timer;
diff --git a/instr-daemon.c b/instr-daemon.c
index 553745f..7943ae1 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -248,7 +248,7 @@ int main(int argc, char **argv)
I2C_Setup_Monitor();
Main_Rst();
- Menu_Update_Display();
+ Show_Main_Menu();
// FIXME - self-cal here - or in thread beside user sessions?
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 */
diff --git a/menus.h b/menus.h
index efc2233..cf3af8c 100644
--- a/menus.h
+++ b/menus.h
@@ -1,6 +1,7 @@
#include <glib.h>
void Menu_Refresh();
-void Menu_Update_Display(void);
+void Update_Main_Menu_If_Visible(void);
+void Show_Main_Menu(void);
void Menu_Clear_Buttons(void);
void Menu_Check_Buttons(void);
diff --git a/monitor.c b/monitor.c
index ecbc3bb..0bd2a95 100644
--- a/monitor.c
+++ b/monitor.c
@@ -243,7 +243,7 @@ int I2C_Check_Monitors(void)
}
if (update_display) {
- Menu_Update_Display();
+ Show_Main_Menu();
}
return OK;
diff --git a/parser.c b/parser.c
index c5b0886..f5a04aa 100644
--- a/parser.c
+++ b/parser.c
@@ -1087,7 +1087,7 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer
a chance to press "Go To Local" to override control */
if (!is_query && !(globals.MenuStatus.Selected_Submenu==Submenu1_rem_loc && globals.MenuStatus.Type_Of_Menu==Submenu_On)) {
- Menu_Update_Display();
+ Show_Main_Menu();
}
/* re-run error_check to update min/max values based on actual settings, not proposed settings */