summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 20:07:06 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 20:07:06 -0500
commit85efa1743156178ba9de21d05ea6d2117b0a327e (patch)
tree286f9a2f96ae5428e5f187d27aa20ecc14f4663a /menus.c
parent655057d072b0327fbaef82b06c756fda0e06395d (diff)
parent27c33a2f42363b28f3ec7e5179fcba51cf3c3e7b (diff)
Merge branch 'vxi' of ulmo:Instrument into vxi
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/menus.c b/menus.c
index 105b78d..0602a34 100644
--- a/menus.c
+++ b/menus.c
@@ -213,8 +213,7 @@ static void Nonstd_menu_network(void);
static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower_encoder_val);
-#define GPIB_REMOTE_AND_UNLOCKED (globals.Remote.gpib_remote && !globals.Remote.gpib_lock)
-#define GPIB_REMOTE_AND_LOCKED (globals.Remote.gpib_remote && globals.Remote.gpib_lock)
+#define VXI_OR_GPIB_LOCK_ACTIVE ((globals.Remote.gpib_remote && globals.Remote.gpib_lock) || globals.Remote.vxi_panel_lock)
static void update_remote_mode ()
@@ -882,7 +881,7 @@ void Show_Main_Menu(void)
GString *raw_str = g_string_new ("");
- if (!GPIB_REMOTE_AND_LOCKED) {
+ if (!VXI_OR_GPIB_LOCK_ACTIVE) {
raw_str = g_string_append (raw_str, "LOCAL+");
}
@@ -1472,7 +1471,7 @@ static void Submenu_Display(int change_selection)
case Submenu1_rem_loc:
- if (GPIB_REMOTE_AND_UNLOCKED) {
+ if (globals.Remote.gpib_remote && !VXI_OR_GPIB_LOCK_ACTIVE) {
Submenu_max_entry=1;
title = g_strdup ("GPIB Remote:");
Submenu_Structure[0]=mode_go_to_local;
@@ -2201,7 +2200,7 @@ static void Submenu_Service_Encoder(int encoder_change)
/* quit if RWLS mode */
update_remote_mode ();
- if (GPIB_REMOTE_AND_LOCKED) {
+ if (VXI_OR_GPIB_LOCK_ACTIVE) {
return;
}
@@ -2830,7 +2829,7 @@ void Menu_Check_Buttons(void)
update_remote_mode();
if (!(button_port_val & Change_Button)) { /* ----- CHANGE BUTTON --------- */
- if (GPIB_REMOTE_AND_LOCKED) {
+ if (VXI_OR_GPIB_LOCK_ACTIVE) {
// front panel is locked out
Show_Main_Menu();
} else {
@@ -2855,28 +2854,28 @@ void Menu_Check_Buttons(void)
Submenu_Move_Pointer();
}
} else if (!(button_port_val & Mult10_Button)) { /* ----- X10 BUTTON ------------ */
- if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !GPIB_REMOTE_AND_LOCKED) {
+ if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !VXI_OR_GPIB_LOCK_ACTIVE) {
if (globals.MenuStatus.Error_Screen==YES) {
Submenu_Display(NO);
}
queue_error_and_display_on_LCD(Submenu_Mult_Value(10.0));
}
} else if (!(button_port_val & Div10_Button)) { /* ----- /10 BUTTON ------------ */
- if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !GPIB_REMOTE_AND_LOCKED) {
+ if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !VXI_OR_GPIB_LOCK_ACTIVE) {
if (globals.MenuStatus.Error_Screen==YES) {
Submenu_Display(NO);
}
queue_error_and_display_on_LCD(Submenu_Mult_Value(0.1));
}
} else if (!(button_port_val & Plus_Minus_Button)) { /* ----- +/- BUTTON ------------ */
- if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !GPIB_REMOTE_AND_LOCKED) {
+ if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !VXI_OR_GPIB_LOCK_ACTIVE) {
if (globals.MenuStatus.Error_Screen==YES) {
Submenu_Display(NO);
}
queue_error_and_display_on_LCD(Submenu_Mult_Value(-1.0));
}
} else if (!(button_port_val & Extra_Fine_Button)) { /* ----- EXTRA FINE BUTTON ----- */
- if (globals.MenuStatus.Type_Of_Menu==Submenu_On && globals.MenuStatus.Nonstd_Display==NO && globals.MenuStatus.Error_Screen==NO && !GPIB_REMOTE_AND_LOCKED) {
+ if (globals.MenuStatus.Type_Of_Menu==Submenu_On && globals.MenuStatus.Nonstd_Display==NO && globals.MenuStatus.Error_Screen==NO && !VXI_OR_GPIB_LOCK_ACTIVE) {
if (Submenu_extra_fine==YES) {
g_usleep (250e3);
Submenu_extra_fine=NO;