|
|
@ -169,7 +169,8 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
|
|
|
|
typedef void (*screenFunc_t)();
|
|
|
|
typedef void (*screenFunc_t)();
|
|
|
|
|
|
|
|
|
|
|
|
// Different types of actions that can be used in menu items.
|
|
|
|
// Different types of actions that can be used in menu items.
|
|
|
|
static void menu_action_back();
|
|
|
|
#define menu_action_back(dummy) _menu_action_back()
|
|
|
|
|
|
|
|
static void _menu_action_back();
|
|
|
|
static void menu_action_submenu(screenFunc_t data);
|
|
|
|
static void menu_action_submenu(screenFunc_t data);
|
|
|
|
static void menu_action_gcode(const char* pgcode);
|
|
|
|
static void menu_action_gcode(const char* pgcode);
|
|
|
|
static void menu_action_function(screenFunc_t data);
|
|
|
|
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
|
|
|
|
* menu_action_[type](arg3...)
|
|
|
|
* menu_action_[type](arg3...)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Examples:
|
|
|
|
* Examples:
|
|
|
|
* MENU_ITEM(back, MSG_WATCH)
|
|
|
|
* MENU_ITEM(back, MSG_WATCH, 0 [dummy parameter] )
|
|
|
|
|
|
|
|
* or
|
|
|
|
|
|
|
|
* MENU_BACK(MSG_WATCH)
|
|
|
|
* lcd_implementation_drawmenu_back(sel, row, PSTR(MSG_WATCH))
|
|
|
|
* lcd_implementation_drawmenu_back(sel, row, PSTR(MSG_WATCH))
|
|
|
|
* menu_action_back()
|
|
|
|
* menu_action_back()
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -281,35 +284,37 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
|
|
|
|
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
|
|
|
|
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#define _MENU_ITEM_PART_1(TYPE, LABEL, ARGS...) \
|
|
|
|
#define _MENU_ITEM_PART_1(TYPE, LABEL, ...) \
|
|
|
|
if (_menuLineNr == _thisItemNr) { \
|
|
|
|
if (_menuLineNr == _thisItemNr) { \
|
|
|
|
if (lcdDrawUpdate) \
|
|
|
|
if (lcdDrawUpdate) \
|
|
|
|
lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## ARGS); \
|
|
|
|
lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
|
|
|
|
if (wasClicked && encoderLine == _thisItemNr) { \
|
|
|
|
if (wasClicked && encoderLine == _thisItemNr) { \
|
|
|
|
lcd_quick_feedback()
|
|
|
|
lcd_quick_feedback()
|
|
|
|
|
|
|
|
|
|
|
|
#define _MENU_ITEM_PART_2(TYPE, ARGS...) \
|
|
|
|
#define _MENU_ITEM_PART_2(TYPE, ...) \
|
|
|
|
menu_action_ ## TYPE(ARGS); \
|
|
|
|
menu_action_ ## TYPE(__VA_ARGS__); \
|
|
|
|
return; \
|
|
|
|
return; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
++_thisItemNr
|
|
|
|
++_thisItemNr
|
|
|
|
|
|
|
|
|
|
|
|
#define MENU_ITEM(TYPE, LABEL, ARGS...) do { \
|
|
|
|
#define MENU_ITEM(TYPE, LABEL, ...) do { \
|
|
|
|
_skipStatic = false; \
|
|
|
|
_skipStatic = false; \
|
|
|
|
_MENU_ITEM_PART_1(TYPE, LABEL, ## ARGS); \
|
|
|
|
_MENU_ITEM_PART_1(TYPE, LABEL, ## __VA_ARGS__); \
|
|
|
|
_MENU_ITEM_PART_2(TYPE, ## ARGS); \
|
|
|
|
_MENU_ITEM_PART_2(TYPE, ## __VA_ARGS__); \
|
|
|
|
} while(0)
|
|
|
|
} while(0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
|
|
|
|
|
|
|
|
|
|
|
|
// Used to print static text with no visible cursor.
|
|
|
|
// Used to print static text with no visible cursor.
|
|
|
|
#define STATIC_ITEM(LABEL, ARGS...) \
|
|
|
|
#define STATIC_ITEM(LABEL, ...) \
|
|
|
|
if (_menuLineNr == _thisItemNr) { \
|
|
|
|
if (_menuLineNr == _thisItemNr) { \
|
|
|
|
if (_skipStatic && encoderLine <= _thisItemNr) { \
|
|
|
|
if (_skipStatic && encoderLine <= _thisItemNr) { \
|
|
|
|
encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
|
|
|
|
encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
|
|
|
|
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
|
|
|
|
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
if (lcdDrawUpdate) \
|
|
|
|
if (lcdDrawUpdate) \
|
|
|
|
lcd_implementation_drawmenu_static(_lcdLineNr, PSTR(LABEL), ## ARGS); \
|
|
|
|
lcd_implementation_drawmenu_static(_lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
++_thisItemNr
|
|
|
|
++_thisItemNr
|
|
|
|
|
|
|
|
|
|
|
@ -329,24 +334,24 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
|
|
|
|
* MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#define MENU_MULTIPLIER_ITEM(type, label, args...) do { \
|
|
|
|
#define MENU_MULTIPLIER_ITEM(type, label, ...) do { \
|
|
|
|
_MENU_ITEM_PART_1(type, label, ## args); \
|
|
|
|
_MENU_ITEM_PART_1(type, label, ## __VA_ARGS__); \
|
|
|
|
encoderRateMultiplierEnabled = true; \
|
|
|
|
encoderRateMultiplierEnabled = true; \
|
|
|
|
lastEncoderMovementMillis = 0; \
|
|
|
|
lastEncoderMovementMillis = 0; \
|
|
|
|
_MENU_ITEM_PART_2(type, ## args); \
|
|
|
|
_MENU_ITEM_PART_2(type, ## __VA_ARGS__); \
|
|
|
|
} while(0)
|
|
|
|
} while(0)
|
|
|
|
|
|
|
|
|
|
|
|
#endif //ENCODER_RATE_MULTIPLIER
|
|
|
|
#endif //ENCODER_RATE_MULTIPLIER
|
|
|
|
|
|
|
|
|
|
|
|
#define MENU_ITEM_DUMMY() do { _thisItemNr++; } while(0)
|
|
|
|
#define MENU_ITEM_DUMMY() do { _thisItemNr++; } while(0)
|
|
|
|
#define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
|
|
|
|
#define MENU_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
|
|
#define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
|
|
|
|
#define MENU_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
|
|
#if ENABLED(ENCODER_RATE_MULTIPLIER)
|
|
|
|
#if ENABLED(ENCODER_RATE_MULTIPLIER)
|
|
|
|
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
|
|
|
|
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, ...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
|
|
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
|
|
|
|
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, ...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
|
|
#else //!ENCODER_RATE_MULTIPLIER
|
|
|
|
#else //!ENCODER_RATE_MULTIPLIER
|
|
|
|
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args)
|
|
|
|
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
|
|
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
|
|
|
|
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
|
|
|
|
#endif //!ENCODER_RATE_MULTIPLIER
|
|
|
|
#endif //!ENCODER_RATE_MULTIPLIER
|
|
|
|
|
|
|
|
|
|
|
|
/** Used variables to keep track of the menu */
|
|
|
|
/** Used variables to keep track of the menu */
|
|
|
@ -602,7 +607,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_main_menu() {
|
|
|
|
static void lcd_main_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_WATCH);
|
|
|
|
MENU_BACK(MSG_WATCH);
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(BLTOUCH)
|
|
|
|
#if ENABLED(BLTOUCH)
|
|
|
|
if (!endstops.z_probe_enabled && TEST_BLTOUCH())
|
|
|
|
if (!endstops.z_probe_enabled && TEST_BLTOUCH())
|
|
|
@ -749,7 +754,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// ^ Main
|
|
|
|
// ^ Main
|
|
|
|
//
|
|
|
|
//
|
|
|
|
MENU_ITEM(back, MSG_MAIN);
|
|
|
|
MENU_BACK(MSG_MAIN);
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Speed:
|
|
|
|
// Speed:
|
|
|
@ -874,7 +879,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
static void lcd_dac_menu() {
|
|
|
|
static void lcd_dac_menu() {
|
|
|
|
dac_driver_getValues();
|
|
|
|
dac_driver_getValues();
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_CONTROL);
|
|
|
|
MENU_BACK(MSG_CONTROL);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_X " " MSG_DAC_PERCENT, &driverPercent[X_AXIS], 0, 100, dac_driver_commit);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_X " " MSG_DAC_PERCENT, &driverPercent[X_AXIS], 0, 100, dac_driver_commit);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_Y " " MSG_DAC_PERCENT, &driverPercent[Y_AXIS], 0, 100, dac_driver_commit);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_Y " " MSG_DAC_PERCENT, &driverPercent[Y_AXIS], 0, 100, dac_driver_commit);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(int3, MSG_Z " " MSG_DAC_PERCENT, &driverPercent[Z_AXIS], 0, 100, dac_driver_commit);
|
|
|
|
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) {
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_preheat_pla_menu() {
|
|
|
|
static void lcd_preheat_pla_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_PREPARE);
|
|
|
|
MENU_BACK(MSG_PREPARE);
|
|
|
|
#if HOTENDS == 1
|
|
|
|
#if HOTENDS == 1
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_pla0);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_pla0);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
@ -983,7 +988,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_preheat_abs_menu() {
|
|
|
|
static void lcd_preheat_abs_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_PREPARE);
|
|
|
|
MENU_BACK(MSG_PREPARE);
|
|
|
|
#if HOTENDS == 1
|
|
|
|
#if HOTENDS == 1
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_abs0);
|
|
|
|
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_abs0);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
@ -1210,7 +1215,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void lcd_level_bed() {
|
|
|
|
static void lcd_level_bed() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_LEVEL_BED_CANCEL);
|
|
|
|
MENU_BACK(MSG_LEVEL_BED_CANCEL);
|
|
|
|
MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue);
|
|
|
|
MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue);
|
|
|
|
END_MENU();
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1229,7 +1234,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// ^ Main
|
|
|
|
// ^ Main
|
|
|
|
//
|
|
|
|
//
|
|
|
|
MENU_ITEM(back, MSG_MAIN);
|
|
|
|
MENU_BACK(MSG_MAIN);
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Auto Home
|
|
|
|
// Auto Home
|
|
|
@ -1333,7 +1338,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_delta_calibrate_menu() {
|
|
|
|
static void lcd_delta_calibrate_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_MAIN);
|
|
|
|
MENU_BACK(MSG_MAIN);
|
|
|
|
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
|
|
|
|
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
|
|
|
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_X, _goto_tower_x);
|
|
|
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_X, _goto_tower_x);
|
|
|
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
|
|
|
|
MENU_ITEM(function, MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
|
|
|
@ -1478,7 +1483,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
|
|
static void _lcd_move_menu_axis() {
|
|
|
|
static void _lcd_move_menu_axis() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_MOVE_AXIS);
|
|
|
|
MENU_BACK(MSG_MOVE_AXIS);
|
|
|
|
|
|
|
|
|
|
|
|
if (_MOVE_XYZ_ALLOWED) {
|
|
|
|
if (_MOVE_XYZ_ALLOWED) {
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
|
|
|
@ -1531,7 +1536,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_move_menu() {
|
|
|
|
static void lcd_move_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_PREPARE);
|
|
|
|
MENU_BACK(MSG_PREPARE);
|
|
|
|
|
|
|
|
|
|
|
|
if (_MOVE_XYZ_ALLOWED)
|
|
|
|
if (_MOVE_XYZ_ALLOWED)
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
|
|
|
|
MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
|
|
|
@ -1550,7 +1555,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_control_menu() {
|
|
|
|
static void lcd_control_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_MAIN);
|
|
|
|
MENU_BACK(MSG_MAIN);
|
|
|
|
MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu);
|
|
|
|
MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_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);
|
|
|
@ -1637,14 +1642,14 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
#define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex)
|
|
|
|
#define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
_PIDTEMP_FUNCTIONS(0);
|
|
|
|
_PIDTEMP_FUNCTIONS(0)
|
|
|
|
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
|
|
|
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
|
|
|
#if HOTENDS > 1
|
|
|
|
#if HOTENDS > 1
|
|
|
|
_PIDTEMP_FUNCTIONS(1);
|
|
|
|
_PIDTEMP_FUNCTIONS(1)
|
|
|
|
#if HOTENDS > 2
|
|
|
|
#if HOTENDS > 2
|
|
|
|
_PIDTEMP_FUNCTIONS(2);
|
|
|
|
_PIDTEMP_FUNCTIONS(2)
|
|
|
|
#if HOTENDS > 3
|
|
|
|
#if HOTENDS > 3
|
|
|
|
_PIDTEMP_FUNCTIONS(3);
|
|
|
|
_PIDTEMP_FUNCTIONS(3)
|
|
|
|
#endif //HOTENDS > 3
|
|
|
|
#endif //HOTENDS > 3
|
|
|
|
#endif //HOTENDS > 2
|
|
|
|
#endif //HOTENDS > 2
|
|
|
|
#endif //HOTENDS > 1
|
|
|
|
#endif //HOTENDS > 1
|
|
|
@ -1663,7 +1668,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// ^ Control
|
|
|
|
// ^ Control
|
|
|
|
//
|
|
|
|
//
|
|
|
|
MENU_ITEM(back, MSG_CONTROL);
|
|
|
|
MENU_BACK(MSG_CONTROL);
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Nozzle:
|
|
|
|
// Nozzle:
|
|
|
@ -1795,7 +1800,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void lcd_control_temperature_preheat_pla_settings_menu() {
|
|
|
|
static void lcd_control_temperature_preheat_pla_settings_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_TEMPERATURE);
|
|
|
|
MENU_BACK(MSG_TEMPERATURE);
|
|
|
|
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed1, 0, 255);
|
|
|
|
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed1, 0, 255);
|
|
|
|
#if TEMP_SENSOR_0 != 0
|
|
|
|
#if TEMP_SENSOR_0 != 0
|
|
|
|
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &preheatHotendTemp1, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
|
|
|
|
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) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void lcd_control_temperature_preheat_abs_settings_menu() {
|
|
|
|
static void lcd_control_temperature_preheat_abs_settings_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_TEMPERATURE);
|
|
|
|
MENU_BACK(MSG_TEMPERATURE);
|
|
|
|
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed2, 0, 255);
|
|
|
|
MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed2, 0, 255);
|
|
|
|
#if TEMP_SENSOR_0 != 0
|
|
|
|
#if TEMP_SENSOR_0 != 0
|
|
|
|
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &preheatHotendTemp2, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15);
|
|
|
|
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) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void lcd_control_motion_menu() {
|
|
|
|
static void lcd_control_motion_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_CONTROL);
|
|
|
|
MENU_BACK(MSG_CONTROL);
|
|
|
|
#if HAS_BED_PROBE
|
|
|
|
#if HAS_BED_PROBE
|
|
|
|
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
|
|
|
|
MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -1890,7 +1895,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void lcd_control_volumetric_menu() {
|
|
|
|
static void lcd_control_volumetric_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_CONTROL);
|
|
|
|
MENU_BACK(MSG_CONTROL);
|
|
|
|
|
|
|
|
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers);
|
|
|
|
MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers);
|
|
|
|
|
|
|
|
|
|
|
@ -1947,7 +1952,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_control_retract_menu() {
|
|
|
|
static void lcd_control_retract_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_CONTROL);
|
|
|
|
MENU_BACK(MSG_CONTROL);
|
|
|
|
MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
|
|
|
|
MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
|
|
|
|
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
|
|
|
|
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
#if EXTRUDERS > 1
|
|
|
@ -1989,7 +1994,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card)
|
|
|
|
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card)
|
|
|
|
uint16_t fileCnt = card.getnrfilenames();
|
|
|
|
uint16_t fileCnt = card.getnrfilenames();
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_MAIN);
|
|
|
|
MENU_BACK(MSG_MAIN);
|
|
|
|
card.getWorkDirName();
|
|
|
|
card.getWorkDirName();
|
|
|
|
if (card.filename[0] == '/') {
|
|
|
|
if (card.filename[0] == '/') {
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
@ -2121,13 +2126,13 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
|
|
|
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
|
|
|
START_SCREEN();
|
|
|
|
START_SCREEN();
|
|
|
|
STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
|
|
|
|
STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
|
|
|
|
STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000
|
|
|
|
STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000
|
|
|
|
STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION); // Protocol: 1.0
|
|
|
|
STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0
|
|
|
|
#ifdef POWER_SUPPLY
|
|
|
|
#ifdef POWER_SUPPLY
|
|
|
|
#if (POWER_SUPPLY == 1)
|
|
|
|
#if (POWER_SUPPLY == 1)
|
|
|
|
STATIC_ITEM(MSG_INFO_PSU ": ATX"); // Power Supply: ATX
|
|
|
|
STATIC_ITEM(MSG_INFO_PSU ": ATX", true); // Power Supply: ATX
|
|
|
|
#elif (POWER_SUPPLY == 2)
|
|
|
|
#elif (POWER_SUPPLY == 2)
|
|
|
|
STATIC_ITEM(MSG_INFO_PSU ": XBox"); // Power Supply: XBox
|
|
|
|
STATIC_ITEM(MSG_INFO_PSU ": XBox", true); // Power Supply: XBox
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif // POWER_SUPPLY
|
|
|
|
#endif // POWER_SUPPLY
|
|
|
|
END_SCREEN();
|
|
|
|
END_SCREEN();
|
|
|
@ -2142,11 +2147,11 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
|
|
|
if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; }
|
|
|
|
START_SCREEN();
|
|
|
|
START_SCREEN();
|
|
|
|
STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
|
|
|
|
STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
|
|
|
|
STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch
|
|
|
|
STATIC_ITEM(SHORT_BUILD_VERSION, true); // x.x.x-Branch
|
|
|
|
STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM
|
|
|
|
STATIC_ITEM(STRING_DISTRIBUTION_DATE, true); // YYYY-MM-DD HH:MM
|
|
|
|
STATIC_ITEM(MACHINE_NAME); // My3DPrinter
|
|
|
|
STATIC_ITEM(MACHINE_NAME, true); // My3DPrinter
|
|
|
|
STATIC_ITEM(WEBSITE_URL); // www.my3dprinter.com
|
|
|
|
STATIC_ITEM(WEBSITE_URL, true); // www.my3dprinter.com
|
|
|
|
STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2
|
|
|
|
STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS), true); // Extruders: 2
|
|
|
|
END_SCREEN();
|
|
|
|
END_SCREEN();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -2157,7 +2162,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void lcd_info_menu() {
|
|
|
|
static void lcd_info_menu() {
|
|
|
|
START_MENU();
|
|
|
|
START_MENU();
|
|
|
|
MENU_ITEM(back, MSG_MAIN);
|
|
|
|
MENU_BACK(MSG_MAIN);
|
|
|
|
MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, lcd_info_printer_menu); // Printer Info >
|
|
|
|
MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, lcd_info_printer_menu); // Printer Info >
|
|
|
|
MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu); // Board Info >
|
|
|
|
MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu); // Board Info >
|
|
|
|
MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors >
|
|
|
|
MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors >
|
|
|
@ -2363,14 +2368,14 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
callbackFunc = callback; \
|
|
|
|
callbackFunc = callback; \
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
menu_edit_type(int, int3, itostr3, 1);
|
|
|
|
menu_edit_type(int, int3, itostr3, 1)
|
|
|
|
menu_edit_type(float, float3, ftostr3, 1);
|
|
|
|
menu_edit_type(float, float3, ftostr3, 1)
|
|
|
|
menu_edit_type(float, float32, ftostr32, 100);
|
|
|
|
menu_edit_type(float, float32, ftostr32, 100)
|
|
|
|
menu_edit_type(float, float43, ftostr43sign, 1000);
|
|
|
|
menu_edit_type(float, float43, ftostr43sign, 1000)
|
|
|
|
menu_edit_type(float, float5, ftostr5rj, 0.01);
|
|
|
|
menu_edit_type(float, float5, ftostr5rj, 0.01)
|
|
|
|
menu_edit_type(float, float51, ftostr51sign, 10);
|
|
|
|
menu_edit_type(float, float51, ftostr51sign, 10)
|
|
|
|
menu_edit_type(float, float52, ftostr52sign, 100);
|
|
|
|
menu_edit_type(float, float52, ftostr52sign, 100)
|
|
|
|
menu_edit_type(unsigned long, long5, ftostr5rj, 0.01);
|
|
|
|
menu_edit_type(unsigned long, long5, ftostr5rj, 0.01)
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -2431,7 +2436,7 @@ void kill_screen(const char* lcd_msg) {
|
|
|
|
* Menu actions
|
|
|
|
* Menu actions
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void menu_action_back() { lcd_goto_previous_menu(); }
|
|
|
|
static void _menu_action_back() { lcd_goto_previous_menu(); }
|
|
|
|
static void menu_action_submenu(screenFunc_t func) { lcd_save_previous_menu(); lcd_goto_screen(func); }
|
|
|
|
static void menu_action_submenu(screenFunc_t func) { lcd_save_previous_menu(); lcd_goto_screen(func); }
|
|
|
|
static void menu_action_gcode(const char* pgcode) { enqueue_and_echo_commands_P(pgcode); }
|
|
|
|
static void menu_action_gcode(const char* pgcode) { enqueue_and_echo_commands_P(pgcode); }
|
|
|
|
static void menu_action_function(screenFunc_t func) { (*func)(); }
|
|
|
|
static void menu_action_function(screenFunc_t func) { (*func)(); }
|
|
|
|