summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 02:27:46 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 02:27:46 +0900
commit5ff42898f157d31baa91bf42922df87c4ca889ec (patch)
tree017084140ae457d71cf34b98514b9e2faf97a46a
parente1aa4f9649eb0be3657f19ab13ac62a8fb7df9f9 (diff)
fix encoder clearingINSTRUMENT_6_4_18b
-rw-r--r--menus.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/menus.c b/menus.c
index 52c6c3f..3de5af3 100644
--- a/menus.c
+++ b/menus.c
@@ -2323,13 +2323,13 @@ static void Submenu_Service_Encoder(int encoder_change)
}
if (globals.MenuStatus.Type_Of_Menu==Main_Menu_On) {
- if (encoder_change>1) {
+ if (encoder_change>0) {
Menu_Move_Pointer(1);
- } else if (encoder_change<-1) {
+ } else {
Menu_Move_Pointer(-1);
}
-
g_usleep(2e5);
+ Menu_Clear_Buttons(TRUE);
return;
}
@@ -2918,6 +2918,7 @@ void Menu_Check_Buttons(void)
}
}
}
+ Menu_Clear_Buttons(TRUE);
} else if (!(button_port_val & Move_Button)) { /* ----- MOVE BUTTON ----------- */
/* MOVE button hit, move pointer */
if (globals.MenuStatus.Type_Of_Menu==Main_Menu_On && globals.MenuStatus.Nonstd_Display==NO && globals.MenuStatus.Error_Screen==NO) {
@@ -2925,6 +2926,7 @@ void Menu_Check_Buttons(void)
} else if (globals.MenuStatus.Type_Of_Menu==Submenu_On && globals.MenuStatus.Nonstd_Display==NO && globals.MenuStatus.Error_Screen==NO) {
Submenu_Move_Pointer();
}
+ Menu_Clear_Buttons(TRUE);
} else if (!(button_port_val & Mult10_Button)) { /* ----- X10 BUTTON ------------ */
if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !VXI_OR_GPIB_LOCK_ACTIVE) {
if (globals.MenuStatus.Error_Screen==YES) {
@@ -2932,6 +2934,7 @@ void Menu_Check_Buttons(void)
}
queue_error_and_display_on_LCD(Submenu_Mult_Value(10.0));
}
+ Menu_Clear_Buttons(TRUE);
} else if (!(button_port_val & Div10_Button)) { /* ----- /10 BUTTON ------------ */
if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !VXI_OR_GPIB_LOCK_ACTIVE) {
if (globals.MenuStatus.Error_Screen==YES) {
@@ -2939,6 +2942,7 @@ void Menu_Check_Buttons(void)
}
queue_error_and_display_on_LCD(Submenu_Mult_Value(0.1));
}
+ Menu_Clear_Buttons(TRUE);
} else if (!(button_port_val & Plus_Minus_Button)) { /* ----- +/- BUTTON ------------ */
if (globals.MenuStatus.Type_Of_Menu==Submenu_On && !VXI_OR_GPIB_LOCK_ACTIVE) {
if (globals.MenuStatus.Error_Screen==YES) {
@@ -2946,6 +2950,7 @@ void Menu_Check_Buttons(void)
}
queue_error_and_display_on_LCD(Submenu_Mult_Value(-1.0));
}
+ Menu_Clear_Buttons(TRUE);
} 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 && !VXI_OR_GPIB_LOCK_ACTIVE) {
if (Submenu_extra_fine==YES) {
@@ -2958,6 +2963,7 @@ void Menu_Check_Buttons(void)
LCD_write(2,2,"(extra fine adjust)");
}
}
+ Menu_Clear_Buttons(TRUE);
}
/* if none of the buttons are pressed, it must be the encoder */
else if (encoder_change) { /* ----- ENCODER --------------- */