Browse Source

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
pull/1/head
Ed Boston 9 years ago
parent
commit
a83bf18ee1
  1. 3
      Marlin/Conditionals.h
  2. 4
      Marlin/Configuration.h
  3. 2
      Marlin/dogm_lcd_implementation.h
  4. 4
      Marlin/pins_RAMPS_13.h
  5. 27
      Marlin/ultralcd.cpp

3
Marlin/Conditionals.h

@ -33,6 +33,9 @@
#define DEFAULT_LCD_CONTRAST 40 #define DEFAULT_LCD_CONTRAST 40
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER) #elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
#define DEFAULT_LCD_CONTRAST 110 #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

4
Marlin/Configuration.h

@ -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 // This is a new controller currently under development. A link to more information will be provided as it
// becomes available. // 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) // The RepRapDiscount Smart Controller (white PCB)
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller // http://reprap.org/wiki/RepRapDiscount_Smart_Controller

2
Marlin/dogm_lcd_implementation.h

@ -126,7 +126,7 @@
#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(ELB_FULL_GRAPHIC_CONTROLLER) #elif defined(U8GLIB_LM6059_AF)
// Based on the Adafruit ST7565 (http://www.adafruit.com/products/250) // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0); U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
#else #else

4
Marlin/pins_RAMPS_13.h

@ -181,12 +181,10 @@
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SDCARDDETECT 49 #define SDCARDDETECT 49
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER) #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_EN2 37
#define BTN_ENC 31 #define BTN_ENC 31
#define SDCARDDETECT 49 #define SDCARDDETECT 49
#define SDCARDDETECTINVERTED
#define SDSLOW
#define LCD_SDSS 53 #define LCD_SDSS 53
#define KILL_PIN 41 #define KILL_PIN 41
#define BEEPER 23 #define BEEPER 23

27
Marlin/ultralcd.cpp

@ -1110,23 +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 ELB_FULL_GRAPHIC_CONTROLLER #ifdef U8GLIB_ST7920
lcd_contrast += encoderPosition; lcd_contrast += encoderPosition;
lcd_contrast &= 0xFF; lcd_contrast &= 0xFF;
#else #else
lcd_contrast -= encoderPosition; lcd_contrast -= encoderPosition;
lcd_contrast &= 0x3F; lcd_contrast &= 0x3F;
#endif #endif
encoderPosition = 0; encoderPosition = 0;
lcdDrawUpdate = 1; lcdDrawUpdate = 1;
u8g.setContrast(lcd_contrast); u8g.setContrast(lcd_contrast);
} }
if (lcdDrawUpdate) if (lcdDrawUpdate) {
#ifdef ELB_FULL_GRAPHIC_CONTROLLER #ifdef U8GLIB_ST7920
lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr3(lcd_contrast)); lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr3(lcd_contrast));
#else #else
lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast)); lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
#endif #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

Loading…
Cancel
Save