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
       #define SD_DETECT_INVERTED
65
       #define SD_DETECT_INVERTED
66
     #endif
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
   #endif
68
   #endif
75
 
69
 
76
   // Generic support for SSD1306 / SH1106 OLED based LCDs.
70
   // Generic support for SSD1306 / SH1106 OLED based LCDs.
85
 
79
 
86
   #if ENABLED(BQ_LCD_SMART_CONTROLLER)
80
   #if ENABLED(BQ_LCD_SMART_CONTROLLER)
87
     #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
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
     #ifndef LONG_FILENAME_HOST_SUPPORT
82
     #ifndef LONG_FILENAME_HOST_SUPPORT
97
       #define LONG_FILENAME_HOST_SUPPORT
83
       #define LONG_FILENAME_HOST_SUPPORT
98
     #endif
84
     #endif
145
     #define LCD_I2C_TYPE_MCP23017
131
     #define LCD_I2C_TYPE_MCP23017
146
     #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
132
     #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
147
     #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
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
     #define ULTIPANEL
134
     #define ULTIPANEL
157
     #define NEWPANEL
135
     #define NEWPANEL
158
   #endif
136
   #endif
179
     #endif
157
     #endif
180
   #endif
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
   // Shift register panels
171
   // Shift register panels
183
   // ---------------------
172
   // ---------------------
184
   // 2 wire Non-latching LCD SR from:
173
   // 2 wire Non-latching LCD SR from:

Loading…
Cancel
Save