diff options
-rw-r--r-- | globals.h | 3 | ||||
-rw-r--r-- | menus.c | 22 |
2 files changed, 6 insertions, 19 deletions
@@ -776,7 +776,8 @@ typedef struct { int terminal_connections; int vxi_connections; int vxi_service_request; - int mode; + int gpib_remote; + int gpib_lock; } RemoteStruct; @@ -213,27 +213,13 @@ static void Nonstd_menu_network(void); static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower_encoder_val); -#define RM_NOT_LOCK 0 -#define RM_NOT_REM 0 -#define RM_LOCK 1 -#define RM_REM 2 - -#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)) +#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) static void update_remote_mode () { - int gpib_remote, gpib_lockout; - GPIB_check_remote_status (&gpib_remote, &gpib_lockout); - - globals.Remote.mode = 0; - if (gpib_lockout) { - globals.Remote.mode += RM_LOCK; - } - if (gpib_remote) { - globals.Remote.mode += RM_REM; - } + GPIB_check_remote_status (&globals.Remote.gpib_remote, &globals.Remote.gpib_lock); } @@ -900,7 +886,7 @@ void Show_Main_Menu(void) raw_str = g_string_append (raw_str, "LOCAL+"); } - if (globals.Remote.mode & RM_REM) { + if (globals.Remote.gpib_remote) { raw_str = g_string_append (raw_str, "GPIB+"); } |