mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 22:08:02 +00:00
Don't draw current screen if simply changing screens
This commit is contained in:
parent
096f9981d1
commit
d17b161832
@ -677,6 +677,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
long babysteps_done = 0;
|
||||
|
||||
static void _lcd_babystep(const AxisEnum axis, const char* msg) {
|
||||
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
||||
ENCODER_DIRECTION_NORMAL();
|
||||
if (encoderPosition) {
|
||||
int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
|
||||
@ -689,7 +690,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
lcd_implementation_drawedit(msg, ftostr43sign(
|
||||
((1000 * babysteps_done) / planner.axis_steps_per_mm[axis]) * 0.001f
|
||||
));
|
||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||
}
|
||||
|
||||
#if ENABLED(BABYSTEP_XY)
|
||||
@ -1344,6 +1344,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
float move_menu_scale;
|
||||
|
||||
static void _lcd_move_xyz(const char* name, AxisEnum axis, float min, float max) {
|
||||
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
||||
ENCODER_DIRECTION_NORMAL();
|
||||
if (encoderPosition) {
|
||||
refresh_cmd_timeout();
|
||||
@ -1355,7 +1356,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
|
||||
}
|
||||
if (lcdDrawUpdate) lcd_implementation_drawedit(name, ftostr41sign(current_position[axis]));
|
||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||
}
|
||||
#if ENABLED(DELTA)
|
||||
static float delta_clip_radius_2 = (DELTA_PRINTABLE_RADIUS) * (DELTA_PRINTABLE_RADIUS);
|
||||
@ -1372,6 +1372,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
int8_t eindex = -1
|
||||
#endif
|
||||
) {
|
||||
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
||||
ENCODER_DIRECTION_NORMAL();
|
||||
if (encoderPosition) {
|
||||
current_position[E_AXIS] += float((int32_t)encoderPosition) * move_menu_scale;
|
||||
@ -1401,7 +1402,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
#endif //EXTRUDERS > 1
|
||||
lcd_implementation_drawedit(pos_label, ftostr41sign(current_position[E_AXIS]));
|
||||
}
|
||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||
}
|
||||
|
||||
#if EXTRUDERS > 1
|
||||
@ -1860,6 +1860,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
*/
|
||||
#if HAS_LCD_CONTRAST
|
||||
static void lcd_set_contrast() {
|
||||
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
||||
ENCODER_DIRECTION_NORMAL();
|
||||
if (encoderPosition) {
|
||||
set_lcd_contrast(lcd_contrast + encoderPosition);
|
||||
@ -1875,7 +1876,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
#endif
|
||||
);
|
||||
}
|
||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||
}
|
||||
#endif // HAS_LCD_CONTRAST
|
||||
|
||||
@ -1967,10 +1967,12 @@ void kill_screen(const char* lcd_msg) {
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
/**
|
||||
*
|
||||
* About Printer > Stastics submenu
|
||||
* About Printer > Statistics submenu
|
||||
*
|
||||
*/
|
||||
static void lcd_info_stats_menu() {
|
||||
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
||||
|
||||
PrintCounter print_job_counter = PrintCounter();
|
||||
print_job_counter.loadStats();
|
||||
printStatistics stats = print_job_counter.getStats();
|
||||
@ -1978,7 +1980,6 @@ void kill_screen(const char* lcd_msg) {
|
||||
char printTime[6];
|
||||
sprintf(printTime, "%02d:%02d", int(stats.printTime / 60), int(stats.printTime % 60));
|
||||
|
||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||
START_SCREEN();
|
||||
STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints)); // Print Count : 999
|
||||
STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": ", false, false, itostr3left(stats.finishedPrints)); // Finished : 666
|
||||
@ -1993,7 +1994,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
*
|
||||
*/
|
||||
static void lcd_info_thermistors_menu() {
|
||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
||||
START_SCREEN();
|
||||
#define THERMISTOR_ID TEMP_SENSOR_0
|
||||
#include "thermistornames.h"
|
||||
@ -2045,7 +2046,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
*
|
||||
*/
|
||||
static void lcd_info_board_menu() {
|
||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
||||
START_SCREEN();
|
||||
STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
|
||||
STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000
|
||||
@ -2066,7 +2067,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
*
|
||||
*/
|
||||
static void lcd_info_printer_menu() {
|
||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
||||
START_SCREEN();
|
||||
STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
|
||||
STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch
|
||||
|
Loading…
Reference in New Issue
Block a user