From e0a92714bbc15e1dce3dad66be9bbf29b93ac0cc Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Wed, 12 Dec 2012 09:06:11 -0500 Subject: further simplification of remote mode reporting --- menus.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'menus.c') diff --git a/menus.c b/menus.c index 109a9bf..105b78d 100644 --- a/menus.c +++ b/menus.c @@ -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+"); } -- cgit