Add NO_LCD_MENUS to display only the Status Screen
This commit is contained in:
parent
f4a7531ccb
commit
1025066ab1
@ -367,6 +367,11 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(NO_LCD_MENUS)
|
||||||
|
#undef ULTIPANEL
|
||||||
|
#undef NEWPANEL
|
||||||
|
#endif
|
||||||
|
|
||||||
// Boot screens
|
// Boot screens
|
||||||
#if DISABLED(ULTRA_LCD)
|
#if DISABLED(ULTRA_LCD)
|
||||||
#undef SHOW_BOOTSCREEN
|
#undef SHOW_BOOTSCREEN
|
||||||
@ -374,7 +379,7 @@
|
|||||||
#define BOOTSCREEN_TIMEOUT 2500
|
#define BOOTSCREEN_TIMEOUT 2500
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST)
|
#define HAS_DEBUG_MENU (ENABLED(ULTIPANEL) && ENABLED(LCD_PROGRESS_BAR_TEST))
|
||||||
|
|
||||||
// MK2 Multiplexer forces SINGLENOZZLE and kills DISABLE_INACTIVE_EXTRUDER
|
// MK2 Multiplexer forces SINGLENOZZLE and kills DISABLE_INACTIVE_EXTRUDER
|
||||||
#if ENABLED(MK2_MULTIPLEXER)
|
#if ENABLED(MK2_MULTIPLEXER)
|
||||||
|
@ -1392,6 +1392,15 @@
|
|||||||
*/
|
*/
|
||||||
//#define SD_CHECK_AND_RETRY
|
//#define SD_CHECK_AND_RETRY
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LCD Menu Items
|
||||||
|
*
|
||||||
|
* Disable all menus and only display the Status Screen, or
|
||||||
|
* just remove some extraneous menu items to recover space.
|
||||||
|
*/
|
||||||
|
//#define NO_LCD_MENUS
|
||||||
|
//#define SLIM_LCD_MENUS
|
||||||
|
|
||||||
//
|
//
|
||||||
// ENCODER SETTINGS
|
// ENCODER SETTINGS
|
||||||
//
|
//
|
||||||
|
@ -493,9 +493,6 @@
|
|||||||
// Include a page of printer information in the LCD Main Menu
|
// Include a page of printer information in the LCD Main Menu
|
||||||
//#define LCD_INFO_MENU
|
//#define LCD_INFO_MENU
|
||||||
|
|
||||||
// Leave out seldom-used LCD menu items to recover some Program Memory
|
|
||||||
//#define SLIM_LCD_MENUS
|
|
||||||
|
|
||||||
// Scroll a longer status message into view
|
// Scroll a longer status message into view
|
||||||
//#define STATUS_MESSAGE_SCROLLING
|
//#define STATUS_MESSAGE_SCROLLING
|
||||||
|
|
||||||
|
@ -486,7 +486,9 @@
|
|||||||
if (g26_bed_temp > 25) {
|
if (g26_bed_temp > 25) {
|
||||||
lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
|
lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
|
||||||
lcd_quick_feedback(true);
|
lcd_quick_feedback(true);
|
||||||
lcd_external_control = true;
|
#if ENABLED(NEWPANEL)
|
||||||
|
lcd_external_control = true;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
thermalManager.setTargetBed(g26_bed_temp);
|
thermalManager.setTargetBed(g26_bed_temp);
|
||||||
while (abs(thermalManager.degBed() - g26_bed_temp) > 3) {
|
while (abs(thermalManager.degBed() - g26_bed_temp) > 3) {
|
||||||
@ -732,7 +734,7 @@
|
|||||||
move_to(destination, 0.0);
|
move_to(destination, 0.0);
|
||||||
move_to(destination, g26_ooze_amount);
|
move_to(destination, g26_ooze_amount);
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if ENABLED(NEWPANEL)
|
||||||
lcd_external_control = true;
|
lcd_external_control = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -836,7 +838,7 @@
|
|||||||
move_to(destination, 0); // Move back to the starting position
|
move_to(destination, 0); // Move back to the starting position
|
||||||
//debug_current_and_destination(PSTR("done doing X/Y move."));
|
//debug_current_and_destination(PSTR("done doing X/Y move."));
|
||||||
|
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if ENABLED(NEWPANEL)
|
||||||
lcd_external_control = false; // Give back control of the LCD Panel!
|
lcd_external_control = false; // Give back control of the LCD Panel!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -49,9 +49,6 @@
|
|||||||
void _lcd_ubl_output_map_lcd();
|
void _lcd_ubl_output_map_lcd();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern float meshedit_done;
|
|
||||||
extern long babysteps_done;
|
|
||||||
|
|
||||||
#define SIZE_OF_LITTLE_RAISE 1
|
#define SIZE_OF_LITTLE_RAISE 1
|
||||||
#define BIG_RAISE_NOT_NEEDED 0
|
#define BIG_RAISE_NOT_NEEDED 0
|
||||||
|
|
||||||
|
@ -61,33 +61,10 @@
|
|||||||
#include "fwretract.h"
|
#include "fwretract.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
|
|
||||||
bool lcd_external_control; // = false
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
#include "power_loss_recovery.h"
|
#include "power_loss_recovery.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Initialized by settings.load()
|
|
||||||
int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
|
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
|
||||||
millis_t previous_lcd_status_ms = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(BABYSTEPPING)
|
|
||||||
long babysteps_done = 0;
|
|
||||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
|
||||||
static void lcd_babystep_zoffset();
|
|
||||||
#else
|
|
||||||
static void lcd_babystep_z();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t lcd_status_update_delay = 1, // First update one loop delayed
|
|
||||||
lcd_status_message_level; // Higher level blocks lower level
|
|
||||||
|
|
||||||
#if ENABLED(STATUS_MESSAGE_SCROLLING)
|
#if ENABLED(STATUS_MESSAGE_SCROLLING)
|
||||||
#if LONG_FILENAME_LENGTH > CHARSIZE * 2 * (LCD_WIDTH)
|
#if LONG_FILENAME_LENGTH > CHARSIZE * 2 * (LCD_WIDTH)
|
||||||
#define MAX_MESSAGE_LENGTH LONG_FILENAME_LENGTH
|
#define MAX_MESSAGE_LENGTH LONG_FILENAME_LENGTH
|
||||||
@ -100,8 +77,14 @@ uint8_t lcd_status_update_delay = 1, // First update one loop delayed
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
char lcd_status_message[MAX_MESSAGE_LENGTH + 1];
|
char lcd_status_message[MAX_MESSAGE_LENGTH + 1];
|
||||||
|
uint8_t lcd_status_update_delay = 1, // First update one loop delayed
|
||||||
|
lcd_status_message_level; // Higher level blocks lower level
|
||||||
|
|
||||||
#if ENABLED(SCROLL_LONG_FILENAMES)
|
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
||||||
|
millis_t previous_lcd_status_ms = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(ULTIPANEL) && ENABLED(SCROLL_LONG_FILENAMES)
|
||||||
uint8_t filename_scroll_pos, filename_scroll_max, filename_scroll_hash;
|
uint8_t filename_scroll_pos, filename_scroll_max, filename_scroll_hash;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -112,11 +95,23 @@ char lcd_status_message[MAX_MESSAGE_LENGTH + 1];
|
|||||||
#if ENABLED(DOGLCD)
|
#if ENABLED(DOGLCD)
|
||||||
#include "ultralcd_impl_DOGM.h"
|
#include "ultralcd_impl_DOGM.h"
|
||||||
#include <U8glib.h>
|
#include <U8glib.h>
|
||||||
|
bool drawing_screen, // = false
|
||||||
|
first_page;
|
||||||
#else
|
#else
|
||||||
#include "ultralcd_impl_HD44780.h"
|
#include "ultralcd_impl_HD44780.h"
|
||||||
|
constexpr bool first_page = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// The main status screen
|
||||||
|
void lcd_status_screen();
|
||||||
|
|
||||||
|
millis_t next_lcd_update_ms;
|
||||||
|
|
||||||
|
uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to draw, decrements after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial)
|
||||||
|
uint16_t max_display_update_time = 0;
|
||||||
|
|
||||||
#if ENABLED(ULTIPANEL)
|
#if ENABLED(ULTIPANEL)
|
||||||
|
|
||||||
#define DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(_type, _name, _strFunc) \
|
#define DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(_type, _name, _strFunc) \
|
||||||
inline void lcd_implementation_drawmenu_setting_edit_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
|
inline void lcd_implementation_drawmenu_setting_edit_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
|
||||||
UNUSED(pstr2); \
|
UNUSED(pstr2); \
|
||||||
@ -144,29 +139,6 @@ char lcd_status_message[MAX_MESSAGE_LENGTH + 1];
|
|||||||
#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) DRAW_BOOL_SETTING(sel, row, pstr, data)
|
#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) DRAW_BOOL_SETTING(sel, row, pstr, data)
|
||||||
#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) DRAW_BOOL_SETTING(sel, row, pstr, data)
|
#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) DRAW_BOOL_SETTING(sel, row, pstr, data)
|
||||||
#define lcd_implementation_drawmenu_setting_edit_accessor_bool(sel, row, pstr, pstr2, pget, pset) DRAW_BOOL_SETTING(sel, row, pstr, data)
|
#define lcd_implementation_drawmenu_setting_edit_accessor_bool(sel, row, pstr, pstr2, pget, pset) DRAW_BOOL_SETTING(sel, row, pstr, data)
|
||||||
#endif // ULTIPANEL
|
|
||||||
|
|
||||||
// The main status screen
|
|
||||||
void lcd_status_screen();
|
|
||||||
|
|
||||||
millis_t next_lcd_update_ms;
|
|
||||||
|
|
||||||
uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to draw, decrements after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial)
|
|
||||||
uint16_t max_display_update_time = 0;
|
|
||||||
|
|
||||||
#if ENABLED(DOGLCD)
|
|
||||||
bool drawing_screen, // = false
|
|
||||||
first_page;
|
|
||||||
#else
|
|
||||||
constexpr bool first_page = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(DAC_STEPPER_CURRENT)
|
|
||||||
#include "stepper_dac.h" //was dac_mcp4728.h MarlinMain uses stepper dac for the m-codes
|
|
||||||
uint8_t driverPercent[XYZE];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(ULTIPANEL)
|
|
||||||
|
|
||||||
#ifndef TALL_FONT_CORRECTION
|
#ifndef TALL_FONT_CORRECTION
|
||||||
#define TALL_FONT_CORRECTION 0
|
#define TALL_FONT_CORRECTION 0
|
||||||
@ -175,6 +147,27 @@ uint16_t max_display_update_time = 0;
|
|||||||
bool no_reentry = false;
|
bool no_reentry = false;
|
||||||
constexpr int8_t menu_bottom = LCD_HEIGHT - (TALL_FONT_CORRECTION);
|
constexpr int8_t menu_bottom = LCD_HEIGHT - (TALL_FONT_CORRECTION);
|
||||||
|
|
||||||
|
// Initialized by settings.load()
|
||||||
|
int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
|
||||||
|
|
||||||
|
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
|
||||||
|
bool lcd_external_control; // = false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(BABYSTEPPING)
|
||||||
|
long babysteps_done = 0;
|
||||||
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||||
|
static void lcd_babystep_zoffset();
|
||||||
|
#else
|
||||||
|
static void lcd_babystep_z();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(DAC_STEPPER_CURRENT)
|
||||||
|
#include "stepper_dac.h" //was dac_mcp4728.h MarlinMain uses stepper dac for the m-codes
|
||||||
|
uint8_t driverPercent[XYZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
///////////////// Menu Tree ////////////////
|
///////////////// Menu Tree ////////////////
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
@ -780,36 +773,41 @@ void kill_screen(const char* lcd_msg) {
|
|||||||
lcd_kill_screen();
|
lcd_kill_screen();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(ULTIPANEL)
|
/**
|
||||||
|
*
|
||||||
|
* Audio feedback for controller clicks
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void lcd_buzz(const long duration, const uint16_t freq) {
|
||||||
|
#if ENABLED(LCD_USE_I2C_BUZZER)
|
||||||
|
lcd.buzz(duration, freq);
|
||||||
|
#elif PIN_EXISTS(BEEPER)
|
||||||
|
buzzer.tone(duration, freq);
|
||||||
|
#else
|
||||||
|
UNUSED(duration); UNUSED(freq);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
void lcd_quick_feedback(const bool clear_buttons) {
|
||||||
*
|
lcd_refresh();
|
||||||
* Audio feedback for controller clicks
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void lcd_buzz(const long duration, const uint16_t freq) {
|
|
||||||
#if ENABLED(LCD_USE_I2C_BUZZER)
|
|
||||||
lcd.buzz(duration, freq);
|
|
||||||
#elif PIN_EXISTS(BEEPER)
|
|
||||||
buzzer.tone(duration, freq);
|
|
||||||
#else
|
|
||||||
UNUSED(duration); UNUSED(freq);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_quick_feedback(const bool clear_buttons) {
|
#if ENABLED(ULTIPANEL)
|
||||||
lcd_refresh();
|
|
||||||
if (clear_buttons) buttons = 0;
|
if (clear_buttons) buttons = 0;
|
||||||
next_button_update_ms = millis() + 500;
|
next_button_update_ms = millis() + 500;
|
||||||
|
#else
|
||||||
|
UNUSED(clear_buttons);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Buzz and wait. The delay is needed for buttons to settle!
|
// Buzz and wait. The delay is needed for buttons to settle!
|
||||||
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
|
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
|
||||||
#if ENABLED(LCD_USE_I2C_BUZZER)
|
#if ENABLED(LCD_USE_I2C_BUZZER)
|
||||||
delay(10);
|
delay(10);
|
||||||
#elif PIN_EXISTS(BEEPER)
|
#elif PIN_EXISTS(BEEPER)
|
||||||
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
|
for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); }
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLED(ULTIPANEL)
|
||||||
|
|
||||||
void lcd_completion_feedback(const bool good/*=true*/) {
|
void lcd_completion_feedback(const bool good/*=true*/) {
|
||||||
if (good) {
|
if (good) {
|
||||||
@ -5251,7 +5249,7 @@ void lcd_update() {
|
|||||||
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
|
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(SCROLL_LONG_FILENAMES)
|
#if ENABLED(ULTIPANEL) && ENABLED(SCROLL_LONG_FILENAMES)
|
||||||
// If scrolling of long file names is enabled and we are in the sd card menu,
|
// If scrolling of long file names is enabled and we are in the sd card menu,
|
||||||
// cause a refresh to occur until all the text has scrolled into view.
|
// cause a refresh to occur until all the text has scrolled into view.
|
||||||
if (currentScreen == lcd_sdcard_menu && filename_scroll_pos < filename_scroll_max && !lcd_status_update_delay--) {
|
if (currentScreen == lcd_sdcard_menu && filename_scroll_pos < filename_scroll_max && !lcd_status_update_delay--) {
|
||||||
|
@ -41,20 +41,6 @@
|
|||||||
|
|
||||||
#include "Marlin.h"
|
#include "Marlin.h"
|
||||||
|
|
||||||
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
|
|
||||||
extern bool lcd_external_control;
|
|
||||||
#else
|
|
||||||
constexpr bool lcd_external_control = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
|
|
||||||
|
|
||||||
#if ENABLED(LCD_BED_LEVELING)
|
|
||||||
extern bool lcd_wait_for_move;
|
|
||||||
#else
|
|
||||||
constexpr bool lcd_wait_for_move = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int16_t lcd_strlen(const char* s);
|
int16_t lcd_strlen(const char* s);
|
||||||
int16_t lcd_strlen_P(const char* s);
|
int16_t lcd_strlen_P(const char* s);
|
||||||
bool lcd_hasstatus();
|
bool lcd_hasstatus();
|
||||||
@ -74,6 +60,8 @@
|
|||||||
void lcd_buzz(const long duration, const uint16_t freq);
|
void lcd_buzz(const long duration, const uint16_t freq);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void lcd_quick_feedback(const bool clear_buttons); // Audible feedback for a button click - could also be visual
|
||||||
|
|
||||||
#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
|
#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
|
||||||
void dontExpireStatus();
|
void dontExpireStatus();
|
||||||
#endif
|
#endif
|
||||||
@ -107,6 +95,20 @@
|
|||||||
typedef void (*screenFunc_t)();
|
typedef void (*screenFunc_t)();
|
||||||
typedef void (*menuAction_t)();
|
typedef void (*menuAction_t)();
|
||||||
|
|
||||||
|
extern int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
|
||||||
|
|
||||||
|
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(G26_MESH_VALIDATION)
|
||||||
|
extern bool lcd_external_control;
|
||||||
|
#else
|
||||||
|
constexpr bool lcd_external_control = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(LCD_BED_LEVELING)
|
||||||
|
extern bool lcd_wait_for_move;
|
||||||
|
#else
|
||||||
|
constexpr bool lcd_wait_for_move = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0);
|
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0);
|
||||||
|
|
||||||
// Encoder click is directly connected
|
// Encoder click is directly connected
|
||||||
@ -130,7 +132,6 @@
|
|||||||
|
|
||||||
extern volatile uint8_t buttons; // The last-checked buttons in a bit array.
|
extern volatile uint8_t buttons; // The last-checked buttons in a bit array.
|
||||||
void lcd_buttons_update();
|
void lcd_buttons_update();
|
||||||
void lcd_quick_feedback(const bool clear_buttons); // Audible feedback for a button click - could also be visual
|
|
||||||
void lcd_completion_feedback(const bool good=true);
|
void lcd_completion_feedback(const bool good=true);
|
||||||
|
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
|
Loading…
Reference in New Issue
Block a user