Merge pull request #2105 from eboston/Development
Add ELB_FULL_GRAPHIC_CONTROLLER with ADAFRUIT_ST7565 display.
This commit is contained in:
commit
06513565e9
17 changed files with 100 additions and 6 deletions
|
@ -22,15 +22,20 @@
|
||||||
#define NEWPANEL
|
#define NEWPANEL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(miniVIKI) || defined(VIKI2)
|
#if defined(miniVIKI) || defined(VIKI2) || defined(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||||
#define ULTRA_LCD //general LCD support, also 16x2
|
#define ULTRA_LCD //general LCD support, also 16x2
|
||||||
#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
||||||
#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
||||||
|
|
||||||
#ifdef miniVIKI
|
#ifdef miniVIKI
|
||||||
#define DEFAULT_LCD_CONTRAST 95
|
#define DEFAULT_LCD_CONTRAST 95
|
||||||
#else
|
#elif defined(VIKI2)
|
||||||
#define DEFAULT_LCD_CONTRAST 40
|
#define DEFAULT_LCD_CONTRAST 40
|
||||||
|
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||||
|
#define DEFAULT_LCD_CONTRAST 110
|
||||||
|
#define SDCARDDETECTINVERTED
|
||||||
|
#define SDSLOW
|
||||||
|
#define U8GLIB_LM6059_AF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ENCODER_PULSES_PER_STEP 4
|
#define ENCODER_PULSES_PER_STEP 4
|
||||||
|
|
|
@ -660,6 +660,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -661,6 +661,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -126,6 +126,9 @@
|
||||||
#elif defined(VIKI2) || defined(miniVIKI)
|
#elif defined(VIKI2) || defined(miniVIKI)
|
||||||
// Mini Viki and Viki 2.0 LCD, ST7565 controller as well
|
// Mini Viki and Viki 2.0 LCD, ST7565 controller as well
|
||||||
U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
|
U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
|
||||||
|
#elif defined(U8GLIB_LM6059_AF)
|
||||||
|
// Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
|
||||||
|
U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
|
||||||
#else
|
#else
|
||||||
// for regular DOGM128 display with HW-SPI
|
// for regular DOGM128 display with HW-SPI
|
||||||
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
|
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
|
||||||
|
|
|
@ -595,6 +595,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -615,6 +615,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -678,6 +678,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -661,6 +661,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -646,6 +646,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -614,6 +614,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -660,6 +660,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -663,6 +663,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -667,6 +667,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -614,6 +614,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -620,6 +620,11 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
|
||||||
//#define VIKI2
|
//#define VIKI2
|
||||||
//#define miniVIKI
|
//#define miniVIKI
|
||||||
|
|
||||||
|
// This is a new controller currently under development. https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
|
||||||
|
//
|
||||||
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
|
//#define ELB_FULL_GRAPHIC_CONTROLLER
|
||||||
|
|
||||||
// The RepRapDiscount Smart Controller (white PCB)
|
// The RepRapDiscount Smart Controller (white PCB)
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
|
@ -180,6 +180,17 @@
|
||||||
#define BTN_ENC -1
|
#define BTN_ENC -1
|
||||||
#define LCD_SDSS 53
|
#define LCD_SDSS 53
|
||||||
#define SDCARDDETECT 49
|
#define SDCARDDETECT 49
|
||||||
|
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||||
|
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
|
||||||
|
#define BTN_EN2 37
|
||||||
|
#define BTN_ENC 31
|
||||||
|
#define SDCARDDETECT 49
|
||||||
|
#define LCD_SDSS 53
|
||||||
|
#define KILL_PIN 41
|
||||||
|
#define BEEPER 23
|
||||||
|
#define DOGLCD_CS 29
|
||||||
|
#define DOGLCD_A0 27
|
||||||
|
#define LCD_PIN_BL 33
|
||||||
#else
|
#else
|
||||||
// arduino pin which triggers an piezzo beeper
|
// arduino pin which triggers an piezzo beeper
|
||||||
#define BEEPER 33 // Beeper on AUX-4
|
#define BEEPER 33 // Beeper on AUX-4
|
||||||
|
@ -209,7 +220,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else // Old-style panel with shift register
|
#else // Old-style panel with shift register
|
||||||
// Arduino pin witch triggers an piezzo beeper
|
// Arduino pin witch triggers an piezzo beeper
|
||||||
#define BEEPER 33 // No Beeper added
|
#define BEEPER 33 // No Beeper added
|
||||||
|
|
|
@ -1110,13 +1110,24 @@ static void lcd_control_volumetric_menu() {
|
||||||
#ifdef HAS_LCD_CONTRAST
|
#ifdef HAS_LCD_CONTRAST
|
||||||
static void lcd_set_contrast() {
|
static void lcd_set_contrast() {
|
||||||
if (encoderPosition != 0) {
|
if (encoderPosition != 0) {
|
||||||
|
#ifdef U8GLIB_LM6059_AF
|
||||||
|
lcd_contrast += encoderPosition;
|
||||||
|
lcd_contrast &= 0xFF;
|
||||||
|
#else
|
||||||
lcd_contrast -= encoderPosition;
|
lcd_contrast -= encoderPosition;
|
||||||
lcd_contrast &= 0x3F;
|
lcd_contrast &= 0x3F;
|
||||||
|
#endif
|
||||||
encoderPosition = 0;
|
encoderPosition = 0;
|
||||||
lcdDrawUpdate = 1;
|
lcdDrawUpdate = 1;
|
||||||
u8g.setContrast(lcd_contrast);
|
u8g.setContrast(lcd_contrast);
|
||||||
}
|
}
|
||||||
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
|
if (lcdDrawUpdate) {
|
||||||
|
#ifdef U8GLIB_LM6059_AF
|
||||||
|
lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr3(lcd_contrast));
|
||||||
|
#else
|
||||||
|
lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
|
if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
|
||||||
}
|
}
|
||||||
#endif // HAS_LCD_CONTRAST
|
#endif // HAS_LCD_CONTRAST
|
||||||
|
|
Reference in a new issue