Browse Source

Optimize menu selection for Viki rotary encoder.

The Viki LCD rotary encoder uses a different number of steps per
rotation. This fixes the seeming "missed" steps when selecting a menu.
Robert F-C 12 years ago
parent
commit
015d0594b0
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      Marlin/ultralcd.cpp

+ 5
- 1
Marlin/ultralcd.cpp View File

@@ -76,7 +76,11 @@ static void menu_action_setting_edit_callback_float51(const char* pstr, float* p
76 76
 static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
77 77
 static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue, menuFunc_t callbackFunc);
78 78
 
79
-#define ENCODER_STEPS_PER_MENU_ITEM 5
79
+#if !defined(LCD_I2C_VIKI)
80
+  #define ENCODER_STEPS_PER_MENU_ITEM 5
81
+#else
82
+  #define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation
83
+#endif
80 84
 
81 85
 /* Helper macros for menus */
82 86
 #define START_MENU() do { \

Loading…
Cancel
Save