|
@@ -169,7 +169,8 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
|
169
|
169
|
typedef void (*screenFunc_t)();
|
170
|
170
|
|
171
|
171
|
// Different types of actions that can be used in menu items.
|
172
|
|
- static void menu_action_back();
|
|
172
|
+ #define menu_action_back(dummy) _menu_action_back()
|
|
173
|
+ static void _menu_action_back();
|
173
|
174
|
static void menu_action_submenu(screenFunc_t data);
|
174
|
175
|
static void menu_action_gcode(const char* pgcode);
|
175
|
176
|
static void menu_action_function(screenFunc_t data);
|
|
@@ -267,7 +268,9 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
|
267
|
268
|
* menu_action_[type](arg3...)
|
268
|
269
|
*
|
269
|
270
|
* Examples:
|
270
|
|
- * MENU_ITEM(back, MSG_WATCH)
|
|
271
|
+ * MENU_ITEM(back, MSG_WATCH, 0 [dummy parameter] )
|
|
272
|
+ * or
|
|
273
|
+ * MENU_BACK(MSG_WATCH)
|
271
|
274
|
* lcd_implementation_drawmenu_back(sel, row, PSTR(MSG_WATCH))
|
272
|
275
|
* menu_action_back()
|
273
|
276
|
*
|
|
@@ -281,35 +284,37 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
|
281
|
284
|
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
|
282
|
285
|
*
|
283
|
286
|
*/
|
284
|
|
- #define _MENU_ITEM_PART_1(TYPE, LABEL, ARGS...) \
|
|
287
|
+ #define _MENU_ITEM_PART_1(TYPE, LABEL, ...) \
|
285
|
288
|
if (_menuLineNr == _thisItemNr) { \
|
286
|
289
|
if (lcdDrawUpdate) \
|
287
|
|
- lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## ARGS); \
|
|
290
|
+ lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
|
288
|
291
|
if (wasClicked && encoderLine == _thisItemNr) { \
|
289
|
292
|
lcd_quick_feedback()
|
290
|
293
|
|
291
|
|
- #define _MENU_ITEM_PART_2(TYPE, ARGS...) \
|
292
|
|
- menu_action_ ## TYPE(ARGS); \
|
|
294
|
+ #define _MENU_ITEM_PART_2(TYPE, ...) \
|
|
295
|
+ menu_action_ ## TYPE(__VA_ARGS__); \
|
293
|
296
|
return; \
|
294
|
297
|
} \
|
295
|
298
|
} \
|
296
|
299
|
++_thisItemNr
|
297
|
300
|
|
298
|
|
- #define MENU_ITEM(TYPE, LABEL, ARGS...) do { \
|
|
301
|
+ #define MENU_ITEM(TYPE, LABEL, ...) do { \
|
299
|
302
|
_skipStatic = false; \
|
300
|
|
- _MENU_ITEM_PART_1(TYPE, LABEL, ## ARGS); \
|
301
|
|
- _MENU_ITEM_PART_2(TYPE, ## ARGS); \
|
|
303
|
+ _MENU_ITEM_PART_1(TYPE, LABEL, ## __VA_ARGS__); \
|
|
304
|
+ _MENU_ITEM_PART_2(TYPE, ## __VA_ARGS__); \
|
302
|
305
|
} while(0)
|
303
|
306
|
|
|
307
|
+ #define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
|
|
308
|
+
|
304
|
309
|
// Used to print static text with no visible cursor.
|
305
|
|
- #define STATIC_ITEM(LABEL, ARGS...) \
|
|
310
|
+ #define STATIC_ITEM(LABEL, ...) \
|
306
|
311
|
if (_menuLineNr == _thisItemNr) { \
|
307
|
312
|
if (_skipStatic && encoderLine <= _thisItemNr) { \
|
308
|
313
|
encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
|
309
|
314
|
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
|
310
|
315
|
} \
|
311
|
316
|
if (lcdDrawUpdate) \
|
312
|
|
- lcd_implementation_drawmenu_static(_lcdLineNr, PSTR(LABEL), ## ARGS); \
|
|
317
|
+ lcd_implementation_drawmenu_static(_lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
|
313
|
318
|
} \
|
314
|
319
|
++_thisItemNr
|
315
|
320
|
|
|
@@ -329,24 +334,24 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
|
329
|
334
|
/**
|
330
|
335
|
* MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
|
331
|
336
|
*/
|
332
|
|
- #define MENU_MULTIPLIER_ITEM(type, label, args...) do { \
|
333
|
|
- _MENU_ITEM_PART_1(type, label, ## args); \
|
|
337
|
+ #define MENU_MULTIPLIER_ITEM(type, label, ...) do { \
|
|
338
|
+ _MENU_ITEM_PART_1(type, label, ## __VA_ARGS__); \
|
334
|
339
|
encoderRateMultiplierEnabled = true; \
|
335
|
340
|
lastEncoderMovementMillis = 0; \
|
336
|
|
- _MENU_ITEM_PART_2(type, ## args); \
|
|
341
|
+ _MENU_ITEM_PART_2(type, ## __VA_ARGS__); \
|
337
|
342
|
} while(0)
|
338
|
343
|
|
339
|
344
|
#endif //ENCODER_RATE_MULTIPLIER
|
340
|
345
|
|
341
|
346
|
#define MENU_ITEM_DUMMY() do { _thisItemNr++; } while(0)
|
342
|
|
- #define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
|
343
|
|
- #define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
|
|
347
|
+ #define MENU_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
348
|
+ #define MENU_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
344
|
349
|
#if ENABLED(ENCODER_RATE_MULTIPLIER)
|
345
|
|
- #define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
|
346
|
|
- #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
|
|
350
|
+ #define MENU_MULTIPLIER_ITEM_EDIT(type, label, ...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
351
|
+ #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, ...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
347
|
352
|
#else //!ENCODER_RATE_MULTIPLIER
|
348
|
|
- #define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
|
349
|
|
- #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
|
|
353
|
+ #define MENU_MULTIPLIER_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
354
|
+ #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
350
|
355
|
#endif //!ENCODER_RATE_MULTIPLIER
|
351
|
356
|
|
352
|
357
|
/** Used variables to keep track of the menu */
|
|
@@ -602,7 +607,7 @@ void kill_screen(const char* lcd_msg) {
|
602
|
607
|
|
603
|
608
|
static void lcd_main_menu() {
|
604
|
609
|
START_MENU();
|
605
|
|
- MENU_ITEM(back, MSG_WATCH);
|
|
610
|
+ MENU_BACK(MSG_WATCH);
|
606
|
611
|
|
607
|
612
|
#if ENABLED(BLTOUCH)
|
608
|
613
|
if (!endstops.z_probe_enabled && TEST_BLTOUCH())
|
|
@@ -749,7 +754,7 @@ void kill_screen(const char* lcd_msg) {
|
749
|
754
|
//
|
750
|
755
|
// ^ Main
|
751
|
756
|
//
|
752
|
|
- MENU_ITEM(back, MSG_MAIN);
|
|
757
|
+ MENU_BACK(MSG_MAIN);
|
753
|
758
|
|
754
|
759
|
//
|
755
|
760
|
// Speed:
|
|
@@ -874,7 +879,7 @@ void kill_screen(const char* lcd_msg) {
|
874
|
879
|
static void lcd_dac_menu() {
|
875
|
880
|
dac_driver_getValues();
|
876
|
881
|
START_MENU();
|
877
|
|
- MENU_ITEM(back, MSG_CONTROL);
|
|
882
|
+ MENU_BACK(MSG_CONTROL);
|
878
|
883
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_X " " MSG_DAC_PERCENT, &driverPercent[X_AXIS], 0, 100, dac_driver_commit);
|
879
|
884
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_Y " " MSG_DAC_PERCENT, &driverPercent[Y_AXIS], 0, 100, dac_driver_commit);
|
880
|
885
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_Z " " MSG_DAC_PERCENT, &driverPercent[Z_AXIS], 0, 100, dac_driver_commit);
|
|
@@ -961,7 +966,7 @@ void kill_screen(const char* lcd_msg) {
|
961
|
966
|
|
962
|
967
|
static void lcd_preheat_pla_menu() {
|
963
|
968
|
START_MENU();
|
964
|
|
- MENU_ITEM(back, MSG_PREPARE);
|
|
969
|
+ MENU_BACK(MSG_PREPARE);
|
965
|
970
|
#if HOTENDS == 1
|
966
|
971
|
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_pla0);
|
967
|
972
|
#else
|
|
@@ -983,7 +988,7 @@ void kill_screen(const char* lcd_msg) {
|
983
|
988
|
|
984
|
989
|
static void lcd_preheat_abs_menu() {
|
985
|
990
|
START_MENU();
|
986
|
|
- MENU_ITEM(back, MSG_PREPARE);
|
|
991
|
+ MENU_BACK(MSG_PREPARE);
|
987
|
992
|
#if HOTENDS == 1
|
988
|
993
|
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_abs0);
|
989
|
994
|
#else
|
|
@@ -1210,7 +1215,7 @@ void kill_screen(const char* lcd_msg) {
|
1210
|
1215
|
*/
|
1211
|
1216
|
static void lcd_level_bed() {
|
1212
|
1217
|
START_MENU();
|
1213
|
|
- MENU_ITEM(back, MSG_LEVEL_BED_CANCEL);
|
|
1218
|
+ MENU_BACK(MSG_LEVEL_BED_CANCEL);
|
1214
|
1219
|
MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue);
|
1215
|
1220
|
END_MENU();
|
1216
|
1221
|
}
|
|
@@ -1229,7 +1234,7 @@ void kill_screen(const char* lcd_msg) {
|
1229
|
1234
|
//
|
1230
|
1235
|
// ^ Main
|
1231
|
1236
|
//
|
1232
|
|
- MENU_ITEM(back, MSG_MAIN);
|
|
1237
|
+ MENU_BACK(MSG_MAIN);
|
1233
|
1238
|
|
1234
|
1239
|
//
|
1235
|
1240
|
// Auto Home
|
|
@@ -1333,7 +1338,7 @@ void kill_screen(const char* lcd_msg) {
|
1333
|
1338
|
|
1334
|
1339
|
static void lcd_delta_calibrate_menu() {
|
1335
|
1340
|
START_MENU();
|
1336
|
|
- MENU_ITEM(back, MSG_MAIN);
|
|
1341
|
+ MENU_BACK(MSG_MAIN);
|
1337
|
1342
|
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
|
1338
|
1343
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_X, _goto_tower_x);
|
1339
|
1344
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
|
|
@@ -1478,7 +1483,7 @@ void kill_screen(const char* lcd_msg) {
|
1478
|
1483
|
|
1479
|
1484
|
static void _lcd_move_menu_axis() {
|
1480
|
1485
|
START_MENU();
|
1481
|
|
- MENU_ITEM(back, MSG_MOVE_AXIS);
|
|
1486
|
+ MENU_BACK(MSG_MOVE_AXIS);
|
1482
|
1487
|
|
1483
|
1488
|
if (_MOVE_XYZ_ALLOWED) {
|
1484
|
1489
|
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
|
|
@@ -1531,7 +1536,7 @@ void kill_screen(const char* lcd_msg) {
|
1531
|
1536
|
|
1532
|
1537
|
static void lcd_move_menu() {
|
1533
|
1538
|
START_MENU();
|
1534
|
|
- MENU_ITEM(back, MSG_PREPARE);
|
|
1539
|
+ MENU_BACK(MSG_PREPARE);
|
1535
|
1540
|
|
1536
|
1541
|
if (_MOVE_XYZ_ALLOWED)
|
1537
|
1542
|
MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
|
|
@@ -1550,7 +1555,7 @@ void kill_screen(const char* lcd_msg) {
|
1550
|
1555
|
|
1551
|
1556
|
static void lcd_control_menu() {
|
1552
|
1557
|
START_MENU();
|
1553
|
|
- MENU_ITEM(back, MSG_MAIN);
|
|
1558
|
+ MENU_BACK(MSG_MAIN);
|
1554
|
1559
|
MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu);
|
1555
|
1560
|
MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu);
|
1556
|
1561
|
MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu);
|
|
@@ -1637,14 +1642,14 @@ void kill_screen(const char* lcd_msg) {
|
1637
|
1642
|
#define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex)
|
1638
|
1643
|
#endif
|
1639
|
1644
|
|
1640
|
|
- _PIDTEMP_FUNCTIONS(0);
|
|
1645
|
+ _PIDTEMP_FUNCTIONS(0)
|
1641
|
1646
|
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
1642
|
1647
|
#if HOTENDS > 1
|
1643
|
|
- _PIDTEMP_FUNCTIONS(1);
|
|
1648
|
+ _PIDTEMP_FUNCTIONS(1)
|
1644
|
1649
|
#if HOTENDS > 2
|
1645
|
|
- _PIDTEMP_FUNCTIONS(2);
|
|
1650
|
+ _PIDTEMP_FUNCTIONS(2)
|
1646
|
1651
|
#if HOTENDS > 3
|
1647
|
|
- _PIDTEMP_FUNCTIONS(3);
|
|
1652
|
+ _PIDTEMP_FUNCTIONS(3)
|
1648
|
1653
|
#endif //HOTENDS > 3
|
1649
|
1654
|
#endif //HOTENDS > 2
|
1650
|
1655
|
#endif //HOTENDS > 1
|
|
@@ -1663,7 +1668,7 @@ void kill_screen(const char* lcd_msg) {
|
1663
|
1668
|
//
|
1664
|
1669
|
// ^ Control
|
1665
|
1670
|
//
|
1666
|
|
- MENU_ITEM(back, MSG_CONTROL);
|
|
1671
|
+ MENU_BACK(MSG_CONTROL);
|
1667
|
1672
|
|
1668
|
1673
|
//
|
1669
|
1674
|
// Nozzle:
|
|
@@ -1795,7 +1800,7 @@ void kill_screen(const char* lcd_msg) {
|
1795
|
1800
|
*/
|
1796
|
1801
|
static void lcd_control_temperature_preheat_pla_settings_menu() {
|
1797
|
1802
|
START_MENU();
|
1798
|
|
- MENU_ITEM(back, MSG_TEMPERATURE);
|
|
1803
|
+ MENU_BACK(MSG_TEMPERATURE);
|
1799
|
1804
|
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed1, 0, 255);
|
1800
|
1805
|
#if TEMP_SENSOR_0 != 0
|
1801
|
1806
|
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &preheatHotendTemp1, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
|
|
@@ -1816,7 +1821,7 @@ void kill_screen(const char* lcd_msg) {
|
1816
|
1821
|
*/
|
1817
|
1822
|
static void lcd_control_temperature_preheat_abs_settings_menu() {
|
1818
|
1823
|
START_MENU();
|
1819
|
|
- MENU_ITEM(back, MSG_TEMPERATURE);
|
|
1824
|
+ MENU_BACK(MSG_TEMPERATURE);
|
1820
|
1825
|
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed2, 0, 255);
|
1821
|
1826
|
#if TEMP_SENSOR_0 != 0
|
1822
|
1827
|
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &preheatHotendTemp2, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
|
|
@@ -1840,7 +1845,7 @@ void kill_screen(const char* lcd_msg) {
|
1840
|
1845
|
*/
|
1841
|
1846
|
static void lcd_control_motion_menu() {
|
1842
|
1847
|
START_MENU();
|
1843
|
|
- MENU_ITEM(back, MSG_CONTROL);
|
|
1848
|
+ MENU_BACK(MSG_CONTROL);
|
1844
|
1849
|
#if HAS_BED_PROBE
|
1845
|
1850
|
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
|
1846
|
1851
|
#endif
|
|
@@ -1890,7 +1895,7 @@ void kill_screen(const char* lcd_msg) {
|
1890
|
1895
|
*/
|
1891
|
1896
|
static void lcd_control_volumetric_menu() {
|
1892
|
1897
|
START_MENU();
|
1893
|
|
- MENU_ITEM(back, MSG_CONTROL);
|
|
1898
|
+ MENU_BACK(MSG_CONTROL);
|
1894
|
1899
|
|
1895
|
1900
|
MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers);
|
1896
|
1901
|
|
|
@@ -1947,7 +1952,7 @@ void kill_screen(const char* lcd_msg) {
|
1947
|
1952
|
|
1948
|
1953
|
static void lcd_control_retract_menu() {
|
1949
|
1954
|
START_MENU();
|
1950
|
|
- MENU_ITEM(back, MSG_CONTROL);
|
|
1955
|
+ MENU_BACK(MSG_CONTROL);
|
1951
|
1956
|
MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
|
1952
|
1957
|
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
|
1953
|
1958
|
#if EXTRUDERS > 1
|
|
@@ -1989,7 +1994,7 @@ void kill_screen(const char* lcd_msg) {
|
1989
|
1994
|
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card)
|
1990
|
1995
|
uint16_t fileCnt = card.getnrfilenames();
|
1991
|
1996
|
START_MENU();
|
1992
|
|
- MENU_ITEM(back, MSG_MAIN);
|
|
1997
|
+ MENU_BACK(MSG_MAIN);
|
1993
|
1998
|
card.getWorkDirName();
|
1994
|
1999
|
if (card.filename[0] == '/') {
|
1995
|
2000
|
#if !PIN_EXISTS(SD_DETECT)
|
|
@@ -2120,14 +2125,14 @@ void kill_screen(const char* lcd_msg) {
|
2120
|
2125
|
static void lcd_info_board_menu() {
|
2121
|
2126
|
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
2122
|
2127
|
START_SCREEN();
|
2123
|
|
- STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
|
2124
|
|
- STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000
|
2125
|
|
- STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION); // Protocol: 1.0
|
|
2128
|
+ STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
|
|
2129
|
+ STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000
|
|
2130
|
+ STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0
|
2126
|
2131
|
#ifdef POWER_SUPPLY
|
2127
|
2132
|
#if (POWER_SUPPLY == 1)
|
2128
|
|
- STATIC_ITEM(MSG_INFO_PSU ": ATX"); // Power Supply: ATX
|
|
2133
|
+ STATIC_ITEM(MSG_INFO_PSU ": ATX", true); // Power Supply: ATX
|
2129
|
2134
|
#elif (POWER_SUPPLY == 2)
|
2130
|
|
- STATIC_ITEM(MSG_INFO_PSU ": XBox"); // Power Supply: XBox
|
|
2135
|
+ STATIC_ITEM(MSG_INFO_PSU ": XBox", true); // Power Supply: XBox
|
2131
|
2136
|
#endif
|
2132
|
2137
|
#endif // POWER_SUPPLY
|
2133
|
2138
|
END_SCREEN();
|
|
@@ -2141,12 +2146,12 @@ void kill_screen(const char* lcd_msg) {
|
2141
|
2146
|
static void lcd_info_printer_menu() {
|
2142
|
2147
|
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
2143
|
2148
|
START_SCREEN();
|
2144
|
|
- STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
|
2145
|
|
- STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch
|
2146
|
|
- STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM
|
2147
|
|
- STATIC_ITEM(MACHINE_NAME); // My3DPrinter
|
2148
|
|
- STATIC_ITEM(WEBSITE_URL); // www.my3dprinter.com
|
2149
|
|
- STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2
|
|
2149
|
+ STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
|
|
2150
|
+ STATIC_ITEM(SHORT_BUILD_VERSION, true); // x.x.x-Branch
|
|
2151
|
+ STATIC_ITEM(STRING_DISTRIBUTION_DATE, true); // YYYY-MM-DD HH:MM
|
|
2152
|
+ STATIC_ITEM(MACHINE_NAME, true); // My3DPrinter
|
|
2153
|
+ STATIC_ITEM(WEBSITE_URL, true); // www.my3dprinter.com
|
|
2154
|
+ STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS), true); // Extruders: 2
|
2150
|
2155
|
END_SCREEN();
|
2151
|
2156
|
}
|
2152
|
2157
|
|
|
@@ -2157,7 +2162,7 @@ void kill_screen(const char* lcd_msg) {
|
2157
|
2162
|
*/
|
2158
|
2163
|
static void lcd_info_menu() {
|
2159
|
2164
|
START_MENU();
|
2160
|
|
- MENU_ITEM(back, MSG_MAIN);
|
|
2165
|
+ MENU_BACK(MSG_MAIN);
|
2161
|
2166
|
MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, lcd_info_printer_menu); // Printer Info >
|
2162
|
2167
|
MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu); // Board Info >
|
2163
|
2168
|
MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors >
|
|
@@ -2363,14 +2368,14 @@ void kill_screen(const char* lcd_msg) {
|
2363
|
2368
|
callbackFunc = callback; \
|
2364
|
2369
|
}
|
2365
|
2370
|
|
2366
|
|
- menu_edit_type(int, int3, itostr3, 1);
|
2367
|
|
- menu_edit_type(float, float3, ftostr3, 1);
|
2368
|
|
- menu_edit_type(float, float32, ftostr32, 100);
|
2369
|
|
- menu_edit_type(float, float43, ftostr43sign, 1000);
|
2370
|
|
- menu_edit_type(float, float5, ftostr5rj, 0.01);
|
2371
|
|
- menu_edit_type(float, float51, ftostr51sign, 10);
|
2372
|
|
- menu_edit_type(float, float52, ftostr52sign, 100);
|
2373
|
|
- menu_edit_type(unsigned long, long5, ftostr5rj, 0.01);
|
|
2371
|
+ menu_edit_type(int, int3, itostr3, 1)
|
|
2372
|
+ menu_edit_type(float, float3, ftostr3, 1)
|
|
2373
|
+ menu_edit_type(float, float32, ftostr32, 100)
|
|
2374
|
+ menu_edit_type(float, float43, ftostr43sign, 1000)
|
|
2375
|
+ menu_edit_type(float, float5, ftostr5rj, 0.01)
|
|
2376
|
+ menu_edit_type(float, float51, ftostr51sign, 10)
|
|
2377
|
+ menu_edit_type(float, float52, ftostr52sign, 100)
|
|
2378
|
+ menu_edit_type(unsigned long, long5, ftostr5rj, 0.01)
|
2374
|
2379
|
|
2375
|
2380
|
/**
|
2376
|
2381
|
*
|
|
@@ -2431,7 +2436,7 @@ void kill_screen(const char* lcd_msg) {
|
2431
|
2436
|
* Menu actions
|
2432
|
2437
|
*
|
2433
|
2438
|
*/
|
2434
|
|
- static void menu_action_back() { lcd_goto_previous_menu(); }
|
|
2439
|
+ static void _menu_action_back() { lcd_goto_previous_menu(); }
|
2435
|
2440
|
static void menu_action_submenu(screenFunc_t func) { lcd_save_previous_menu(); lcd_goto_screen(func); }
|
2436
|
2441
|
static void menu_action_gcode(const char* pgcode) { enqueue_and_echo_commands_P(pgcode); }
|
2437
|
2442
|
static void menu_action_function(screenFunc_t func) { (*func)(); }
|