Commit f754b62b authored by Simone's avatar Simone

Update ultralcd.cpp

Add the menu for the LCD Contrast only if is a declared pin
parent ba8f964e
......@@ -69,7 +69,7 @@ static void lcd_control_temperature_preheat_abs_settings_menu();
static void lcd_control_temperature_preheat_gum_settings_menu();
static void lcd_control_motion_menu();
static void lcd_control_volumetric_menu();
#ifdef DOGLCD
#if defined(DOGLCD) && LCD_CONTRAST >= 0
static void lcd_set_contrast();
#endif
static void lcd_control_retract_menu();
......@@ -800,8 +800,8 @@ static void lcd_control_menu() {
MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu);
MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu);
MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu);
#ifdef DOGLCD
#if defined(DOGLCD) && LCD_CONTRAST >= 0
//MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63);
MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast);
#endif
......@@ -1041,7 +1041,7 @@ static void lcd_control_volumetric_menu() {
END_MENU();
}
#ifdef DOGLCD
#if defined(DOGLCD) && LCD_CONTRAST >= 0
static void lcd_set_contrast() {
if (encoderPosition != 0) {
......@@ -1487,7 +1487,7 @@ void lcd_setalertstatuspgm(const char* message) {
void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#ifdef DOGLCD
#if defined(DOGLCD) && LCD_CONTRAST >= 0
void lcd_setcontrast(uint8_t value) {
lcd_contrast = value & 63;
u8g.setContrast(lcd_contrast);
......@@ -1915,3 +1915,4 @@ void copy_and_scalePID_d()
}
#endif //ULTRA_LCD
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment