Browse Source

Give encoder pulse/steps conditionals their own block

Scott Lahteine 7 years ago
parent
commit
1c99ca82d8
1 changed files with 11 additions and 22 deletions
  1. 11
    22
      Marlin/Conditionals_LCD.h

+ 11
- 22
Marlin/Conditionals_LCD.h View File

@@ -65,12 +65,6 @@
65 65
       #define SD_DETECT_INVERTED
66 66
     #endif
67 67
 
68
-    #ifndef ENCODER_PULSES_PER_STEP
69
-      #define ENCODER_PULSES_PER_STEP 4
70
-    #endif
71
-    #ifndef ENCODER_STEPS_PER_MENU_ITEM
72
-      #define ENCODER_STEPS_PER_MENU_ITEM 1
73
-    #endif
74 68
   #endif
75 69
 
76 70
   // Generic support for SSD1306 / SH1106 OLED based LCDs.
@@ -85,14 +79,6 @@
85 79
 
86 80
   #if ENABLED(BQ_LCD_SMART_CONTROLLER)
87 81
     #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
88
-
89
-    #ifndef ENCODER_PULSES_PER_STEP
90
-      #define ENCODER_PULSES_PER_STEP 4
91
-    #endif
92
-    #ifndef ENCODER_STEPS_PER_MENU_ITEM
93
-      #define ENCODER_STEPS_PER_MENU_ITEM 1
94
-    #endif
95
-
96 82
     #ifndef LONG_FILENAME_HOST_SUPPORT
97 83
       #define LONG_FILENAME_HOST_SUPPORT
98 84
     #endif
@@ -145,14 +131,6 @@
145 131
     #define LCD_I2C_TYPE_MCP23017
146 132
     #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
147 133
     #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
148
-
149
-    #ifndef ENCODER_PULSES_PER_STEP
150
-      #define ENCODER_PULSES_PER_STEP 4
151
-    #endif
152
-    #ifndef ENCODER_STEPS_PER_MENU_ITEM
153
-      #define ENCODER_STEPS_PER_MENU_ITEM 1
154
-    #endif
155
-
156 134
     #define ULTIPANEL
157 135
     #define NEWPANEL
158 136
   #endif
@@ -179,6 +157,17 @@
179 157
     #endif
180 158
   #endif
181 159
 
160
+  // Set encoder detents for well-known controllers
161
+  #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
162
+   || ENABLED(BQ_LCD_SMART_CONTROLLER) || ENABLED(LCD_I2C_PANELOLU2) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
163
+    #ifndef ENCODER_PULSES_PER_STEP
164
+      #define ENCODER_PULSES_PER_STEP 4
165
+    #endif
166
+    #ifndef ENCODER_STEPS_PER_MENU_ITEM
167
+      #define ENCODER_STEPS_PER_MENU_ITEM 1
168
+    #endif
169
+  #endif
170
+
182 171
   // Shift register panels
183 172
   // ---------------------
184 173
   // 2 wire Non-latching LCD SR from:

Loading…
Cancel
Save