From 36f205a1008698be54ded3b6bb31b49a1bcec981 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 31 Dec 1999 19:32:30 -0500 Subject: fixed remote mode reporting; bumped version to 5.01 --- menus.c | 18 ++++++++++-------- version.h | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/menus.c b/menus.c index b035b9a..7a161cf 100644 --- a/menus.c +++ b/menus.c @@ -220,6 +220,9 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower #define RM_REM 2 #define RM_TERM 4 +#define GPIB_REMOTE_AND_UNLOCKED ((globals.Remote.mode & RM_REM) && !(globals.Remote.mode & RM_LOCK)) +#define GPIB_REMOTE_AND_LOCKED ((globals.Remote.mode & RM_REM) && (globals.Remote.mode & RM_LOCK)) + static void update_remote_mode () { @@ -1473,7 +1476,7 @@ static void Submenu_Display(int change_selection) case Submenu1_rem_loc: - if (globals.Remote.mode == (RM_REM | RM_NOT_LOCK)) { + if (GPIB_REMOTE_AND_UNLOCKED) { Submenu_max_entry=1; title = g_strdup ("GPIB Remote:"); Submenu_Structure[0]=mode_go_to_local; @@ -2202,7 +2205,7 @@ static void Submenu_Service_Encoder(int encoder_change) /* quit if RWLS mode */ update_remote_mode (); - if (globals.Remote.mode== (RM_REM | RM_LOCK)) { + if (GPIB_REMOTE_AND_LOCKED) { return; } @@ -2831,7 +2834,7 @@ void Menu_Check_Buttons(void) update_remote_mode(); if (!(button_port_val & Change_Button)) { /* ----- CHANGE BUTTON --------- */ - if (globals.Remote.mode == (RM_REM | RM_LOCK)) { + if (GPIB_REMOTE_AND_LOCKED) { // front panel is locked out Show_Main_Menu(); } else { @@ -2856,29 +2859,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 && (globals.Remote.mode != (RM_REM | RM_LOCK))) { + if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !GPIB_REMOTE_AND_LOCKED) { 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 && (globals.Remote.mode != (RM_REM | RM_LOCK))) { + if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !GPIB_REMOTE_AND_LOCKED) { 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 && (globals.Remote.mode != (RM_REM | RM_LOCK))) { + if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !GPIB_REMOTE_AND_LOCKED) { 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 && - (globals.Remote.mode != (RM_REM | RM_LOCK))) { + if (globals.MenuStatus.Type_Of_Menu==Submenu_On && globals.MenuStatus.Nonstd_Display==NO && globals.MenuStatus.Error_Screen==NO && !GPIB_REMOTE_AND_LOCKED) { if (Submenu_extra_fine==YES) { g_usleep (250e3); Submenu_extra_fine=NO; diff --git a/version.h b/version.h index cdeb200..b81efbd 100644 --- a/version.h +++ b/version.h @@ -1,2 +1,2 @@ -#define FW_VERSION "5.00" +#define FW_VERSION "5.01" #define SCPI_version "1996.0" -- cgit