Remove Contrast Menu for U8GLIB_ST7920
The other two devices we use in u8glib have more than only dummy code. Checked this in the library code.
This commit is contained in:
parent
bb917ecda8
commit
bcc04192fc
2 changed files with 12 additions and 12 deletions
|
@ -130,7 +130,6 @@
|
||||||
#define NEWPANEL
|
#define NEWPANEL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef ULTIPANEL
|
#ifdef ULTIPANEL
|
||||||
#define NEWPANEL //enable this if you have a click-encoder panel
|
#define NEWPANEL //enable this if you have a click-encoder panel
|
||||||
#define SDSUPPORT
|
#define SDSUPPORT
|
||||||
|
@ -161,6 +160,13 @@
|
||||||
#define DEFAULT_LCD_CONTRAST 32
|
#define DEFAULT_LCD_CONTRAST 32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DOGLCD
|
||||||
|
#define HAS_LCD_CONTRAST
|
||||||
|
#ifdef U8GLIB_ST7920
|
||||||
|
#undefine HAS_LCD_CONTRAST
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#else // CONFIGURATION_LCD
|
#else // CONFIGURATION_LCD
|
||||||
|
|
||||||
#define CONDITIONALS_H
|
#define CONDITIONALS_H
|
||||||
|
|
|
@ -58,7 +58,7 @@ static void lcd_status_screen();
|
||||||
static void lcd_control_temperature_preheat_abs_settings_menu();
|
static void lcd_control_temperature_preheat_abs_settings_menu();
|
||||||
static void lcd_control_motion_menu();
|
static void lcd_control_motion_menu();
|
||||||
static void lcd_control_volumetric_menu();
|
static void lcd_control_volumetric_menu();
|
||||||
#ifdef DOGLCD
|
#ifdef HAS_LCD_CONTRAST
|
||||||
static void lcd_set_contrast();
|
static void lcd_set_contrast();
|
||||||
#endif
|
#endif
|
||||||
#ifdef FWRETRACT
|
#ifdef FWRETRACT
|
||||||
|
@ -739,7 +739,7 @@ static void lcd_control_menu() {
|
||||||
MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu);
|
MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu);
|
||||||
MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu);
|
MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu);
|
||||||
|
|
||||||
#ifdef DOGLCD
|
#ifdef HAS_LCD_CONTRAST
|
||||||
//MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63);
|
//MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63);
|
||||||
MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast);
|
MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast);
|
||||||
#endif
|
#endif
|
||||||
|
@ -963,8 +963,7 @@ static void lcd_control_volumetric_menu() {
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DOGLCD
|
#ifdef HAS_LCD_CONTRAST
|
||||||
|
|
||||||
static void lcd_set_contrast() {
|
static void lcd_set_contrast() {
|
||||||
if (encoderPosition != 0) {
|
if (encoderPosition != 0) {
|
||||||
lcd_contrast -= encoderPosition;
|
lcd_contrast -= encoderPosition;
|
||||||
|
@ -976,11 +975,9 @@ static void lcd_control_volumetric_menu() {
|
||||||
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
|
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
|
||||||
if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
|
if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
|
||||||
}
|
}
|
||||||
|
#endif // HAS_LCD_CONTRAST
|
||||||
#endif // DOGLCD
|
|
||||||
|
|
||||||
#ifdef FWRETRACT
|
#ifdef FWRETRACT
|
||||||
|
|
||||||
static void lcd_control_retract_menu() {
|
static void lcd_control_retract_menu() {
|
||||||
START_MENU();
|
START_MENU();
|
||||||
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
|
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
|
||||||
|
@ -998,16 +995,13 @@ static void lcd_control_volumetric_menu() {
|
||||||
MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate, 1, 999);
|
MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate, 1, 999);
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // FWRETRACT
|
#endif // FWRETRACT
|
||||||
|
|
||||||
#if SDCARDDETECT == -1
|
#if SDCARDDETECT == -1
|
||||||
|
|
||||||
static void lcd_sd_refresh() {
|
static void lcd_sd_refresh() {
|
||||||
card.initsd();
|
card.initsd();
|
||||||
currentMenuViewOffset = 0;
|
currentMenuViewOffset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void lcd_sd_updir() {
|
static void lcd_sd_updir() {
|
||||||
|
@ -1458,7 +1452,7 @@ void lcd_setalertstatuspgm(const char* message) {
|
||||||
|
|
||||||
void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
void lcd_reset_alert_level() { lcd_status_message_level = 0; }
|
||||||
|
|
||||||
#ifdef DOGLCD
|
#ifdef HAS_LCD_CONTRAST
|
||||||
void lcd_setcontrast(uint8_t value) {
|
void lcd_setcontrast(uint8_t value) {
|
||||||
lcd_contrast = value & 0x3F;
|
lcd_contrast = value & 0x3F;
|
||||||
u8g.setContrast(lcd_contrast);
|
u8g.setContrast(lcd_contrast);
|
||||||
|
|
Reference in a new issue