Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADAFRUIT_ST7565 #2105

Merged
merged 7 commits into from
May 20, 2015
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Marlin/Conditionals.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@
#define NEWPANEL
#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 DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.

#ifdef miniVIKI
#define DEFAULT_LCD_CONTRAST 95
#else
#elif defined(VIKI2)
#define DEFAULT_LCD_CONTRAST 40
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
#define DEFAULT_LCD_CONTRAST 110
#endif

#define ENCODER_PULSES_PER_STEP 4
Expand Down
4 changes: 4 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,10 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
//#define VIKI2
//#define miniVIKI

// This is a new controller currently under development. A link to more information will be provided as it
// becomes available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When will it be available?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about right now? I just updated Configuration.h with the link.

//#define ELB_FULL_GRAPHIC_CONTROLLER

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Propagate these changes to the rest of the Configuration.h files to complete this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changes are you referring to?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forget that line notes aren't always displayed with the lines they refer to.

// The RepRapDiscount Smart Controller (white PCB)
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
Expand Down
3 changes: 3 additions & 0 deletions Marlin/dogm_lcd_implementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
#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)
// Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
#else
// for regular DOGM128 display with HW-SPI
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
Expand Down
14 changes: 13 additions & 1 deletion Marlin/pins_RAMPS_13.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,19 @@
#define BTN_ENC -1
#define LCD_SDSS 53
#define SDCARDDETECT 49
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35
#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
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_PIN_BL 33
#else
// arduino pin which triggers an piezzo beeper
#define BEEPER 33 // Beeper on AUX-4
Expand Down Expand Up @@ -209,7 +222,6 @@
#endif

#endif

#else // Old-style panel with shift register
// Arduino pin witch triggers an piezzo beeper
#define BEEPER 33 // No Beeper added
Expand Down
12 changes: 11 additions & 1 deletion Marlin/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,13 +1110,23 @@ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor syntactical thing. Compiler directives should be part of the cascade too. This is so that naïve text editors can do code folding properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what is it you are suggesting that should be changed here?

lcd_contrast -= encoderPosition;
lcd_contrast &= 0x3F;
#endif
encoderPosition = 0;
lcdDrawUpdate = 1;
u8g.setContrast(lcd_contrast);
}
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(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 (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
}
#endif // HAS_LCD_CONTRAST
Expand Down