Browse Source

Fix ENCODER_PULSES_PER_STEP for G3D_PANEL

Scott Lahteine 7 years ago
parent
commit
7a29f802d0
3 changed files with 32 additions and 31 deletions
  1. 30
    15
      Marlin/src/inc/Conditionals_LCD.h
  2. 0
    10
      Marlin/src/lcd/ultralcd.cpp
  3. 2
    6
      Marlin/src/pins/pins_ANET_10.h

+ 30
- 15
Marlin/src/inc/Conditionals_LCD.h View File

@@ -195,23 +195,38 @@
195 195
 
196 196
     #define ENCODER_FEEDRATE_DEADZONE 4
197 197
 
198
-    #ifndef ENCODER_PULSES_PER_STEP
199
-      #define ENCODER_PULSES_PER_STEP 1
200
-    #endif
201
-    #ifndef ENCODER_STEPS_PER_MENU_ITEM
202
-      #define ENCODER_STEPS_PER_MENU_ITEM 2
203
-    #endif
198
+    #define STD_ENCODER_PULSES_PER_STEP 1
199
+    #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
200
+
201
+  #elif ENABLED(G3D_PANEL)
202
+
203
+    #define STD_ENCODER_PULSES_PER_STEP 2
204
+    #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
205
+
206
+  #elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
207
+     || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
208
+     || ENABLED(OLED_PANEL_TINYBOY2) \
209
+     || ENABLED(BQ_LCD_SMART_CONTROLLER) \
210
+     || ENABLED(LCD_I2C_PANELOLU2) \
211
+     || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
212
+    #define STD_ENCODER_PULSES_PER_STEP 4
213
+    #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
204 214
   #endif
205 215
 
206
-  // Set encoder detents for well-known controllers
207
-  #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(OLED_PANEL_TINYBOY2) \
208
-   || ENABLED(BQ_LCD_SMART_CONTROLLER) || ENABLED(LCD_I2C_PANELOLU2) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
209
-    #ifndef ENCODER_PULSES_PER_STEP
210
-      #define ENCODER_PULSES_PER_STEP 4
211
-    #endif
212
-    #ifndef ENCODER_STEPS_PER_MENU_ITEM
213
-      #define ENCODER_STEPS_PER_MENU_ITEM 1
214
-    #endif
216
+  #ifndef STD_ENCODER_PULSES_PER_STEP
217
+    #define STD_ENCODER_PULSES_PER_STEP 5
218
+  #endif
219
+  #ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
220
+    #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
221
+  #endif
222
+  #ifndef ENCODER_PULSES_PER_STEP
223
+    #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
224
+  #endif
225
+  #ifndef ENCODER_STEPS_PER_MENU_ITEM
226
+    #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
227
+  #endif
228
+  #ifndef ENCODER_FEEDRATE_DEADZONE
229
+    #define ENCODER_FEEDRATE_DEADZONE 6
215 230
   #endif
216 231
 
217 232
   // Shift register panels

+ 0
- 10
Marlin/src/lcd/ultralcd.cpp View File

@@ -247,16 +247,6 @@ uint16_t max_display_update_time = 0;
247 247
   //////////// Menu System Macros ////////////
248 248
   ////////////////////////////////////////////
249 249
 
250
-  #ifndef ENCODER_FEEDRATE_DEADZONE
251
-    #define ENCODER_FEEDRATE_DEADZONE 10
252
-  #endif
253
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
254
-    #define ENCODER_STEPS_PER_MENU_ITEM 5
255
-  #endif
256
-  #ifndef ENCODER_PULSES_PER_STEP
257
-    #define ENCODER_PULSES_PER_STEP 1
258
-  #endif
259
-
260 250
   /**
261 251
    * MENU_ITEM generates draw & handler code for a menu item, potentially calling:
262 252
    *

+ 2
- 6
Marlin/src/pins/pins_ANET_10.h View File

@@ -182,12 +182,8 @@
182 182
     #define ST7920_DELAY_1 DELAY_0_NOP
183 183
     #define ST7920_DELAY_2 DELAY_1_NOP
184 184
     #define ST7920_DELAY_3 DELAY_2_NOP
185
-    #ifndef ENCODER_STEPS_PER_MENU_ITEM
186
-      #define ENCODER_STEPS_PER_MENU_ITEM 1
187
-    #endif
188
-    #ifndef ENCODER_PULSES_PER_STEP
189
-      #define ENCODER_PULSES_PER_STEP 4
190
-    #endif
185
+    #define STD_ENCODER_PULSES_PER_STEP 4
186
+    #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
191 187
   #endif
192 188
 #endif  // ULTRA_LCD && NEWPANEL
193 189
 

Loading…
Cancel
Save