summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-12-12 09:06:11 -0500
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-12-12 09:06:11 -0500
commite0a92714bbc15e1dce3dad66be9bbf29b93ac0cc (patch)
tree1955e7b1abf9e6e60a8925c0aacafa146a11a557 /menus.c
parentd4e6f5a091c4c8aee14abf48a099b7a579d73f07 (diff)
further simplification of remote mode reporting
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c22
1 files changed, 4 insertions, 18 deletions
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+");
}