Ver código fonte

Add UltiController v2.1 support

Add compatibility with the original screen bord from Ultimaker 2 printer (UltiController v2.1 with the PG-2864ALBP I2C display)
Scott Lahteine 7 anos atrás
pai
commit
16739264d3

+ 6
- 0
Marlin/Configuration.h Ver arquivo

1619
 #endif
1619
 #endif
1620
 
1620
 
1621
 //
1621
 //
1622
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
1623
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
1624
+//
1625
+//#define ULTI_CONTROLLER
1626
+
1627
+//
1622
 // CONTROLLER TYPE: Shift register panels
1628
 // CONTROLLER TYPE: Shift register panels
1623
 //
1629
 //
1624
 // 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
1630
 // 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH

+ 16
- 4
Marlin/src/inc/Conditionals_LCD.h Ver arquivo

151
   #define DEFAULT_LCD_CONTRAST 17
151
   #define DEFAULT_LCD_CONTRAST 17
152
 #endif
152
 #endif
153
 
153
 
154
-// Generic support for SSD1306 / SH1106 OLED based LCDs.
155
-#if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
154
+#if ENABLED(ULTI_CONTROLLER)
155
+  #define U8GLIB_SSD1309
156
+  #define REVERSE_ENCODER_DIRECTION
157
+  #define LCD_RESET_PIN LCD_PINS_D6 //  This controller need a reset pin
158
+  #define LCD_CONTRAST_MIN 0
159
+  #define LCD_CONTRAST_MAX 254
160
+  #define DEFAULT_LCD_CONTRAST 127
161
+  #define ENCODER_PULSES_PER_STEP 2
162
+  #define ENCODER_STEPS_PER_MENU_ITEM 2
163
+#endif
164
+
165
+// Generic support for SSD1306 / SSD1309 / SH1106 OLED based LCDs.
166
+#if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SSD1309) || ENABLED(U8GLIB_SH1106)
156
   #define ULTRA_LCD  //general LCD support, also 16x2
167
   #define ULTRA_LCD  //general LCD support, also 16x2
157
-  #define DOGLCD  // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family)
168
+  #define DOGLCD  // Support for I2C LCD 128x64 (Controller SSD1306 / SSD1309 / SH1106 graphic Display Family)
158
 #endif
169
 #endif
159
 
170
 
160
 #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
171
 #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
178
 #if ENABLED(ULTIMAKERCONTROLLER)              \
189
 #if ENABLED(ULTIMAKERCONTROLLER)              \
179
  || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
190
  || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
180
  || ENABLED(G3D_PANEL)                        \
191
  || ENABLED(G3D_PANEL)                        \
181
- || ENABLED(RIGIDBOT_PANEL)
192
+ || ENABLED(RIGIDBOT_PANEL)                   \
193
+ || ENABLED(ULTI_CONTROLLER)
182
   #define ULTIPANEL
194
   #define ULTIPANEL
183
 #endif
195
 #endif
184
 
196
 

+ 3
- 0
Marlin/src/inc/SanityCheck.h Ver arquivo

1426
   #if ENABLED(ZONESTAR_LCD)
1426
   #if ENABLED(ZONESTAR_LCD)
1427
     + 1
1427
     + 1
1428
   #endif
1428
   #endif
1429
+  #if ENABLED(ULTI_CONTROLLER)
1430
+    + 1
1431
+  #endif
1429
   , "Please select no more than one LCD controller option."
1432
   , "Please select no more than one LCD controller option."
1430
 );
1433
 );
1431
 
1434
 

+ 3
- 0
Marlin/src/lcd/ultralcd_impl_DOGM.h Ver arquivo

211
   // Generic support for SH1106 OLED I2C LCDs
211
   // Generic support for SH1106 OLED I2C LCDs
212
     //U8GLIB_SH1106_128X64_2X_I2C_2_WIRE  u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
212
     //U8GLIB_SH1106_128X64_2X_I2C_2_WIRE  u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
213
     U8GLIB_SH1106_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
213
     U8GLIB_SH1106_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
214
+#elif ENABLED(U8GLIB_SSD1309)
215
+  // Generic support for SSD1309 OLED I2C LCDs
216
+  U8GLIB_SSD1309_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST);
214
 #elif ENABLED(MINIPANEL)
217
 #elif ENABLED(MINIPANEL)
215
   // The MINIPanel display
218
   // The MINIPanel display
216
     //U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0);  // 8 stripes
219
     //U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0);  // 8 stripes

Carregando…
Cancelar
Salvar