Skip to content

Commit 1ee0fdc

Browse files
authored
Merge pull request #5140 from esenapaj/Follow-up-the-PR-#5089
Follow-up the PR #5089 (Centralize click-handling in the LCD loop)
2 parents b0be2e4 + c8c1a28 commit 1ee0fdc

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Marlin/ultralcd.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
416416
}
417417
}
418418

419-
static void lcd_goto_previous_menu(bool feedback=false) {
419+
static void lcd_goto_previous_menu() {
420420
if (screen_history_depth > 0) {
421421
--screen_history_depth;
422422
lcd_goto_screen(
@@ -648,7 +648,7 @@ void kill_screen(const char* lcd_msg) {
648648
long babysteps_done = 0;
649649

650650
static void _lcd_babystep(const AxisEnum axis, const char* msg) {
651-
if (lcd_clicked) { defer_return_to_status = false; return lcd_goto_previous_menu(true); }
651+
if (lcd_clicked) { defer_return_to_status = false; return lcd_goto_previous_menu(); }
652652
ENCODER_DIRECTION_NORMAL();
653653
if (encoderPosition) {
654654
int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
@@ -1357,7 +1357,7 @@ void kill_screen(const char* lcd_msg) {
13571357
*/
13581358

13591359
static void _lcd_move_xyz(const char* name, AxisEnum axis) {
1360-
if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1360+
if (lcd_clicked) { return lcd_goto_previous_menu(); }
13611361
ENCODER_DIRECTION_NORMAL();
13621362
if (encoderPosition) {
13631363
refresh_cmd_timeout();
@@ -1397,7 +1397,7 @@ void kill_screen(const char* lcd_msg) {
13971397
int8_t eindex=-1
13981398
#endif
13991399
) {
1400-
if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1400+
if (lcd_clicked) { return lcd_goto_previous_menu(); }
14011401
ENCODER_DIRECTION_NORMAL();
14021402
if (encoderPosition) {
14031403
current_position[E_AXIS] += float((int32_t)encoderPosition) * move_menu_scale;
@@ -1884,7 +1884,7 @@ void kill_screen(const char* lcd_msg) {
18841884
*/
18851885
#if HAS_LCD_CONTRAST
18861886
static void lcd_set_contrast() {
1887-
if (lcd_clicked) { return lcd_goto_previous_menu(true); }
1887+
if (lcd_clicked) { return lcd_goto_previous_menu(); }
18881888
ENCODER_DIRECTION_NORMAL();
18891889
if (encoderPosition) {
18901890
set_lcd_contrast(lcd_contrast + encoderPosition);
@@ -1997,7 +1997,7 @@ void kill_screen(const char* lcd_msg) {
19971997
*
19981998
*/
19991999
static void lcd_info_stats_menu() {
2000-
if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2000+
if (lcd_clicked) { return lcd_goto_previous_menu(); }
20012001

20022002
char buffer[21];
20032003
printStatistics stats = print_job_timer.getStats();
@@ -2031,7 +2031,7 @@ void kill_screen(const char* lcd_msg) {
20312031
*
20322032
*/
20332033
static void lcd_info_thermistors_menu() {
2034-
if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2034+
if (lcd_clicked) { return lcd_goto_previous_menu(); }
20352035
START_SCREEN();
20362036
#define THERMISTOR_ID TEMP_SENSOR_0
20372037
#include "thermistornames.h"
@@ -2083,7 +2083,7 @@ void kill_screen(const char* lcd_msg) {
20832083
*
20842084
*/
20852085
static void lcd_info_board_menu() {
2086-
if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2086+
if (lcd_clicked) { return lcd_goto_previous_menu(); }
20872087
START_SCREEN();
20882088
STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
20892089
STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000
@@ -2104,7 +2104,7 @@ void kill_screen(const char* lcd_msg) {
21042104
*
21052105
*/
21062106
static void lcd_info_printer_menu() {
2107-
if (lcd_clicked) { return lcd_goto_previous_menu(true); }
2107+
if (lcd_clicked) { return lcd_goto_previous_menu(); }
21082108
START_SCREEN();
21092109
STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
21102110
STATIC_ITEM(SHORT_BUILD_VERSION, true); // x.x.x-Branch
@@ -2300,7 +2300,7 @@ void kill_screen(const char* lcd_msg) {
23002300
lcd_implementation_drawedit(editLabel, _strFunc(((_type)((int32_t)encoderPosition + minEditValue)) / scale)); \
23012301
if (lcd_clicked) { \
23022302
*((_type*)editValue) = ((_type)((int32_t)encoderPosition + minEditValue)) / scale; \
2303-
lcd_goto_previous_menu(true); \
2303+
lcd_goto_previous_menu(); \
23042304
} \
23052305
return lcd_clicked; \
23062306
} \

0 commit comments

Comments
 (0)