More functional seperation
Moved SDCARDDETECTINVERTED and SDSLOW to Conditionals.h. Added U8GLIB_LM6059_AF to define display specific actions. Added reminder to compile in u8glib
This commit is contained in:
parent
047e688e93
commit
a83bf18ee1
@ -33,6 +33,9 @@
|
||||
#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
|
||||
|
||||
#define ENCODER_PULSES_PER_STEP 4
|
||||
|
@ -662,7 +662,9 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
|
||||
|
||||
// This is a new controller currently under development. A link to more information will be provided as it
|
||||
// becomes available.
|
||||
//#define ELB_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)
|
||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||
|
@ -126,7 +126,7 @@
|
||||
#elif defined(VIKI2) || defined(miniVIKI)
|
||||
// Mini Viki and Viki 2.0 LCD, ST7565 controller as well
|
||||
U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
|
||||
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
#elif defined(U8GLIB_LM6059_AF)
|
||||
// Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
|
||||
U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
|
||||
#else
|
||||
|
@ -181,12 +181,10 @@
|
||||
#define LCD_SDSS 53
|
||||
#define SDCARDDETECT 49
|
||||
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
#define BTN_EN1 35
|
||||
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
|
||||
#define BTN_EN2 37
|
||||
#define BTN_ENC 31
|
||||
#define SDCARDDETECT 49
|
||||
#define SDCARDDETECTINVERTED
|
||||
#define SDSLOW
|
||||
#define LCD_SDSS 53
|
||||
#define KILL_PIN 41
|
||||
#define BEEPER 23
|
||||
|
@ -1110,23 +1110,24 @@ static void lcd_control_volumetric_menu() {
|
||||
#ifdef HAS_LCD_CONTRAST
|
||||
static void lcd_set_contrast() {
|
||||
if (encoderPosition != 0) {
|
||||
#ifdef ELB_FULL_GRAPHIC_CONTROLLER
|
||||
lcd_contrast += encoderPosition;
|
||||
lcd_contrast &= 0xFF;
|
||||
#else
|
||||
lcd_contrast -= encoderPosition;
|
||||
lcd_contrast &= 0x3F;
|
||||
#endif
|
||||
#ifdef U8GLIB_ST7920
|
||||
lcd_contrast += encoderPosition;
|
||||
lcd_contrast &= 0xFF;
|
||||
#else
|
||||
lcd_contrast -= encoderPosition;
|
||||
lcd_contrast &= 0x3F;
|
||||
#endif
|
||||
encoderPosition = 0;
|
||||
lcdDrawUpdate = 1;
|
||||
u8g.setContrast(lcd_contrast);
|
||||
}
|
||||
if (lcdDrawUpdate)
|
||||
#ifdef ELB_FULL_GRAPHIC_CONTROLLER
|
||||
lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr3(lcd_contrast));
|
||||
#else
|
||||
lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
|
||||
#endif
|
||||
if (lcdDrawUpdate) {
|
||||
#ifdef U8GLIB_ST7920
|
||||
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);
|
||||
}
|
||||
#endif // HAS_LCD_CONTRAST
|
||||
|
Loading…
Reference in New Issue
Block a user