Aliases for common menu item types

This commit is contained in:
Scott Lahteine 2019-10-03 05:38:30 -05:00
parent df48ef6df3
commit 273cbe931e
23 changed files with 594 additions and 590 deletions

View File

@ -134,7 +134,7 @@ void MenuItem_gcode::action(PGM_P const, PGM_P const pgcode) { queue.inject_P(pg
* void MenuItem_int3::action_edit(PGM_P const pstr, int16_t * const ptr, const int16_t minValue, const int16_t maxValue, const screenFunc_t callback = null, const bool live = false); * void MenuItem_int3::action_edit(PGM_P const pstr, int16_t * const ptr, const int16_t minValue, const int16_t maxValue, const screenFunc_t callback = null, const bool live = false);
* *
* You can then use one of the menu macros to present the edit interface: * You can then use one of the menu macros to present the edit interface:
* MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999) * EDIT_ITEM(int3, MSG_SPEED, &feedrate_percentage, 10, 999)
* *
* This expands into a more primitive menu item: * This expands into a more primitive menu item:
* MENU_ITEM_VARIANT(int3, _edit, MSG_SPEED, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) * MENU_ITEM_VARIANT(int3, _edit, MSG_SPEED, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)

View File

@ -293,17 +293,17 @@ class MenuItem_bool {
* MenuItem_<type>::action[_variant](arg3...) * MenuItem_<type>::action[_variant](arg3...)
* *
* Examples: * Examples:
* MENU_ITEM(back, MSG_WATCH, 0 [dummy parameter] ) * BACK_ITEM(MSG_WATCH)
* or * MENU_ITEM(back, MSG_WATCH)
* MENU_BACK(MSG_WATCH)
* draw_menu_item_back(sel, row, PSTR(MSG_WATCH)) * draw_menu_item_back(sel, row, PSTR(MSG_WATCH))
* MenuItem_back::action() * MenuItem_back::action()
* *
* ACTION_ITEM(MSG_PAUSE_PRINT, lcd_sdcard_pause)
* MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause) * MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause)
* draw_menu_item_function(sel, row, PSTR(MSG_PAUSE_PRINT), lcd_sdcard_pause) * draw_menu_item_function(sel, row, PSTR(MSG_PAUSE_PRINT), lcd_sdcard_pause)
* MenuItem_function::action(lcd_sdcard_pause) * MenuItem_function::action(lcd_sdcard_pause)
* *
* MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999) * EDIT_ITEM(int3, MSG_SPEED, &feedrate_percentage, 10, 999)
* draw_menu_item_edit_int3(sel, row, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) * draw_menu_item_edit_int3(sel, row, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
* MenuItem_int3::action_edit(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) * MenuItem_int3::action_edit(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
* *
@ -346,14 +346,16 @@ class MenuItem_bool {
#define STATIC_ITEM(LABEL, V...) STATIC_ITEM_P(PSTR(LABEL), ##V) #define STATIC_ITEM(LABEL, V...) STATIC_ITEM_P(PSTR(LABEL), ##V)
#define MENU_BACK(LABEL) MENU_ITEM(back, LABEL) #define MENU_ITEM_P(TYPE, PLABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, , false, PLABEL, ##V)
#define MENU_ITEM_DUMMY() do { _thisItemNr++; }while(0) #define MENU_ITEM(TYPE, LABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, , false, PSTR(LABEL), ##V)
#define MENU_ITEM_P(TYPE, PLABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, , false, PLABEL, ##V) #define EDIT_ITEM(TYPE, LABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, _edit, false, PSTR(LABEL), ##V)
#define MENU_ITEM(TYPE, LABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, , false, PSTR(LABEL), ##V) #define EDIT_ITEM_FAST(TYPE, LABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, _edit, true, PSTR(LABEL), ##V)
#define MENU_ITEM_EDIT(TYPE, LABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, _edit, false, PSTR(LABEL), ##V)
#define MENU_ITEM_EDIT_CALLBACK(TYPE, LABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, _edit, false, PSTR(LABEL), ##V) #define SKIP_ITEM() (_thisItemNr++)
#define MENU_MULTIPLIER_ITEM_EDIT(TYPE, LABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, _edit, true, PSTR(LABEL), ##V) #define BACK_ITEM(LABEL) MENU_ITEM(back,LABEL)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(TYPE, LABEL, V...) _MENU_ITEM_VARIANT_P(TYPE, _edit, true, PSTR(LABEL), ##V) #define SUBMENU(LABEL, DEST) MENU_ITEM(submenu, LABEL, DEST)
#define GCODES_ITEM(LABEL, GCODES) MENU_ITEM(gcode, LABEL, GCODES)
#define ACTION_ITEM(LABEL, ACTION) MENU_ITEM(function, LABEL, ACTION)
//////////////////////////////////////////// ////////////////////////////////////////////
/////////////// Menu Screens /////////////// /////////////// Menu Screens ///////////////

View File

@ -62,13 +62,13 @@ void menu_backlash();
void menu_dac() { void menu_dac() {
dac_driver_getValues(); dac_driver_getValues();
START_MENU(); START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
#define EDIT_DAC_PERCENT(N) MENU_ITEM_EDIT_CALLBACK(uint8, MSG_##N " " MSG_DAC_PERCENT, &driverPercent[_AXIS(N)], 0, 100, dac_driver_commit) #define EDIT_DAC_PERCENT(N) EDIT_ITEM(uint8, MSG_##N " " MSG_DAC_PERCENT, &driverPercent[_AXIS(N)], 0, 100, dac_driver_commit)
EDIT_DAC_PERCENT(X); EDIT_DAC_PERCENT(X);
EDIT_DAC_PERCENT(Y); EDIT_DAC_PERCENT(Y);
EDIT_DAC_PERCENT(Z); EDIT_DAC_PERCENT(Z);
EDIT_DAC_PERCENT(E); EDIT_DAC_PERCENT(E);
MENU_ITEM(function, MSG_DAC_EEPROM_WRITE, dac_commit_eeprom); ACTION_ITEM(MSG_DAC_EEPROM_WRITE, dac_commit_eeprom);
END_MENU(); END_MENU();
} }
@ -80,8 +80,8 @@ void menu_backlash();
void menu_pwm() { void menu_pwm() {
START_MENU(); START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
#define EDIT_CURRENT_PWM(LABEL,I) MENU_ITEM_EDIT_CALLBACK(long5, LABEL, &stepper.motor_current_setting[I], 100, 2000, stepper.refresh_motor_power) #define EDIT_CURRENT_PWM(LABEL,I) EDIT_ITEM(long5, LABEL, &stepper.motor_current_setting[I], 100, 2000, stepper.refresh_motor_power)
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
EDIT_CURRENT_PWM(MSG_X MSG_Y, 0); EDIT_CURRENT_PWM(MSG_X MSG_Y, 0);
#endif #endif
@ -116,13 +116,13 @@ void menu_backlash();
// //
void menu_advanced_filament() { void menu_advanced_filament() {
START_MENU(); START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
#if EXTRUDERS == 1 #if EXTRUDERS == 1
MENU_ITEM_EDIT(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999); EDIT_ITEM(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
#elif EXTRUDERS > 1 #elif EXTRUDERS > 1
#define EDIT_ADVANCE_K(N) MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E##N, &planner.extruder_advance_K[N-1], 0, 999) #define EDIT_ADVANCE_K(N) EDIT_ITEM(float52, MSG_ADVANCE_K MSG_E##N, &planner.extruder_advance_K[N-1], 0, 999)
EDIT_ADVANCE_K(1); EDIT_ADVANCE_K(1);
EDIT_ADVANCE_K(2); EDIT_ADVANCE_K(2);
#if EXTRUDERS > 2 #if EXTRUDERS > 2
@ -141,14 +141,14 @@ void menu_backlash();
#endif #endif
#if DISABLED(NO_VOLUMETRICS) #if DISABLED(NO_VOLUMETRICS)
MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &parser.volumetric_enabled, planner.calculate_volumetric_multipliers); EDIT_ITEM(bool, MSG_VOLUMETRIC_ENABLED, &parser.volumetric_enabled, planner.calculate_volumetric_multipliers);
if (parser.volumetric_enabled) { if (parser.volumetric_enabled) {
#if EXTRUDERS == 1 #if EXTRUDERS == 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &planner.filament_size[0], 1.5f, 3.25f, planner.calculate_volumetric_multipliers); EDIT_ITEM_FAST(float43, MSG_FILAMENT_DIAM, &planner.filament_size[0], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
#else // EXTRUDERS > 1 #else // EXTRUDERS > 1
#define EDIT_FIL_DIAM(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E##N, &planner.filament_size[N-1], 1.5f, 3.25f, planner.calculate_volumetric_multipliers) #define EDIT_FIL_DIAM(N) EDIT_ITEM_FAST(float43, MSG_FILAMENT_DIAM MSG_DIAM_E##N, &planner.filament_size[N-1], 1.5f, 3.25f, planner.calculate_volumetric_multipliers)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &planner.filament_size[active_extruder], 1.5f, 3.25f, planner.calculate_volumetric_multipliers); EDIT_ITEM_FAST(float43, MSG_FILAMENT_DIAM, &planner.filament_size[active_extruder], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
EDIT_FIL_DIAM(1); EDIT_FIL_DIAM(1);
EDIT_FIL_DIAM(2); EDIT_FIL_DIAM(2);
#if EXTRUDERS > 2 #if EXTRUDERS > 2
@ -177,10 +177,10 @@ void menu_backlash();
; ;
#if EXTRUDERS == 1 #if EXTRUDERS == 1
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD, &fc_settings[0].unload_length, 0, extrude_maxlength); EDIT_ITEM_FAST(float3, MSG_FILAMENT_UNLOAD, &fc_settings[0].unload_length, 0, extrude_maxlength);
#elif EXTRUDERS > 1 #elif EXTRUDERS > 1
#define EDIT_FIL_UNLOAD(N) MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E##N, &fc_settings[N-1].unload_length, 0, extrude_maxlength) #define EDIT_FIL_UNLOAD(N) EDIT_ITEM_FAST(float3, MSG_FILAMENT_UNLOAD MSG_DIAM_E##N, &fc_settings[N-1].unload_length, 0, extrude_maxlength)
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_UNLOAD, &fc_settings[active_extruder].unload_length, 0, extrude_maxlength); EDIT_ITEM_FAST(float3, MSG_FILAMENT_UNLOAD, &fc_settings[active_extruder].unload_length, 0, extrude_maxlength);
EDIT_FIL_UNLOAD(1); EDIT_FIL_UNLOAD(1);
EDIT_FIL_UNLOAD(2); EDIT_FIL_UNLOAD(2);
#if EXTRUDERS > 2 #if EXTRUDERS > 2
@ -198,10 +198,10 @@ void menu_backlash();
#endif // EXTRUDERS > 1 #endif // EXTRUDERS > 1
#if EXTRUDERS == 1 #if EXTRUDERS == 1
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD, &fc_settings[0].load_length, 0, extrude_maxlength); EDIT_ITEM_FAST(float3, MSG_FILAMENT_LOAD, &fc_settings[0].load_length, 0, extrude_maxlength);
#elif EXTRUDERS > 1 #elif EXTRUDERS > 1
#define EDIT_FIL_LOAD(N) MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD MSG_DIAM_E##N, &fc_settings[N-1].load_length, 0, extrude_maxlength) #define EDIT_FIL_LOAD(N) EDIT_ITEM_FAST(float3, MSG_FILAMENT_LOAD MSG_DIAM_E##N, &fc_settings[N-1].load_length, 0, extrude_maxlength)
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_FILAMENT_LOAD, &fc_settings[active_extruder].load_length, 0, extrude_maxlength); EDIT_ITEM_FAST(float3, MSG_FILAMENT_LOAD, &fc_settings[active_extruder].load_length, 0, extrude_maxlength);
EDIT_FIL_LOAD(1); EDIT_FIL_LOAD(1);
EDIT_FIL_LOAD(2); EDIT_FIL_LOAD(2);
#if EXTRUDERS > 2 #if EXTRUDERS > 2
@ -220,7 +220,7 @@ void menu_backlash();
#endif #endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && FILAMENT_RUNOUT_DISTANCE_MM #if ENABLED(FILAMENT_RUNOUT_SENSOR) && FILAMENT_RUNOUT_DISTANCE_MM
MENU_ITEM_EDIT_CALLBACK(float3, MSG_RUNOUT_DISTANCE_MM, &lcd_runout_distance_mm, 1, 30, []{ EDIT_ITEM(float3, MSG_RUNOUT_DISTANCE_MM, &lcd_runout_distance_mm, 1, 30, []{
runout.set_runout_distance(lcd_runout_distance_mm); runout.set_runout_distance(lcd_runout_distance_mm);
}); });
#endif #endif
@ -328,15 +328,15 @@ void menu_backlash();
void menu_advanced_temperature() { void menu_advanced_temperature() {
START_MENU(); START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
// //
// Autotemp, Min, Max, Fact // Autotemp, Min, Max, Fact
// //
#if ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND #if ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND
MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &planner.autotemp_enabled); EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
MENU_ITEM_EDIT(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15); EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
MENU_ITEM_EDIT(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15); EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
MENU_ITEM_EDIT(float52, MSG_FACTOR, &planner.autotemp_factor, 0, 10); EDIT_ITEM(float52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
#endif #endif
// //
@ -352,14 +352,14 @@ void menu_backlash();
#define _PID_BASE_MENU_ITEMS(ELABEL, eindex) \ #define _PID_BASE_MENU_ITEMS(ELABEL, eindex) \
raw_Ki = unscalePID_i(PID_PARAM(Ki, eindex)); \ raw_Ki = unscalePID_i(PID_PARAM(Ki, eindex)); \
raw_Kd = unscalePID_d(PID_PARAM(Kd, eindex)); \ raw_Kd = unscalePID_d(PID_PARAM(Kd, eindex)); \
MENU_ITEM_EDIT(float52sign, MSG_PID_P ELABEL, &PID_PARAM(Kp, eindex), 1, 9990); \ EDIT_ITEM(float52sign, MSG_PID_P ELABEL, &PID_PARAM(Kp, eindex), 1, 9990); \
MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_PID_I ELABEL, &raw_Ki, 0.01f, 9990, copy_and_scalePID_i_E ## eindex); \ EDIT_ITEM(float52sign, MSG_PID_I ELABEL, &raw_Ki, 0.01f, 9990, copy_and_scalePID_i_E ## eindex); \
MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_PID_D ELABEL, &raw_Kd, 1, 9990, copy_and_scalePID_d_E ## eindex) EDIT_ITEM(float52sign, MSG_PID_D ELABEL, &raw_Kd, 1, 9990, copy_and_scalePID_d_E ## eindex)
#if ENABLED(PID_EXTRUSION_SCALING) #if ENABLED(PID_EXTRUSION_SCALING)
#define _PID_EDIT_MENU_ITEMS(ELABEL, eindex) \ #define _PID_EDIT_MENU_ITEMS(ELABEL, eindex) \
_PID_BASE_MENU_ITEMS(ELABEL, eindex); \ _PID_BASE_MENU_ITEMS(ELABEL, eindex); \
MENU_ITEM_EDIT(float3, MSG_PID_C ELABEL, &PID_PARAM(Kc, eindex), 1, 9990) EDIT_ITEM(float3, MSG_PID_C ELABEL, &PID_PARAM(Kc, eindex), 1, 9990)
#else #else
#define _PID_EDIT_MENU_ITEMS(ELABEL, eindex) _PID_BASE_MENU_ITEMS(ELABEL, eindex) #define _PID_EDIT_MENU_ITEMS(ELABEL, eindex) _PID_BASE_MENU_ITEMS(ELABEL, eindex)
#endif #endif
@ -373,7 +373,7 @@ void menu_backlash();
#if ENABLED(PID_AUTOTUNE_MENU) #if ENABLED(PID_AUTOTUNE_MENU)
#define PID_EDIT_MENU_ITEMS(ELABEL, eindex) \ #define PID_EDIT_MENU_ITEMS(ELABEL, eindex) \
_PID_EDIT_MENU_ITEMS(ELABEL, eindex); \ _PID_EDIT_MENU_ITEMS(ELABEL, eindex); \
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PID_AUTOTUNE ELABEL, &autotune_temp[eindex], 150, heater_maxtemp[eindex] - 15, lcd_autotune_callback_E ## eindex) EDIT_ITEM_FAST(int3, MSG_PID_AUTOTUNE ELABEL, &autotune_temp[eindex], 150, heater_maxtemp[eindex] - 15, lcd_autotune_callback_E ## eindex)
#else #else
#define PID_EDIT_MENU_ITEMS(ELABEL, eindex) _PID_EDIT_MENU_ITEMS(ELABEL, eindex) #define PID_EDIT_MENU_ITEMS(ELABEL, eindex) _PID_EDIT_MENU_ITEMS(ELABEL, eindex)
#endif #endif
@ -450,7 +450,7 @@ void menu_backlash();
// M203 / M205 Velocity options // M203 / M205 Velocity options
void menu_advanced_velocity() { void menu_advanced_velocity() {
START_MENU(); START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
// M203 Max Feedrate // M203 Max Feedrate
constexpr xyze_feedrate_t max_fr_edit = constexpr xyze_feedrate_t max_fr_edit =
@ -467,14 +467,14 @@ void menu_backlash();
#else #else
const xyze_feedrate_t &max_fr_edit_scaled = max_fr_edit; const xyze_feedrate_t &max_fr_edit_scaled = max_fr_edit;
#endif #endif
#define EDIT_VMAX(N) MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_##N, &planner.settings.max_feedrate_mm_s[_AXIS(N)], 1, max_fr_edit_scaled[_AXIS(N)]) #define EDIT_VMAX(N) EDIT_ITEM_FAST(float3, MSG_VMAX MSG_##N, &planner.settings.max_feedrate_mm_s[_AXIS(N)], 1, max_fr_edit_scaled[_AXIS(N)])
EDIT_VMAX(A); EDIT_VMAX(A);
EDIT_VMAX(B); EDIT_VMAX(B);
EDIT_VMAX(C); EDIT_VMAX(C);
#if ENABLED(DISTINCT_E_FACTORS) #if ENABLED(DISTINCT_E_FACTORS)
#define EDIT_VMAX_E(N) MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E##N, &planner.settings.max_feedrate_mm_s[E_AXIS_N(N-1)], 1, max_fr_edit_scaled.e) #define EDIT_VMAX_E(N) EDIT_ITEM_FAST(float3, MSG_VMAX MSG_E##N, &planner.settings.max_feedrate_mm_s[E_AXIS_N(N-1)], 1, max_fr_edit_scaled.e)
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS_N(active_extruder)], 1, max_fr_edit_scaled.e); EDIT_ITEM_FAST(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS_N(active_extruder)], 1, max_fr_edit_scaled.e);
EDIT_VMAX_E(1); EDIT_VMAX_E(1);
EDIT_VMAX_E(2); EDIT_VMAX_E(2);
#if E_STEPPERS > 2 #if E_STEPPERS > 2
@ -490,14 +490,14 @@ void menu_backlash();
#endif // E_STEPPERS > 3 #endif // E_STEPPERS > 3
#endif // E_STEPPERS > 2 #endif // E_STEPPERS > 2
#elif E_STEPPERS #elif E_STEPPERS
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS], 1, max_fr_edit_scaled.e); EDIT_ITEM_FAST(float3, MSG_VMAX MSG_E, &planner.settings.max_feedrate_mm_s[E_AXIS], 1, max_fr_edit_scaled.e);
#endif #endif
// M205 S Min Feedrate // M205 S Min Feedrate
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VMIN, &planner.settings.min_feedrate_mm_s, 0, 999); EDIT_ITEM_FAST(float3, MSG_VMIN, &planner.settings.min_feedrate_mm_s, 0, 999);
// M205 T Min Travel Feedrate // M205 T Min Travel Feedrate
MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_VTRAV_MIN, &planner.settings.min_travel_feedrate_mm_s, 0, 999); EDIT_ITEM_FAST(float3, MSG_VTRAV_MIN, &planner.settings.min_travel_feedrate_mm_s, 0, 999);
END_MENU(); END_MENU();
} }
@ -505,17 +505,17 @@ void menu_backlash();
// M201 / M204 Accelerations // M201 / M204 Accelerations
void menu_advanced_acceleration() { void menu_advanced_acceleration() {
START_MENU(); START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
static float max_accel = _MAX(planner.settings.max_acceleration_mm_per_s2[A_AXIS], planner.settings.max_acceleration_mm_per_s2[B_AXIS], planner.settings.max_acceleration_mm_per_s2[C_AXIS]); static float max_accel = _MAX(planner.settings.max_acceleration_mm_per_s2[A_AXIS], planner.settings.max_acceleration_mm_per_s2[B_AXIS], planner.settings.max_acceleration_mm_per_s2[C_AXIS]);
// M204 P Acceleration // M204 P Acceleration
MENU_MULTIPLIER_ITEM_EDIT(float5_25, MSG_ACC, &planner.settings.acceleration, 25, max_accel); EDIT_ITEM_FAST(float5_25, MSG_ACC, &planner.settings.acceleration, 25, max_accel);
// M204 R Retract Acceleration // M204 R Retract Acceleration
MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, max_accel); EDIT_ITEM_FAST(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, max_accel);
// M204 T Travel Acceleration // M204 T Travel Acceleration
MENU_MULTIPLIER_ITEM_EDIT(float5_25, MSG_A_TRAVEL, &planner.settings.travel_acceleration, 25, max_accel); EDIT_ITEM_FAST(float5_25, MSG_A_TRAVEL, &planner.settings.travel_acceleration, 25, max_accel);
// M201 settings // M201 settings
constexpr xyze_ulong_t max_accel_edit = constexpr xyze_ulong_t max_accel_edit =
@ -533,15 +533,15 @@ void menu_backlash();
const xyze_ulong_t &max_accel_edit_scaled = max_accel_edit; const xyze_ulong_t &max_accel_edit_scaled = max_accel_edit;
#endif #endif
#define EDIT_AMAX(Q,L) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5_25, MSG_AMAX MSG_##Q, &planner.settings.max_acceleration_mm_per_s2[_AXIS(Q)], L, max_accel_edit_scaled[_AXIS(Q)], _reset_acceleration_rates) #define EDIT_AMAX(Q,L) EDIT_ITEM_FAST(long5_25, MSG_AMAX MSG_##Q, &planner.settings.max_acceleration_mm_per_s2[_AXIS(Q)], L, max_accel_edit_scaled[_AXIS(Q)], _reset_acceleration_rates)
EDIT_AMAX(A,100); EDIT_AMAX(A,100);
EDIT_AMAX(B,100); EDIT_AMAX(B,100);
EDIT_AMAX(C, 10); EDIT_AMAX(C, 10);
#if ENABLED(DISTINCT_E_FACTORS) #if ENABLED(DISTINCT_E_FACTORS)
#define EDIT_AMAX_E(N,E) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5_25, MSG_AMAX MSG_E##N, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(E)], 100, max_accel_edit_scaled.e, _reset_e##E##_acceleration_rate) #define EDIT_AMAX_E(N,E) EDIT_ITEM_FAST(long5_25, MSG_AMAX MSG_E##N, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(E)], 100, max_accel_edit_scaled.e, _reset_e##E##_acceleration_rate)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5_25, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(active_extruder)], 100, max_accel_edit_scaled.e, _reset_acceleration_rates); EDIT_ITEM_FAST(long5_25, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(active_extruder)], 100, max_accel_edit_scaled.e, _reset_acceleration_rates);
EDIT_AMAX_E(1,0); EDIT_AMAX_E(1,0);
EDIT_AMAX_E(2,1); EDIT_AMAX_E(2,1);
#if E_STEPPERS > 2 #if E_STEPPERS > 2
@ -557,7 +557,7 @@ void menu_backlash();
#endif // E_STEPPERS > 3 #endif // E_STEPPERS > 3
#endif // E_STEPPERS > 2 #endif // E_STEPPERS > 2
#elif E_STEPPERS #elif E_STEPPERS
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5_25, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, max_accel_edit_scaled.e, _reset_acceleration_rates); EDIT_ITEM_FAST(long5_25, MSG_AMAX MSG_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, max_accel_edit_scaled.e, _reset_acceleration_rates);
#endif #endif
END_MENU(); END_MENU();
@ -566,13 +566,13 @@ void menu_backlash();
// M205 Jerk // M205 Jerk
void menu_advanced_jerk() { void menu_advanced_jerk() {
START_MENU(); START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
#if ENABLED(JUNCTION_DEVIATION) #if ENABLED(JUNCTION_DEVIATION)
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
MENU_ITEM_EDIT_CALLBACK(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f, planner.recalculate_max_e_jerk); EDIT_ITEM(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f, planner.recalculate_max_e_jerk);
#else #else
MENU_ITEM_EDIT(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f); EDIT_ITEM(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.01f, 0.3f);
#endif #endif
#endif #endif
#if HAS_CLASSIC_JERK #if HAS_CLASSIC_JERK
@ -585,16 +585,16 @@ void menu_backlash();
{ 990, 990, 990, 990 } { 990, 990, 990, 990 }
#endif #endif
; ;
#define EDIT_JERK(N) MENU_MULTIPLIER_ITEM_EDIT(float3, MSG_V##N##_JERK, &planner.max_jerk[_AXIS(N)], 1, max_jerk_edit[_AXIS(N)]) #define EDIT_JERK(N) EDIT_ITEM_FAST(float3, MSG_V##N##_JERK, &planner.max_jerk[_AXIS(N)], 1, max_jerk_edit[_AXIS(N)])
EDIT_JERK(A); EDIT_JERK(A);
EDIT_JERK(B); EDIT_JERK(B);
#if ENABLED(DELTA) #if ENABLED(DELTA)
EDIT_JERK(C); EDIT_JERK(C);
#else #else
MENU_MULTIPLIER_ITEM_EDIT(float52sign, MSG_VC_JERK, &planner.max_jerk.c, 0.1f, max_jerk_edit.c); EDIT_ITEM_FAST(float52sign, MSG_VC_JERK, &planner.max_jerk.c, 0.1f, max_jerk_edit.c);
#endif #endif
#if !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE) #if !BOTH(JUNCTION_DEVIATION, LIN_ADVANCE)
MENU_MULTIPLIER_ITEM_EDIT(float52sign, MSG_VE_JERK, &planner.max_jerk.e, 0.1f, max_jerk_edit.e); EDIT_ITEM_FAST(float52sign, MSG_VE_JERK, &planner.max_jerk.e, 0.1f, max_jerk_edit.e);
#endif #endif
#endif #endif
@ -604,16 +604,16 @@ void menu_backlash();
// M92 Steps-per-mm // M92 Steps-per-mm
void menu_advanced_steps_per_mm() { void menu_advanced_steps_per_mm() {
START_MENU(); START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
#define EDIT_QSTEPS(Q) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_##Q##STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, _planner_refresh_positioning) #define EDIT_QSTEPS(Q) EDIT_ITEM_FAST(float51, MSG_##Q##STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, _planner_refresh_positioning)
EDIT_QSTEPS(A); EDIT_QSTEPS(A);
EDIT_QSTEPS(B); EDIT_QSTEPS(B);
EDIT_QSTEPS(C); EDIT_QSTEPS(C);
#if ENABLED(DISTINCT_E_FACTORS) #if ENABLED(DISTINCT_E_FACTORS)
#define EDIT_ESTEPS(N,E) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_E##N##STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(E)], 5, 9999, _planner_refresh_e##E##_positioning) #define EDIT_ESTEPS(N,E) EDIT_ITEM_FAST(float51, MSG_E##N##STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(E)], 5, 9999, _planner_refresh_e##E##_positioning)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(active_extruder)], 5, 9999, _planner_refresh_positioning); EDIT_ITEM_FAST(float51, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(active_extruder)], 5, 9999, _planner_refresh_positioning);
EDIT_ESTEPS(1,0); EDIT_ESTEPS(1,0);
EDIT_ESTEPS(2,1); EDIT_ESTEPS(2,1);
#if E_STEPPERS > 2 #if E_STEPPERS > 2
@ -629,7 +629,7 @@ void menu_backlash();
#endif // E_STEPPERS > 3 #endif // E_STEPPERS > 3
#endif // E_STEPPERS > 2 #endif // E_STEPPERS > 2
#elif E_STEPPERS #elif E_STEPPERS
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning); EDIT_ITEM_FAST(float51, MSG_ESTEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning);
#endif #endif
END_MENU(); END_MENU();
@ -663,7 +663,7 @@ void menu_advanced_settings() {
lcd_runout_distance_mm = runout.runout_distance(); lcd_runout_distance_mm = runout.runout_distance();
#endif #endif
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
#if DISABLED(SLIM_LCD_MENUS) #if DISABLED(SLIM_LCD_MENUS)
@ -671,50 +671,50 @@ void menu_advanced_settings() {
// //
// Set Home Offsets // Set Home Offsets
// //
MENU_ITEM(function, MSG_SET_HOME_OFFSETS, _lcd_set_home_offsets); ACTION_ITEM(MSG_SET_HOME_OFFSETS, _lcd_set_home_offsets);
#endif #endif
// M203 / M205 - Feedrate items // M203 / M205 - Feedrate items
MENU_ITEM(submenu, MSG_VELOCITY, menu_advanced_velocity); SUBMENU(MSG_VELOCITY, menu_advanced_velocity);
// M201 - Acceleration items // M201 - Acceleration items
MENU_ITEM(submenu, MSG_ACCELERATION, menu_advanced_acceleration); SUBMENU(MSG_ACCELERATION, menu_advanced_acceleration);
// M205 - Max Jerk // M205 - Max Jerk
MENU_ITEM(submenu, MSG_JERK, menu_advanced_jerk); SUBMENU(MSG_JERK, menu_advanced_jerk);
if (!printer_busy()) { if (!printer_busy()) {
// M92 - Steps Per mm // M92 - Steps Per mm
MENU_ITEM(submenu, MSG_STEPS_PER_MM, menu_advanced_steps_per_mm); SUBMENU(MSG_STEPS_PER_MM, menu_advanced_steps_per_mm);
} }
#endif // !SLIM_LCD_MENUS #endif // !SLIM_LCD_MENUS
#if ENABLED(BACKLASH_GCODE) #if ENABLED(BACKLASH_GCODE)
MENU_ITEM(submenu, MSG_BACKLASH, menu_backlash); SUBMENU(MSG_BACKLASH, menu_backlash);
#endif #endif
#if ENABLED(DAC_STEPPER_CURRENT) #if ENABLED(DAC_STEPPER_CURRENT)
MENU_ITEM(submenu, MSG_DRIVE_STRENGTH, menu_dac); SUBMENU(MSG_DRIVE_STRENGTH, menu_dac);
#endif #endif
#if HAS_MOTOR_CURRENT_PWM #if HAS_MOTOR_CURRENT_PWM
MENU_ITEM(submenu, MSG_DRIVE_STRENGTH, menu_pwm); SUBMENU(MSG_DRIVE_STRENGTH, menu_pwm);
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC
MENU_ITEM(submenu, MSG_TMC_DRIVERS, menu_tmc); SUBMENU(MSG_TMC_DRIVERS, menu_tmc);
#endif #endif
#if SHOW_MENU_ADVANCED_TEMPERATURE #if SHOW_MENU_ADVANCED_TEMPERATURE
MENU_ITEM(submenu, MSG_TEMPERATURE, menu_advanced_temperature); SUBMENU(MSG_TEMPERATURE, menu_advanced_temperature);
#endif #endif
#if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE) #if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
MENU_ITEM(submenu, MSG_FILAMENT, menu_advanced_filament); SUBMENU(MSG_FILAMENT, menu_advanced_filament);
#elif ENABLED(LIN_ADVANCE) #elif ENABLED(LIN_ADVANCE)
#if EXTRUDERS == 1 #if EXTRUDERS == 1
MENU_ITEM_EDIT(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999); EDIT_ITEM(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
#elif EXTRUDERS > 1 #elif EXTRUDERS > 1
#define EDIT_ADVANCE_K(N) MENU_ITEM_EDIT(float52, MSG_ADVANCE_K MSG_E##N, &planner.extruder_advance_K[N-1], 0, 999) #define EDIT_ADVANCE_K(N) EDIT_ITEM(float52, MSG_ADVANCE_K MSG_E##N, &planner.extruder_advance_K[N-1], 0, 999)
EDIT_ADVANCE_K(1); EDIT_ADVANCE_K(1);
EDIT_ADVANCE_K(2); EDIT_ADVANCE_K(2);
#if EXTRUDERS > 2 #if EXTRUDERS > 2
@ -734,12 +734,12 @@ void menu_advanced_settings() {
// M540 S - Abort on endstop hit when SD printing // M540 S - Abort on endstop hit when SD printing
#if ENABLED(SD_ABORT_ON_ENDSTOP_HIT) #if ENABLED(SD_ABORT_ON_ENDSTOP_HIT)
MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &planner.abort_on_endstop_hit); EDIT_ITEM(bool, MSG_ENDSTOP_ABORT, &planner.abort_on_endstop_hit);
#endif #endif
#if ENABLED(SD_FIRMWARE_UPDATE) #if ENABLED(SD_FIRMWARE_UPDATE)
bool sd_update_state = settings.sd_update_status(); bool sd_update_state = settings.sd_update_status();
MENU_ITEM_EDIT_CALLBACK(bool, MSG_MEDIA_UPDATE, &sd_update_state, []{ EDIT_ITEM(bool, MSG_MEDIA_UPDATE, &sd_update_state, []{
// //
// Toggle the SD Firmware Update state in EEPROM // Toggle the SD Firmware Update state in EEPROM
// //
@ -754,7 +754,7 @@ void menu_advanced_settings() {
#endif #endif
#if ENABLED(EEPROM_SETTINGS) && DISABLED(SLIM_LCD_MENUS) #if ENABLED(EEPROM_SETTINGS) && DISABLED(SLIM_LCD_MENUS)
MENU_ITEM(submenu, MSG_INIT_EEPROM, lcd_init_eeprom_confirm); SUBMENU(MSG_INIT_EEPROM, lcd_init_eeprom_confirm);
#endif #endif
END_MENU(); END_MENU();

View File

@ -34,17 +34,17 @@
void menu_backlash() { void menu_backlash() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_BACKLASH_CORRECTION, &backlash.correction, all_off, all_on); EDIT_ITEM_FAST(percent, MSG_BACKLASH_CORRECTION, &backlash.correction, all_off, all_on);
#define EDIT_BACKLASH_DISTANCE(N) MENU_MULTIPLIER_ITEM_EDIT(float43, MSG_##N, &backlash.distance_mm[_AXIS(N)], 0.0f, 9.9f); #define EDIT_BACKLASH_DISTANCE(N) EDIT_ITEM_FAST(float43, MSG_##N, &backlash.distance_mm[_AXIS(N)], 0.0f, 9.9f);
EDIT_BACKLASH_DISTANCE(A); EDIT_BACKLASH_DISTANCE(A);
EDIT_BACKLASH_DISTANCE(B); EDIT_BACKLASH_DISTANCE(B);
EDIT_BACKLASH_DISTANCE(C); EDIT_BACKLASH_DISTANCE(C);
#ifdef BACKLASH_SMOOTHING_MM #ifdef BACKLASH_SMOOTHING_MM
MENU_MULTIPLIER_ITEM_EDIT(float43, MSG_BACKLASH_SMOOTHING, &backlash.smoothing_mm, 0.0f, 9.9f); EDIT_ITEM_FAST(float43, MSG_BACKLASH_SMOOTHING, &backlash.smoothing_mm, 0.0f, 9.9f);
#endif #endif
END_MENU(); END_MENU();

View File

@ -210,10 +210,10 @@
void menu_edit_mesh() { void menu_edit_mesh() {
static uint8_t xind, yind; // =0 static uint8_t xind, yind; // =0
START_MENU(); START_MENU();
MENU_BACK(MSG_BED_LEVELING); BACK_ITEM(MSG_BED_LEVELING);
MENU_ITEM_EDIT(uint8, MSG_MESH_X, &xind, 0, GRID_MAX_POINTS_X - 1); EDIT_ITEM(uint8, MSG_MESH_X, &xind, 0, GRID_MAX_POINTS_X - 1);
MENU_ITEM_EDIT(uint8, MSG_MESH_Y, &yind, 0, GRID_MAX_POINTS_Y - 1); EDIT_ITEM(uint8, MSG_MESH_Y, &yind, 0, GRID_MAX_POINTS_Y - 1);
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_MESH_EDIT_Z, &Z_VALUES(xind, yind), -(LCD_PROBE_Z_RANGE) * 0.5, (LCD_PROBE_Z_RANGE) * 0.5, refresh_planner); EDIT_ITEM_FAST(float43, MSG_MESH_EDIT_Z, &Z_VALUES(xind, yind), -(LCD_PROBE_Z_RANGE) * 0.5, (LCD_PROBE_Z_RANGE) * 0.5, refresh_planner);
END_MENU(); END_MENU();
} }
@ -235,60 +235,60 @@
*/ */
void menu_bed_leveling() { void menu_bed_leveling() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MOTION); BACK_ITEM(MSG_MOTION);
const bool is_homed = all_axes_known(); const bool is_homed = all_axes_known();
// Auto Home if not using manual probing // Auto Home if not using manual probing
#if NONE(PROBE_MANUALLY, MESH_BED_LEVELING) #if NONE(PROBE_MANUALLY, MESH_BED_LEVELING)
if (!is_homed) MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); if (!is_homed) GCODES_ITEM(MSG_AUTO_HOME, PSTR("G28"));
#endif #endif
// Level Bed // Level Bed
#if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING) #if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)
// Manual leveling uses a guided procedure // Manual leveling uses a guided procedure
MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue); SUBMENU(MSG_LEVEL_BED, _lcd_level_bed_continue);
#else #else
// Automatic leveling can just run the G-code // Automatic leveling can just run the G-code
MENU_ITEM(gcode, MSG_LEVEL_BED, is_homed ? PSTR("G29") : PSTR("G28\nG29")); GCODES_ITEM(MSG_LEVEL_BED, is_homed ? PSTR("G29") : PSTR("G28\nG29"));
#endif #endif
#if ENABLED(MESH_EDIT_MENU) #if ENABLED(MESH_EDIT_MENU)
if (leveling_is_valid()) if (leveling_is_valid())
MENU_ITEM(submenu, MSG_EDIT_MESH, menu_edit_mesh); SUBMENU(MSG_EDIT_MESH, menu_edit_mesh);
#endif #endif
// Homed and leveling is valid? Then leveling can be toggled. // Homed and leveling is valid? Then leveling can be toggled.
if (is_homed && leveling_is_valid()) { if (is_homed && leveling_is_valid()) {
bool new_level_state = planner.leveling_active; bool new_level_state = planner.leveling_active;
MENU_ITEM_EDIT_CALLBACK(bool, MSG_BED_LEVELING, &new_level_state, _lcd_toggle_bed_leveling); EDIT_ITEM(bool, MSG_BED_LEVELING, &new_level_state, _lcd_toggle_bed_leveling);
} }
// Z Fade Height // Z Fade Height
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float3, MSG_Z_FADE_HEIGHT, &lcd_z_fade_height, 0, 100, _lcd_set_z_fade_height); EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &lcd_z_fade_height, 0, 100, _lcd_set_z_fade_height);
#endif #endif
// //
// Mesh Bed Leveling Z-Offset // Mesh Bed Leveling Z-Offset
// //
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); EDIT_ITEM(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
#endif #endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
#elif HAS_BED_PROBE #elif HAS_BED_PROBE
MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &probe_offset.z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); EDIT_ITEM(float52, MSG_ZPROBE_ZOFFSET, &probe_offset.z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
#endif #endif
#if ENABLED(LEVEL_BED_CORNERS) #if ENABLED(LEVEL_BED_CORNERS)
MENU_ITEM(submenu, MSG_LEVEL_CORNERS, _lcd_level_bed_corners); SUBMENU(MSG_LEVEL_CORNERS, _lcd_level_bed_corners);
#endif #endif
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings); ACTION_ITEM(MSG_LOAD_EEPROM, lcd_load_settings);
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings);
#endif #endif
END_MENU(); END_MENU();
} }

View File

@ -92,10 +92,10 @@ static void lcd_factory_settings() {
void menu_debug() { void menu_debug() {
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
#if ENABLED(LCD_PROGRESS_BAR_TEST) #if ENABLED(LCD_PROGRESS_BAR_TEST)
MENU_ITEM(submenu, MSG_PROGRESS_BAR_TEST, _progress_bar_test); SUBMENU(MSG_PROGRESS_BAR_TEST, _progress_bar_test);
#endif #endif
END_MENU(); END_MENU();
@ -109,7 +109,7 @@ static void lcd_factory_settings() {
void menu_tool_change() { void menu_tool_change() {
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP) #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
static constexpr float max_extrude = static constexpr float max_extrude =
#if ENABLED(PREVENT_LENGTHY_EXTRUDE) #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
@ -118,12 +118,12 @@ static void lcd_factory_settings() {
500 500
#endif #endif
; ;
MENU_ITEM_EDIT(float3, MSG_FILAMENT_SWAP_LENGTH, &toolchange_settings.swap_length, 0, max_extrude); EDIT_ITEM(float3, MSG_FILAMENT_SWAP_LENGTH, &toolchange_settings.swap_length, 0, max_extrude);
MENU_ITEM_EDIT(float3, MSG_FILAMENT_PURGE_LENGTH, &toolchange_settings.extra_prime, 0, max_extrude); EDIT_ITEM(float3, MSG_FILAMENT_PURGE_LENGTH, &toolchange_settings.extra_prime, 0, max_extrude);
MENU_MULTIPLIER_ITEM_EDIT(int4, MSG_SINGLENOZZLE_RETRACT_SPD, &toolchange_settings.retract_speed, 10, 5400); EDIT_ITEM_FAST(int4, MSG_SINGLENOZZLE_RETRACT_SPD, &toolchange_settings.retract_speed, 10, 5400);
MENU_MULTIPLIER_ITEM_EDIT(int4, MSG_SINGLENOZZLE_PRIME_SPD, &toolchange_settings.prime_speed, 10, 5400); EDIT_ITEM_FAST(int4, MSG_SINGLENOZZLE_PRIME_SPD, &toolchange_settings.prime_speed, 10, 5400);
#endif #endif
MENU_ITEM_EDIT(float3, MSG_TOOL_CHANGE_ZLIFT, &toolchange_settings.z_raise, 0, 10); EDIT_ITEM(float3, MSG_TOOL_CHANGE_ZLIFT, &toolchange_settings.z_raise, 0, 10);
END_MENU(); END_MENU();
} }
@ -143,16 +143,16 @@ static void lcd_factory_settings() {
}; };
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float51, MSG_X_OFFSET, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets); EDIT_ITEM_FAST(float51, MSG_X_OFFSET, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets);
#else #else
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52sign, MSG_X_OFFSET, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets); EDIT_ITEM_FAST(float52sign, MSG_X_OFFSET, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets);
#endif #endif
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52sign, MSG_Y_OFFSET, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets); EDIT_ITEM_FAST(float52sign, MSG_Y_OFFSET, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets);
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52sign, MSG_Z_OFFSET, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets); EDIT_ITEM_FAST(float52sign, MSG_Z_OFFSET, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets);
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings);
#endif #endif
END_MENU(); END_MENU();
} }
@ -162,19 +162,21 @@ static void lcd_factory_settings() {
void menu_idex() { void menu_idex() {
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
MENU_ITEM(gcode, MSG_IDEX_MODE_AUTOPARK, PSTR("M605 S1\nG28 X\nG1 X100")); GCODES_ITEM(MSG_IDEX_MODE_AUTOPARK, PSTR("M605 S1\nG28 X\nG1 X100"));
const bool need_g28 = !(TEST(axis_known_position, Y_AXIS) && TEST(axis_known_position, Z_AXIS)); const bool need_g28 = !(TEST(axis_known_position, Y_AXIS) && TEST(axis_known_position, Z_AXIS));
MENU_ITEM(gcode, MSG_IDEX_MODE_DUPLICATE, need_g28
GCODES_ITEM(MSG_IDEX_MODE_DUPLICATE, need_g28
? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100") // If Y or Z is not homed, do a full G28 first ? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100") // If Y or Z is not homed, do a full G28 first
: PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100") : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100")
); );
MENU_ITEM(gcode, MSG_IDEX_MODE_MIRRORED_COPY, need_g28
GCODES_ITEM(MSG_IDEX_MODE_MIRRORED_COPY, need_g28
? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200") // If Y or Z is not homed, do a full G28 first ? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200") // If Y or Z is not homed, do a full G28 first
: PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200") : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200")
); );
MENU_ITEM(gcode, MSG_IDEX_MODE_FULL_CTRL, PSTR("M605 S0\nG28 X")); GCODES_ITEM(MSG_IDEX_MODE_FULL_CTRL, PSTR("M605 S0\nG28 X"));
END_MENU(); END_MENU();
} }
@ -202,27 +204,27 @@ static void lcd_factory_settings() {
void menu_bltouch() { void menu_bltouch() {
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
MENU_ITEM(function, MSG_BLTOUCH_RESET, bltouch._reset); ACTION_ITEM(MSG_BLTOUCH_RESET, bltouch._reset);
MENU_ITEM(function, MSG_BLTOUCH_SELFTEST, bltouch._selftest); ACTION_ITEM(MSG_BLTOUCH_SELFTEST, bltouch._selftest);
MENU_ITEM(function, MSG_BLTOUCH_DEPLOY, bltouch._deploy); ACTION_ITEM(MSG_BLTOUCH_DEPLOY, bltouch._deploy);
MENU_ITEM(function, MSG_BLTOUCH_STOW, bltouch._stow); ACTION_ITEM(MSG_BLTOUCH_STOW, bltouch._stow);
MENU_ITEM(function, MSG_BLTOUCH_SW_MODE, bltouch._set_SW_mode); ACTION_ITEM(MSG_BLTOUCH_SW_MODE, bltouch._set_SW_mode);
#if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU) #if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU)
MENU_ITEM(submenu, MSG_BLTOUCH_5V_MODE, []{ SUBMENU(MSG_BLTOUCH_5V_MODE, []{
do_select_screen(PSTR(MSG_BLTOUCH_5V_MODE), PSTR(MSG_BUTTON_CANCEL), bltouch._set_5V_mode, ui.goto_previous_screen, PSTR(MSG_BLTOUCH_MODE_CHANGE)); do_select_screen(PSTR(MSG_BLTOUCH_5V_MODE), PSTR(MSG_BUTTON_CANCEL), bltouch._set_5V_mode, ui.goto_previous_screen, PSTR(MSG_BLTOUCH_MODE_CHANGE));
}); });
MENU_ITEM(submenu, MSG_BLTOUCH_OD_MODE, []{ SUBMENU(MSG_BLTOUCH_OD_MODE, []{
do_select_screen(PSTR(MSG_BLTOUCH_OD_MODE), PSTR(MSG_BUTTON_CANCEL), bltouch._set_OD_mode, ui.goto_previous_screen, PSTR(MSG_BLTOUCH_MODE_CHANGE)); do_select_screen(PSTR(MSG_BLTOUCH_OD_MODE), PSTR(MSG_BUTTON_CANCEL), bltouch._set_OD_mode, ui.goto_previous_screen, PSTR(MSG_BLTOUCH_MODE_CHANGE));
}); });
MENU_ITEM(function, MSG_BLTOUCH_MODE_STORE, bltouch._mode_store); ACTION_ITEM(MSG_BLTOUCH_MODE_STORE, bltouch._mode_store);
MENU_ITEM(submenu, MSG_BLTOUCH_MODE_STORE_5V, []{ SUBMENU(MSG_BLTOUCH_MODE_STORE_5V, []{
do_select_screen(PSTR(MSG_BLTOUCH_MODE_STORE_5V), PSTR(MSG_BUTTON_CANCEL), bltouch.mode_conv_5V, ui.goto_previous_screen, PSTR(MSG_BLTOUCH_MODE_CHANGE)); do_select_screen(PSTR(MSG_BLTOUCH_MODE_STORE_5V), PSTR(MSG_BUTTON_CANCEL), bltouch.mode_conv_5V, ui.goto_previous_screen, PSTR(MSG_BLTOUCH_MODE_CHANGE));
}); });
MENU_ITEM(submenu, MSG_BLTOUCH_MODE_STORE_OD, []{ SUBMENU(MSG_BLTOUCH_MODE_STORE_OD, []{
do_select_screen(PSTR(MSG_BLTOUCH_MODE_STORE_OD), PSTR(MSG_BUTTON_CANCEL), bltouch.mode_conv_OD, ui.goto_previous_screen, PSTR(MSG_BLTOUCH_MODE_CHANGE)); do_select_screen(PSTR(MSG_BLTOUCH_MODE_STORE_OD), PSTR(MSG_BUTTON_CANCEL), bltouch.mode_conv_OD, ui.goto_previous_screen, PSTR(MSG_BLTOUCH_MODE_CHANGE));
}); });
MENU_ITEM(function, MSG_BLTOUCH_MODE_ECHO, bltouch_report); ACTION_ITEM(MSG_BLTOUCH_MODE_ECHO, bltouch_report);
#endif #endif
END_MENU(); END_MENU();
} }
@ -233,11 +235,11 @@ static void lcd_factory_settings() {
void menu_touchmi() { void menu_touchmi() {
START_MENU(); START_MENU();
ui.defer_status_screen(); ui.defer_status_screen();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
MENU_ITEM(gcode, MSG_TOUCHMI_INIT, PSTR("M851 Z0\nG28\nG1 F200 Z0")); GCODES_ITEM(MSG_TOUCHMI_INIT, PSTR("M851 Z0\nG28\nG1 F200 Z0"));
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
MENU_ITEM(gcode, MSG_TOUCHMI_SAVE, PSTR("M500\nG1 F200 Z10")); GCODES_ITEM(MSG_TOUCHMI_SAVE, PSTR("M500\nG1 F200 Z10"));
MENU_ITEM(gcode, MSG_TOUCHMI_ZTEST, PSTR("G28\nG1 F200 Z0")); GCODES_ITEM(MSG_TOUCHMI_ZTEST, PSTR("G28\nG1 F200 Z0"));
END_MENU(); END_MENU();
} }
#endif #endif
@ -250,9 +252,9 @@ static void lcd_factory_settings() {
void menu_case_light() { void menu_case_light() {
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
MENU_ITEM_EDIT_CALLBACK(uint8, MSG_CASE_LIGHT_BRIGHTNESS, &case_light_brightness, 0, 255, update_case_light, true); EDIT_ITEM(uint8, MSG_CASE_LIGHT_BRIGHTNESS, &case_light_brightness, 0, 255, update_case_light, true);
MENU_ITEM_EDIT_CALLBACK(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light); EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light);
END_MENU(); END_MENU();
} }
@ -266,23 +268,23 @@ static void lcd_factory_settings() {
void menu_config_retract() { void menu_config_retract() {
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
#if ENABLED(FWRETRACT_AUTORETRACT) #if ENABLED(FWRETRACT_AUTORETRACT)
MENU_ITEM_EDIT_CALLBACK(bool, MSG_AUTORETRACT, &fwretract.autoretract_enabled, fwretract.refresh_autoretract); EDIT_ITEM(bool, MSG_AUTORETRACT, &fwretract.autoretract_enabled, fwretract.refresh_autoretract);
#endif #endif
MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT, &fwretract.settings.retract_length, 0, 100); EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT, &fwretract.settings.retract_length, 0, 100);
#if EXTRUDERS > 1 #if EXTRUDERS > 1
MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT_SWAP, &fwretract.settings.swap_retract_length, 0, 100); EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_SWAP, &fwretract.settings.swap_retract_length, 0, 100);
#endif #endif
MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &fwretract.settings.retract_feedrate_mm_s, 1, 999); EDIT_ITEM(float3, MSG_CONTROL_RETRACTF, &fwretract.settings.retract_feedrate_mm_s, 1, 999);
MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT_ZHOP, &fwretract.settings.retract_zraise, 0, 999); EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_ZHOP, &fwretract.settings.retract_zraise, 0, 999);
MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT_RECOVER, &fwretract.settings.retract_recover_extra, -100, 100); EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_RECOVER, &fwretract.settings.retract_recover_extra, -100, 100);
#if EXTRUDERS > 1 #if EXTRUDERS > 1
MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT_RECOVER_SWAP, &fwretract.settings.swap_retract_recover_extra, -100, 100); EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_RECOVER_SWAP, &fwretract.settings.swap_retract_recover_extra, -100, 100);
#endif #endif
MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &fwretract.settings.retract_recover_feedrate_mm_s, 1, 999); EDIT_ITEM(float3, MSG_CONTROL_RETRACT_RECOVERF, &fwretract.settings.retract_recover_feedrate_mm_s, 1, 999);
#if EXTRUDERS > 1 #if EXTRUDERS > 1
MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVER_SWAPF, &fwretract.settings.swap_retract_recover_feedrate_mm_s, 1, 999); EDIT_ITEM(float3, MSG_CONTROL_RETRACT_RECOVER_SWAPF, &fwretract.settings.swap_retract_recover_feedrate_mm_s, 1, 999);
#endif #endif
END_MENU(); END_MENU();
} }
@ -312,16 +314,16 @@ static void lcd_factory_settings() {
#define MAXTEMP_ALL HEATER_0_MAXTEMP #define MAXTEMP_ALL HEATER_0_MAXTEMP
#endif #endif
START_MENU(); START_MENU();
MENU_BACK(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
MENU_ITEM_EDIT(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255); EDIT_ITEM(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255);
#if HAS_TEMP_HOTEND #if HAS_TEMP_HOTEND
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &ui.preheat_hotend_temp[material], MINTEMP_ALL, MAXTEMP_ALL - 15); EDIT_ITEM(int3, MSG_NOZZLE, &ui.preheat_hotend_temp[material], MINTEMP_ALL, MAXTEMP_ALL - 15);
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM_EDIT(int3, MSG_BED, &ui.preheat_bed_temp[material], BED_MINTEMP, BED_MAXTEMP - 10); EDIT_ITEM(int3, MSG_BED, &ui.preheat_bed_temp[material], BED_MINTEMP, BED_MAXTEMP - 10);
#endif #endif
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings);
#endif #endif
END_MENU(); END_MENU();
} }
@ -333,21 +335,21 @@ static void lcd_factory_settings() {
void menu_configuration() { void menu_configuration() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
// //
// Debug Menu when certain options are enabled // Debug Menu when certain options are enabled
// //
#if HAS_DEBUG_MENU #if HAS_DEBUG_MENU
MENU_ITEM(submenu, MSG_DEBUG_MENU, menu_debug); SUBMENU(MSG_DEBUG_MENU, menu_debug);
#endif #endif
MENU_ITEM(submenu, MSG_ADVANCED_SETTINGS, menu_advanced_settings); SUBMENU(MSG_ADVANCED_SETTINGS, menu_advanced_settings);
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
#elif HAS_BED_PROBE #elif HAS_BED_PROBE
MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &probe_offset.z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); EDIT_ITEM(float52, MSG_ZPROBE_ZOFFSET, &probe_offset.z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
#endif #endif
const bool busy = printer_busy(); const bool busy = printer_busy();
@ -356,23 +358,23 @@ void menu_configuration() {
// Delta Calibration // Delta Calibration
// //
#if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) #if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION)
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, menu_delta_calibrate); SUBMENU(MSG_DELTA_CALIBRATE, menu_delta_calibrate);
#endif #endif
#if HAS_HOTEND_OFFSET #if HAS_HOTEND_OFFSET
MENU_ITEM(submenu, MSG_OFFSETS_MENU, menu_tool_offsets); SUBMENU(MSG_OFFSETS_MENU, menu_tool_offsets);
#endif #endif
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
MENU_ITEM(submenu, MSG_IDEX_MENU, menu_idex); SUBMENU(MSG_IDEX_MENU, menu_idex);
#endif #endif
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
MENU_ITEM(submenu, MSG_BLTOUCH, menu_bltouch); SUBMENU(MSG_BLTOUCH, menu_bltouch);
#endif #endif
#if ENABLED(TOUCH_MI_PROBE) #if ENABLED(TOUCH_MI_PROBE)
MENU_ITEM(submenu, MSG_TOUCHMI_PROBE, menu_touchmi); SUBMENU(MSG_TOUCHMI_PROBE, menu_touchmi);
#endif #endif
} }
@ -380,7 +382,7 @@ void menu_configuration() {
// Set single nozzle filament retract and prime length // Set single nozzle filament retract and prime length
// //
#if EXTRUDERS > 1 #if EXTRUDERS > 1
MENU_ITEM(submenu, MSG_TOOL_CHANGE, menu_tool_change); SUBMENU(MSG_TOOL_CHANGE, menu_tool_change);
#endif #endif
// //
@ -389,41 +391,41 @@ void menu_configuration() {
#if ENABLED(CASE_LIGHT_MENU) #if ENABLED(CASE_LIGHT_MENU)
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
if (PWM_PIN(CASE_LIGHT_PIN)) if (PWM_PIN(CASE_LIGHT_PIN))
MENU_ITEM(submenu, MSG_CASE_LIGHT, menu_case_light); SUBMENU(MSG_CASE_LIGHT, menu_case_light);
else else
#endif #endif
MENU_ITEM_EDIT_CALLBACK(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light); EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light);
#endif #endif
#if HAS_LCD_CONTRAST #if HAS_LCD_CONTRAST
MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, &ui.contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, ui.refresh_contrast, true); EDIT_ITEM(int3, MSG_CONTRAST, &ui.contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, ui.refresh_contrast, true);
#endif #endif
#if ENABLED(FWRETRACT) #if ENABLED(FWRETRACT)
MENU_ITEM(submenu, MSG_RETRACT, menu_config_retract); SUBMENU(MSG_RETRACT, menu_config_retract);
#endif #endif
#if HAS_FILAMENT_SENSOR #if HAS_FILAMENT_SENSOR
MENU_ITEM_EDIT_CALLBACK(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset); EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset);
#endif #endif
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)
MENU_ITEM_EDIT_CALLBACK(bool, MSG_OUTAGE_RECOVERY, &recovery.enabled, recovery.changed); EDIT_ITEM(bool, MSG_OUTAGE_RECOVERY, &recovery.enabled, recovery.changed);
#endif #endif
#if DISABLED(SLIM_LCD_MENUS) #if DISABLED(SLIM_LCD_MENUS)
// Preheat configurations // Preheat configurations
MENU_ITEM(submenu, MSG_PREHEAT_1_SETTINGS, menu_preheat_material1_settings); SUBMENU(MSG_PREHEAT_1_SETTINGS, menu_preheat_material1_settings);
MENU_ITEM(submenu, MSG_PREHEAT_2_SETTINGS, menu_preheat_material2_settings); SUBMENU(MSG_PREHEAT_2_SETTINGS, menu_preheat_material2_settings);
#endif #endif
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings);
if (!busy) if (!busy)
MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings); ACTION_ITEM(MSG_LOAD_EEPROM, lcd_load_settings);
#endif #endif
if (!busy) if (!busy)
MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings); ACTION_ITEM(MSG_RESTORE_FAILSAFE, lcd_factory_settings);
END_MENU(); END_MENU();
} }

View File

@ -65,21 +65,21 @@ void _lcd_user_gcode(PGM_P const cmd) {
void menu_user() { void menu_user() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
#if defined(USER_DESC_1) && defined(USER_GCODE_1) #if defined(USER_DESC_1) && defined(USER_GCODE_1)
MENU_ITEM(function, USER_DESC_1, lcd_user_gcode_1); ACTION_ITEM(USER_DESC_1, lcd_user_gcode_1);
#endif #endif
#if defined(USER_DESC_2) && defined(USER_GCODE_2) #if defined(USER_DESC_2) && defined(USER_GCODE_2)
MENU_ITEM(function, USER_DESC_2, lcd_user_gcode_2); ACTION_ITEM(USER_DESC_2, lcd_user_gcode_2);
#endif #endif
#if defined(USER_DESC_3) && defined(USER_GCODE_3) #if defined(USER_DESC_3) && defined(USER_GCODE_3)
MENU_ITEM(function, USER_DESC_3, lcd_user_gcode_3); ACTION_ITEM(USER_DESC_3, lcd_user_gcode_3);
#endif #endif
#if defined(USER_DESC_4) && defined(USER_GCODE_4) #if defined(USER_DESC_4) && defined(USER_GCODE_4)
MENU_ITEM(function, USER_DESC_4, lcd_user_gcode_4); ACTION_ITEM(USER_DESC_4, lcd_user_gcode_4);
#endif #endif
#if defined(USER_DESC_5) && defined(USER_GCODE_5) #if defined(USER_DESC_5) && defined(USER_GCODE_5)
MENU_ITEM(function, USER_DESC_5, lcd_user_gcode_5); ACTION_ITEM(USER_DESC_5, lcd_user_gcode_5);
#endif #endif
END_MENU(); END_MENU();
} }

View File

@ -103,42 +103,42 @@ void _recalc_delta_settings() {
void lcd_delta_settings() { void lcd_delta_settings() {
START_MENU(); START_MENU();
MENU_BACK(MSG_DELTA_CALIBRATE); BACK_ITEM(MSG_DELTA_CALIBRATE);
MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10, delta_height + 10, _recalc_delta_settings); EDIT_ITEM(float52sign, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10, delta_height + 10, _recalc_delta_settings);
#define EDIT_ENDSTOP_ADJ(LABEL,N) MENU_ITEM_EDIT_CALLBACK(float43, LABEL, &delta_endstop_adj.N, -5, 5, _recalc_delta_settings) #define EDIT_ENDSTOP_ADJ(LABEL,N) EDIT_ITEM(float43, LABEL, &delta_endstop_adj.N, -5, 5, _recalc_delta_settings)
EDIT_ENDSTOP_ADJ("Ex",a); EDIT_ENDSTOP_ADJ("Ex",a);
EDIT_ENDSTOP_ADJ("Ey",b); EDIT_ENDSTOP_ADJ("Ey",b);
EDIT_ENDSTOP_ADJ("Ez",c); EDIT_ENDSTOP_ADJ("Ez",c);
MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_DELTA_RADIUS, &delta_radius, delta_radius - 5, delta_radius + 5, _recalc_delta_settings); EDIT_ITEM(float52sign, MSG_DELTA_RADIUS, &delta_radius, delta_radius - 5, delta_radius + 5, _recalc_delta_settings);
#define EDIT_ANGLE_TRIM(LABEL,N) MENU_ITEM_EDIT_CALLBACK(float43, LABEL, &delta_tower_angle_trim.N, -5, 5, _recalc_delta_settings) #define EDIT_ANGLE_TRIM(LABEL,N) EDIT_ITEM(float43, LABEL, &delta_tower_angle_trim.N, -5, 5, _recalc_delta_settings)
EDIT_ANGLE_TRIM("Tx",a); EDIT_ANGLE_TRIM("Tx",a);
EDIT_ANGLE_TRIM("Ty",b); EDIT_ANGLE_TRIM("Ty",b);
EDIT_ANGLE_TRIM("Tz",c); EDIT_ANGLE_TRIM("Tz",c);
MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_DELTA_DIAG_ROD, &delta_diagonal_rod, delta_diagonal_rod - 5, delta_diagonal_rod + 5, _recalc_delta_settings); EDIT_ITEM(float52sign, MSG_DELTA_DIAG_ROD, &delta_diagonal_rod, delta_diagonal_rod - 5, delta_diagonal_rod + 5, _recalc_delta_settings);
END_MENU(); END_MENU();
} }
void menu_delta_calibrate() { void menu_delta_calibrate() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
#if ENABLED(DELTA_AUTO_CALIBRATION) #if ENABLED(DELTA_AUTO_CALIBRATION)
MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33")); GCODES_ITEM(MSG_DELTA_AUTO_CALIBRATE, PSTR("G33"));
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings);
MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings); ACTION_ITEM(MSG_LOAD_EEPROM, lcd_load_settings);
#endif #endif
#endif #endif
MENU_ITEM(submenu, MSG_DELTA_SETTINGS, lcd_delta_settings); SUBMENU(MSG_DELTA_SETTINGS, lcd_delta_settings);
#if ENABLED(DELTA_CALIBRATION_MENU) #if ENABLED(DELTA_CALIBRATION_MENU)
MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home); SUBMENU(MSG_AUTO_HOME, _lcd_delta_calibrate_home);
if (all_axes_homed()) { if (all_axes_homed()) {
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_X, _goto_tower_x); SUBMENU(MSG_DELTA_CALIBRATE_X, _goto_tower_x);
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Y, _goto_tower_y); SUBMENU(MSG_DELTA_CALIBRATE_Y, _goto_tower_y);
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_Z, _goto_tower_z); SUBMENU(MSG_DELTA_CALIBRATE_Z, _goto_tower_z);
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE_CENTER, _goto_center); SUBMENU(MSG_DELTA_CALIBRATE_CENTER, _goto_center);
} }
#endif #endif

View File

@ -80,9 +80,9 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
_change_filament_temp_extruder = extruder; _change_filament_temp_extruder = extruder;
START_MENU(); START_MENU();
if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), SS_CENTER|SS_INVERT); if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), SS_CENTER|SS_INVERT);
MENU_BACK(MSG_BACK); BACK_ITEM(MSG_BACK);
MENU_ITEM(function, MSG_PREHEAT_1, _lcd_change_filament_temp_1_func); ACTION_ITEM(MSG_PREHEAT_1, _lcd_change_filament_temp_1_func);
MENU_ITEM(function, MSG_PREHEAT_2, _lcd_change_filament_temp_2_func); ACTION_ITEM(MSG_PREHEAT_2, _lcd_change_filament_temp_2_func);
uint16_t max_temp; uint16_t max_temp;
switch (extruder) { switch (extruder) {
default: max_temp = HEATER_0_MAXTEMP; default: max_temp = HEATER_0_MAXTEMP;
@ -102,7 +102,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
#endif #endif
#endif #endif
} }
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[_change_filament_temp_extruder].target, EXTRUDE_MINTEMP, max_temp - 15, _lcd_change_filament_temp_custom_cb); EDIT_ITEM_FAST(int3, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[_change_filament_temp_extruder].target, EXTRUDE_MINTEMP, max_temp - 15, _lcd_change_filament_temp_custom_cb);
END_MENU(); END_MENU();
} }
#if E_STEPPERS #if E_STEPPERS
@ -142,7 +142,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
#if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) #if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
void menu_change_filament() { void menu_change_filament() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
// Change filament // Change filament
#if E_STEPPERS == 1 #if E_STEPPERS == 1
@ -245,9 +245,9 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
// Unload filament // Unload filament
#if E_STEPPERS == 1 #if E_STEPPERS == 1
if (thermalManager.targetHotEnoughToExtrude(active_extruder)) if (thermalManager.targetHotEnoughToExtrude(active_extruder))
MENU_ITEM(gcode, MSG_FILAMENTUNLOAD, PSTR("M702")); GCODES_ITEM(MSG_FILAMENTUNLOAD, PSTR("M702"));
else else
MENU_ITEM(submenu, MSG_FILAMENTUNLOAD, menu_temp_e0_filament_unload); SUBMENU(MSG_FILAMENTUNLOAD, menu_temp_e0_filament_unload);
#else #else
#if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS) #if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
if (thermalManager.targetHotEnoughToExtrude(0) if (thermalManager.targetHotEnoughToExtrude(0)
@ -267,38 +267,38 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
#endif // E_STEPPERS > 2 #endif // E_STEPPERS > 2
#endif // E_STEPPERS > 1 #endif // E_STEPPERS > 1
) )
MENU_ITEM(gcode, MSG_FILAMENTUNLOAD_ALL, PSTR("M702")); GCODES_ITEM(MSG_FILAMENTUNLOAD_ALL, PSTR("M702"));
else else
MENU_ITEM(submenu, MSG_FILAMENTUNLOAD_ALL, menu_unload_filament_all_temp); SUBMENU(MSG_FILAMENTUNLOAD_ALL, menu_unload_filament_all_temp);
#endif #endif
if (thermalManager.targetHotEnoughToExtrude(0)) if (thermalManager.targetHotEnoughToExtrude(0))
MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E1, PSTR("M702 T0")); GCODES_ITEM(MSG_FILAMENTUNLOAD " " MSG_E1, PSTR("M702 T0"));
else else
MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E1, menu_temp_e0_filament_unload); SUBMENU(MSG_FILAMENTUNLOAD " " MSG_E1, menu_temp_e0_filament_unload);
if (thermalManager.targetHotEnoughToExtrude(1)) if (thermalManager.targetHotEnoughToExtrude(1))
MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E2, PSTR("M702 T1")); GCODES_ITEM(MSG_FILAMENTUNLOAD " " MSG_E2, PSTR("M702 T1"));
else else
MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E2, menu_temp_e1_filament_unload); SUBMENU(MSG_FILAMENTUNLOAD " " MSG_E2, menu_temp_e1_filament_unload);
#if E_STEPPERS > 2 #if E_STEPPERS > 2
if (thermalManager.targetHotEnoughToExtrude(2)) if (thermalManager.targetHotEnoughToExtrude(2))
MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E3, PSTR("M702 T2")); GCODES_ITEM(MSG_FILAMENTUNLOAD " " MSG_E3, PSTR("M702 T2"));
else else
MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E3, menu_temp_e2_filament_unload); SUBMENU(MSG_FILAMENTUNLOAD " " MSG_E3, menu_temp_e2_filament_unload);
#if E_STEPPERS > 3 #if E_STEPPERS > 3
if (thermalManager.targetHotEnoughToExtrude(3)) if (thermalManager.targetHotEnoughToExtrude(3))
MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E4, PSTR("M702 T3")); GCODES_ITEM(MSG_FILAMENTUNLOAD " " MSG_E4, PSTR("M702 T3"));
else else
MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E4, menu_temp_e3_filament_unload); SUBMENU(MSG_FILAMENTUNLOAD " " MSG_E4, menu_temp_e3_filament_unload);
#if E_STEPPERS > 4 #if E_STEPPERS > 4
if (thermalManager.targetHotEnoughToExtrude(4)) if (thermalManager.targetHotEnoughToExtrude(4))
MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E5, PSTR("M702 T4")); GCODES_ITEM(MSG_FILAMENTUNLOAD " " MSG_E5, PSTR("M702 T4"));
else else
MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E5, menu_temp_e4_filament_unload); SUBMENU(MSG_FILAMENTUNLOAD " " MSG_E5, menu_temp_e4_filament_unload);
#if E_STEPPERS > 5 #if E_STEPPERS > 5
if (thermalManager.targetHotEnoughToExtrude(5)) if (thermalManager.targetHotEnoughToExtrude(5))
MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E6, PSTR("M702 T5")); GCODES_ITEM(MSG_FILAMENTUNLOAD " " MSG_E6, PSTR("M702 T5"));
else else
MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E6, menu_temp_e5_filament_unload); SUBMENU(MSG_FILAMENTUNLOAD " " MSG_E6, menu_temp_e5_filament_unload);
#endif // E_STEPPERS > 5 #endif // E_STEPPERS > 5
#endif // E_STEPPERS > 4 #endif // E_STEPPERS > 4
#endif // E_STEPPERS > 3 #endif // E_STEPPERS > 3
@ -353,13 +353,13 @@ void menu_pause_option() {
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER); STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER);
#endif #endif
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_PURGE, lcd_pause_extrude_more); ACTION_ITEM(MSG_FILAMENT_CHANGE_OPTION_PURGE, lcd_pause_extrude_more);
#if HAS_FILAMENT_SENSOR #if HAS_FILAMENT_SENSOR
if (runout.filament_ran_out) if (runout.filament_ran_out)
MENU_ITEM_EDIT_CALLBACK(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset); EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset);
else else
#endif #endif
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_RESUME, lcd_pause_resume_print); ACTION_ITEM(MSG_FILAMENT_CHANGE_OPTION_RESUME, lcd_pause_resume_print);
END_MENU(); END_MENU();
} }

View File

@ -29,18 +29,18 @@
void menu_game() { void menu_game() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
#if ENABLED(MARLIN_BRICKOUT) #if ENABLED(MARLIN_BRICKOUT)
MENU_ITEM(submenu, MSG_BRICKOUT, brickout.enter_game); SUBMENU(MSG_BRICKOUT, brickout.enter_game);
#endif #endif
#if ENABLED(MARLIN_INVADERS) #if ENABLED(MARLIN_INVADERS)
MENU_ITEM(submenu, MSG_INVADERS, invaders.enter_game); SUBMENU(MSG_INVADERS, invaders.enter_game);
#endif #endif
#if ENABLED(MARLIN_SNAKE) #if ENABLED(MARLIN_SNAKE)
MENU_ITEM(submenu, MSG_SNAKE, snake.enter_game); SUBMENU(MSG_SNAKE, snake.enter_game);
#endif #endif
#if ENABLED(MARLIN_MAZE) #if ENABLED(MARLIN_MAZE)
MENU_ITEM(submenu, MSG_MAZE, maze.enter_game); SUBMENU(MSG_MAZE, maze.enter_game);
#endif #endif
END_MENU(); END_MENU();
} }

View File

@ -286,9 +286,9 @@ void menu_info_board() {
// //
void menu_info() { void menu_info() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
#if ENABLED(LCD_PRINTER_INFO_IS_BOOTSCREEN) #if ENABLED(LCD_PRINTER_INFO_IS_BOOTSCREEN)
MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, ( SUBMENU(MSG_INFO_PRINTER_MENU, (
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN) #if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
menu_show_custom_bootscreen menu_show_custom_bootscreen
#else #else
@ -296,24 +296,24 @@ void menu_info() {
#endif #endif
)); ));
#else #else
MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, menu_info_printer); // Printer Info > SUBMENU(MSG_INFO_PRINTER_MENU, menu_info_printer); // Printer Info >
MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, menu_info_board); // Board Info > SUBMENU(MSG_INFO_BOARD_MENU, menu_info_board); // Board Info >
#if EXTRUDERS #if EXTRUDERS
MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, menu_info_thermistors); // Thermistors > SUBMENU(MSG_INFO_THERMISTOR_MENU, menu_info_thermistors); // Thermistors >
#endif #endif
#endif #endif
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)
MENU_ITEM(submenu, MSG_INFO_STATS_MENU, menu_info_stats); // Printer Stats > SUBMENU(MSG_INFO_STATS_MENU, menu_info_stats); // Printer Stats >
#endif #endif
#if HAS_GAMES #if HAS_GAMES
#if ENABLED(GAMES_EASTER_EGG) #if ENABLED(GAMES_EASTER_EGG)
MENU_ITEM_DUMMY(); SKIP_ITEM();
MENU_ITEM_DUMMY(); SKIP_ITEM();
MENU_ITEM_DUMMY(); SKIP_ITEM();
#endif #endif
MENU_ITEM(submenu, MSG_GAMES, ( SUBMENU(MSG_GAMES, (
#if HAS_GAME_MENU #if HAS_GAME_MENU
menu_game menu_game
#elif ENABLED(MARLIN_BRICKOUT) #elif ENABLED(MARLIN_BRICKOUT)

View File

@ -50,8 +50,8 @@ void menu_job_recovery() {
ui.defer_status_screen(); ui.defer_status_screen();
START_MENU(); START_MENU();
STATIC_ITEM(MSG_OUTAGE_RECOVERY); STATIC_ITEM(MSG_OUTAGE_RECOVERY);
MENU_ITEM(function, MSG_RESUME_PRINT, lcd_power_loss_recovery_resume); ACTION_ITEM(MSG_RESUME_PRINT, lcd_power_loss_recovery_resume);
MENU_ITEM(function, MSG_STOP_PRINT, lcd_power_loss_recovery_cancel); ACTION_ITEM(MSG_STOP_PRINT, lcd_power_loss_recovery_cancel);
END_MENU(); END_MENU();
} }

View File

@ -38,15 +38,15 @@
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_LED_PRESETS, SS_CENTER|SS_INVERT); STATIC_ITEM(MSG_LED_PRESETS, SS_CENTER|SS_INVERT);
#endif #endif
MENU_BACK(MSG_LED_CONTROL); BACK_ITEM(MSG_LED_CONTROL);
MENU_ITEM(function, MSG_SET_LEDS_WHITE, leds.set_white); ACTION_ITEM(MSG_SET_LEDS_WHITE, leds.set_white);
MENU_ITEM(function, MSG_SET_LEDS_RED, leds.set_red); ACTION_ITEM(MSG_SET_LEDS_RED, leds.set_red);
MENU_ITEM(function, MSG_SET_LEDS_ORANGE, leds.set_orange); ACTION_ITEM(MSG_SET_LEDS_ORANGE, leds.set_orange);
MENU_ITEM(function, MSG_SET_LEDS_YELLOW,leds.set_yellow); ACTION_ITEM(MSG_SET_LEDS_YELLOW,leds.set_yellow);
MENU_ITEM(function, MSG_SET_LEDS_GREEN, leds.set_green); ACTION_ITEM(MSG_SET_LEDS_GREEN, leds.set_green);
MENU_ITEM(function, MSG_SET_LEDS_BLUE, leds.set_blue); ACTION_ITEM(MSG_SET_LEDS_BLUE, leds.set_blue);
MENU_ITEM(function, MSG_SET_LEDS_INDIGO, leds.set_indigo); ACTION_ITEM(MSG_SET_LEDS_INDIGO, leds.set_indigo);
MENU_ITEM(function, MSG_SET_LEDS_VIOLET, leds.set_violet); ACTION_ITEM(MSG_SET_LEDS_VIOLET, leds.set_violet);
END_MENU(); END_MENU();
} }
@ -54,14 +54,14 @@
void menu_led_custom() { void menu_led_custom() {
START_MENU(); START_MENU();
MENU_BACK(MSG_LED_CONTROL); BACK_ITEM(MSG_LED_CONTROL);
MENU_ITEM_EDIT_CALLBACK(uint8, MSG_INTENSITY_R, &leds.color.r, 0, 255, leds.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds.color.r, 0, 255, leds.update, true);
MENU_ITEM_EDIT_CALLBACK(uint8, MSG_INTENSITY_G, &leds.color.g, 0, 255, leds.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_G, &leds.color.g, 0, 255, leds.update, true);
MENU_ITEM_EDIT_CALLBACK(uint8, MSG_INTENSITY_B, &leds.color.b, 0, 255, leds.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_B, &leds.color.b, 0, 255, leds.update, true);
#if EITHER(RGBW_LED, NEOPIXEL_LED) #if EITHER(RGBW_LED, NEOPIXEL_LED)
MENU_ITEM_EDIT_CALLBACK(uint8, MSG_INTENSITY_W, &leds.color.w, 0, 255, leds.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_W, &leds.color.w, 0, 255, leds.update, true);
#if ENABLED(NEOPIXEL_LED) #if ENABLED(NEOPIXEL_LED)
MENU_ITEM_EDIT_CALLBACK(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true); EDIT_ITEM(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true);
#endif #endif
#endif #endif
END_MENU(); END_MENU();
@ -69,14 +69,14 @@ void menu_led_custom() {
void menu_led() { void menu_led() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
bool led_on = leds.lights_on; bool led_on = leds.lights_on;
MENU_ITEM_EDIT_CALLBACK(bool, MSG_LEDS, &led_on, leds.toggle); EDIT_ITEM(bool, MSG_LEDS, &led_on, leds.toggle);
MENU_ITEM(function, MSG_SET_LEDS_DEFAULT, leds.set_default); ACTION_ITEM(MSG_SET_LEDS_DEFAULT, leds.set_default);
#if ENABLED(LED_COLOR_PRESETS) #if ENABLED(LED_COLOR_PRESETS)
MENU_ITEM(submenu, MSG_LED_PRESETS, menu_led_presets); SUBMENU(MSG_LED_PRESETS, menu_led_presets);
#endif #endif
MENU_ITEM(submenu, MSG_CUSTOM_LEDS, menu_led_custom); SUBMENU(MSG_CUSTOM_LEDS, menu_led_custom);
END_MENU(); END_MENU();
} }

View File

@ -97,7 +97,7 @@ void menu_configuration();
void menu_main() { void menu_main() {
START_MENU(); START_MENU();
MENU_BACK(MSG_WATCH); BACK_ITEM(MSG_WATCH);
const bool busy = IS_SD_PRINTING() || print_job_timer.isRunning() const bool busy = IS_SD_PRINTING() || print_job_timer.isRunning()
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
@ -108,12 +108,12 @@ void menu_main() {
if (busy) { if (busy) {
#if MACHINE_CAN_PAUSE #if MACHINE_CAN_PAUSE
MENU_ITEM(function, MSG_PAUSE_PRINT, ui.pause_print); ACTION_ITEM(MSG_PAUSE_PRINT, ui.pause_print);
#endif #endif
#if MACHINE_CAN_STOP #if MACHINE_CAN_STOP
MENU_ITEM(submenu, MSG_STOP_PRINT, menu_abort_confirm); SUBMENU(MSG_STOP_PRINT, menu_abort_confirm);
#endif #endif
MENU_ITEM(submenu, MSG_TUNE, menu_tune); SUBMENU(MSG_TUNE, menu_tune);
} }
else { else {
#if !HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT) #if !HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT)
@ -121,12 +121,12 @@ void menu_main() {
// Autostart // Autostart
// //
#if ENABLED(MENU_ADDAUTOSTART) #if ENABLED(MENU_ADDAUTOSTART)
if (!busy) MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart); if (!busy) ACTION_ITEM(MSG_AUTOSTART, card.beginautostart);
#endif #endif
if (card_detected) { if (card_detected) {
if (!card_open) { if (!card_open) {
MENU_ITEM(submenu, MSG_MEDIA_MENU, menu_media); SUBMENU(MSG_MEDIA_MENU, menu_media);
MENU_ITEM(gcode, MENU_ITEM(gcode,
#if PIN_EXISTS(SD_DETECT) #if PIN_EXISTS(SD_DETECT)
MSG_CHANGE_MEDIA, PSTR("M21") MSG_CHANGE_MEDIA, PSTR("M21")
@ -138,10 +138,10 @@ void menu_main() {
} }
else { else {
#if PIN_EXISTS(SD_DETECT) #if PIN_EXISTS(SD_DETECT)
MENU_ITEM(function, MSG_NO_MEDIA, nullptr); ACTION_ITEM(MSG_NO_MEDIA, nullptr);
#else #else
MENU_ITEM(gcode, MSG_INIT_MEDIA, PSTR("M21")); GCODES_ITEM(MSG_INIT_MEDIA, PSTR("M21"));
MENU_ITEM(function, MSG_MEDIA_RELEASED, nullptr); ACTION_ITEM(MSG_MEDIA_RELEASED, nullptr);
#endif #endif
} }
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT #endif // !HAS_ENCODER_WHEEL && SDSUPPORT
@ -152,49 +152,49 @@ void menu_main() {
|| card.isPaused() || card.isPaused()
#endif #endif
); );
if (paused) MENU_ITEM(function, MSG_RESUME_PRINT, ui.resume_print); if (paused) ACTION_ITEM(MSG_RESUME_PRINT, ui.resume_print);
#endif #endif
MENU_ITEM(submenu, MSG_MOTION, menu_motion); SUBMENU(MSG_MOTION, menu_motion);
} }
#if HAS_CUTTER #if HAS_CUTTER
MENU_ITEM(submenu, MSG_CUTTER(MENU), menu_spindle_laser); SUBMENU(MSG_CUTTER(MENU), menu_spindle_laser);
#endif #endif
MENU_ITEM(submenu, MSG_TEMPERATURE, menu_temperature); SUBMENU(MSG_TEMPERATURE, menu_temperature);
#if ENABLED(MIXING_EXTRUDER) #if ENABLED(MIXING_EXTRUDER)
MENU_ITEM(submenu, MSG_MIXER, menu_mixer); SUBMENU(MSG_MIXER, menu_mixer);
#endif #endif
#if ENABLED(MMU2_MENUS) #if ENABLED(MMU2_MENUS)
if (!busy) MENU_ITEM(submenu, MSG_MMU2_MENU, menu_mmu2); if (!busy) SUBMENU(MSG_MMU2_MENU, menu_mmu2);
#endif #endif
MENU_ITEM(submenu, MSG_CONFIGURATION, menu_configuration); SUBMENU(MSG_CONFIGURATION, menu_configuration);
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
MENU_ITEM(submenu, MSG_USER_MENU, menu_user); SUBMENU(MSG_USER_MENU, menu_user);
#endif #endif
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES) #if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES)
if (thermalManager.targetHotEnoughToExtrude(active_extruder)) if (thermalManager.targetHotEnoughToExtrude(active_extruder))
MENU_ITEM(gcode, MSG_FILAMENTCHANGE, PSTR("M600 B0")); GCODES_ITEM(MSG_FILAMENTCHANGE, PSTR("M600 B0"));
else else
MENU_ITEM(submenu, MSG_FILAMENTCHANGE, menu_temp_e0_filament_change); SUBMENU(MSG_FILAMENTCHANGE, menu_temp_e0_filament_change);
#else #else
MENU_ITEM(submenu, MSG_FILAMENTCHANGE, menu_change_filament); SUBMENU(MSG_FILAMENTCHANGE, menu_change_filament);
#endif #endif
#endif #endif
#if ENABLED(LCD_INFO_MENU) #if ENABLED(LCD_INFO_MENU)
MENU_ITEM(submenu, MSG_INFO_MENU, menu_info); SUBMENU(MSG_INFO_MENU, menu_info);
#endif #endif
#if ENABLED(LED_CONTROL_MENU) #if ENABLED(LED_CONTROL_MENU)
MENU_ITEM(submenu, MSG_LED_CONTROL, menu_led); SUBMENU(MSG_LED_CONTROL, menu_led);
#endif #endif
// //
@ -202,9 +202,9 @@ void menu_main() {
// //
#if HAS_POWER_SWITCH #if HAS_POWER_SWITCH
if (powersupply_on) if (powersupply_on)
MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81")); GCODES_ITEM(MSG_SWITCH_PS_OFF, PSTR("M81"));
else else
MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80")); GCODES_ITEM(MSG_SWITCH_PS_ON, PSTR("M80"));
#endif #endif
#if HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT) #if HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT)
@ -212,7 +212,7 @@ void menu_main() {
// Autostart // Autostart
// //
#if ENABLED(MENU_ADDAUTOSTART) #if ENABLED(MENU_ADDAUTOSTART)
if (!busy) MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart); if (!busy) ACTION_ITEM(MSG_AUTOSTART, card.beginautostart);
#endif #endif
if (card_detected) { if (card_detected) {
@ -224,37 +224,37 @@ void menu_main() {
MSG_RELEASE_MEDIA, PSTR("M22") MSG_RELEASE_MEDIA, PSTR("M22")
#endif #endif
); );
MENU_ITEM(submenu, MSG_MEDIA_MENU, menu_media); SUBMENU(MSG_MEDIA_MENU, menu_media);
} }
} }
else { else {
#if PIN_EXISTS(SD_DETECT) #if PIN_EXISTS(SD_DETECT)
MENU_ITEM(function, MSG_NO_MEDIA, nullptr); ACTION_ITEM(MSG_NO_MEDIA, nullptr);
#else #else
MENU_ITEM(gcode, MSG_INIT_MEDIA, PSTR("M21")); GCODES_ITEM(MSG_INIT_MEDIA, PSTR("M21"));
MENU_ITEM(function, MSG_MEDIA_RELEASED, nullptr); ACTION_ITEM(MSG_MEDIA_RELEASED, nullptr);
#endif #endif
} }
#endif // HAS_ENCODER_WHEEL && SDSUPPORT #endif // HAS_ENCODER_WHEEL && SDSUPPORT
#if HAS_SERVICE_INTERVALS #if HAS_SERVICE_INTERVALS
#if SERVICE_INTERVAL_1 > 0 #if SERVICE_INTERVAL_1 > 0
MENU_ITEM(submenu, SERVICE_NAME_1, menu_service1); SUBMENU(SERVICE_NAME_1, menu_service1);
#endif #endif
#if SERVICE_INTERVAL_2 > 0 #if SERVICE_INTERVAL_2 > 0
MENU_ITEM(submenu, SERVICE_NAME_2, menu_service2); SUBMENU(SERVICE_NAME_2, menu_service2);
#endif #endif
#if SERVICE_INTERVAL_3 > 0 #if SERVICE_INTERVAL_3 > 0
MENU_ITEM(submenu, SERVICE_NAME_3, menu_service3); SUBMENU(SERVICE_NAME_3, menu_service3);
#endif #endif
#endif #endif
#if HAS_GAMES && DISABLED(LCD_INFO_MENU) #if HAS_GAMES && DISABLED(LCD_INFO_MENU)
#if ENABLED(GAMES_EASTER_EGG) #if ENABLED(GAMES_EASTER_EGG)
MENU_ITEM_DUMMY(); SKIP_ITEM();
MENU_ITEM_DUMMY(); SKIP_ITEM();
#endif #endif
MENU_ITEM(submenu, MSG_GAMES, ( SUBMENU(MSG_GAMES, (
#if HAS_GAME_MENU #if HAS_GAME_MENU
menu_game menu_game
#elif ENABLED(MARLIN_BRICKOUT) #elif ENABLED(MARLIN_BRICKOUT)

View File

@ -138,14 +138,14 @@ void menu_media() {
#endif #endif
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
if (card.flag.workDirIsRoot) { if (card.flag.workDirIsRoot) {
#if !PIN_EXISTS(SD_DETECT) #if !PIN_EXISTS(SD_DETECT)
MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh); ACTION_ITEM(LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh);
#endif #endif
} }
else if (card.isMounted()) else if (card.isMounted())
MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir); ACTION_ITEM(LCD_STR_FOLDER "..", lcd_sd_updir);
if (ui.should_draw()) for (uint16_t i = 0; i < fileCnt; i++) { if (ui.should_draw()) for (uint16_t i = 0; i < fileCnt; i++) {
if (_menuLineNr == _thisItemNr) { if (_menuLineNr == _thisItemNr) {
@ -163,7 +163,7 @@ void menu_media() {
MENU_ITEM(sdfile, MSG_MEDIA_MENU, card); MENU_ITEM(sdfile, MSG_MEDIA_MENU, card);
} }
else { else {
MENU_ITEM_DUMMY(); SKIP_ITEM();
} }
} }
END_MENU(); END_MENU();

View File

@ -90,24 +90,24 @@
void lcd_mixer_edit_gradient_menu() { void lcd_mixer_edit_gradient_menu() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MIXER); BACK_ITEM(MSG_MIXER);
MENU_ITEM_EDIT_CALLBACK(int8, MSG_START_VTOOL, &mixer.gradient.start_vtool, 0, MIXING_VIRTUAL_TOOLS - 1, mixer.refresh_gradient); EDIT_ITEM(int8, MSG_START_VTOOL, &mixer.gradient.start_vtool, 0, MIXING_VIRTUAL_TOOLS - 1, mixer.refresh_gradient);
MENU_ITEM_EDIT_CALLBACK(int8, MSG_END_VTOOL, &mixer.gradient.end_vtool, 0, MIXING_VIRTUAL_TOOLS - 1, mixer.refresh_gradient); EDIT_ITEM(int8, MSG_END_VTOOL, &mixer.gradient.end_vtool, 0, MIXING_VIRTUAL_TOOLS - 1, mixer.refresh_gradient);
#if ENABLED(GRADIENT_VTOOL) #if ENABLED(GRADIENT_VTOOL)
MENU_ITEM_EDIT_CALLBACK(int8, MSG_GRADIENT_ALIAS, &mixer.gradient.vtool_index, 0, MIXING_VIRTUAL_TOOLS - 1, mixer.refresh_gradient); EDIT_ITEM(int8, MSG_GRADIENT_ALIAS, &mixer.gradient.vtool_index, 0, MIXING_VIRTUAL_TOOLS - 1, mixer.refresh_gradient);
#endif #endif
char tmp[18]; char tmp[18];
MENU_ITEM(submenu, MSG_START_Z ":", lcd_mixer_gradient_z_start_edit); SUBMENU(MSG_START_Z ":", lcd_mixer_gradient_z_start_edit);
MENU_ITEM_ADDON_START(9); MENU_ITEM_ADDON_START(9);
sprintf_P(tmp, PSTR("%4d.%d mm"), int(mixer.gradient.start_z), int(mixer.gradient.start_z * 10) % 10); sprintf_P(tmp, PSTR("%4d.%d mm"), int(mixer.gradient.start_z), int(mixer.gradient.start_z * 10) % 10);
LCDPRINT(tmp); LCDPRINT(tmp);
MENU_ITEM_ADDON_END(); MENU_ITEM_ADDON_END();
MENU_ITEM(submenu, MSG_END_Z ":", lcd_mixer_gradient_z_end_edit); SUBMENU(MSG_END_Z ":", lcd_mixer_gradient_z_end_edit);
MENU_ITEM_ADDON_START(9); MENU_ITEM_ADDON_START(9);
sprintf_P(tmp, PSTR("%4d.%d mm"), int(mixer.gradient.end_z), int(mixer.gradient.end_z * 10) % 10); sprintf_P(tmp, PSTR("%4d.%d mm"), int(mixer.gradient.end_z), int(mixer.gradient.end_z * 10) % 10);
LCDPRINT(tmp); LCDPRINT(tmp);
@ -158,10 +158,10 @@ void lcd_mixer_mix_edit() {
#if CHANNEL_MIX_EDITING #if CHANNEL_MIX_EDITING
#define EDIT_COLOR(N) MENU_MULTIPLIER_ITEM_EDIT(float52, MSG_MIX_COMPONENT " " STRINGIFY(N), &mixer.collector[N-1], 0, 10); #define EDIT_COLOR(N) EDIT_ITEM_FAST(float52, MSG_MIX_COMPONENT " " STRINGIFY(N), &mixer.collector[N-1], 0, 10);
START_MENU(); START_MENU();
MENU_BACK(MSG_MIXER); BACK_ITEM(MSG_MIXER);
EDIT_COLOR(1); EDIT_COLOR(1);
EDIT_COLOR(2); EDIT_COLOR(2);
#if MIXING_STEPPERS > 2 #if MIXING_STEPPERS > 2
@ -176,8 +176,8 @@ void lcd_mixer_mix_edit() {
#endif #endif
#endif #endif
#endif #endif
MENU_ITEM(function, MSG_CYCLE_MIX, _lcd_mixer_cycle_mix); ACTION_ITEM(MSG_CYCLE_MIX, _lcd_mixer_cycle_mix);
MENU_ITEM(function, MSG_COMMIT_VTOOL, _lcd_mixer_commit_vtool); ACTION_ITEM(MSG_COMMIT_VTOOL, _lcd_mixer_commit_vtool);
END_MENU(); END_MENU();
#elif DUAL_MIXING_EXTRUDER #elif DUAL_MIXING_EXTRUDER
@ -199,7 +199,7 @@ void lcd_mixer_mix_edit() {
#else #else
START_MENU(); START_MENU();
MENU_BACK(MSG_MIXER); BACK_ITEM(MSG_MIXER);
END_MENU(); END_MENU();
#endif #endif
@ -263,10 +263,10 @@ void menu_mixer_vtools_reset_confirm() {
void menu_mixer() { void menu_mixer() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
v_index = mixer.get_current_vtool(); v_index = mixer.get_current_vtool();
MENU_ITEM_EDIT_CALLBACK(uint8, MSG_ACTIVE_VTOOL, &v_index, 0, MIXING_VIRTUAL_TOOLS - 1, _lcd_mixer_select_vtool EDIT_ITEM(uint8, MSG_ACTIVE_VTOOL, &v_index, 0, MIXING_VIRTUAL_TOOLS - 1, _lcd_mixer_select_vtool
#if DUAL_MIXING_EXTRUDER #if DUAL_MIXING_EXTRUDER
, true , true
#endif #endif
@ -275,29 +275,29 @@ void menu_mixer() {
#if DUAL_MIXING_EXTRUDER #if DUAL_MIXING_EXTRUDER
{ {
char tmp[10]; char tmp[10];
MENU_ITEM(submenu, MSG_MIX, lcd_mixer_mix_edit); SUBMENU(MSG_MIX, lcd_mixer_mix_edit);
MENU_ITEM_ADDON_START(10); MENU_ITEM_ADDON_START(10);
mixer.update_mix_from_vtool(); mixer.update_mix_from_vtool();
sprintf_P(tmp, PSTR("%3d;%3d%%"), int(mixer.mix[0]), int(mixer.mix[1])); sprintf_P(tmp, PSTR("%3d;%3d%%"), int(mixer.mix[0]), int(mixer.mix[1]));
LCDPRINT(tmp); LCDPRINT(tmp);
MENU_ITEM_ADDON_END(); MENU_ITEM_ADDON_END();
MENU_ITEM(function, MSG_TOGGLE_MIX, _lcd_mixer_toggle_mix); ACTION_ITEM(MSG_TOGGLE_MIX, _lcd_mixer_toggle_mix);
} }
#else #else
MENU_ITEM(submenu, MSG_MIX, _lcd_goto_mix_edit); SUBMENU(MSG_MIX, _lcd_goto_mix_edit);
#endif #endif
MENU_ITEM(submenu, MSG_RESET_VTOOLS, menu_mixer_vtools_reset_confirm); SUBMENU(MSG_RESET_VTOOLS, menu_mixer_vtools_reset_confirm);
#if ENABLED(GRADIENT_MIX) #if ENABLED(GRADIENT_MIX)
{ {
char tmp[13]; char tmp[13];
MENU_ITEM(submenu, MSG_GRADIENT, lcd_mixer_edit_gradient_menu); SUBMENU(MSG_GRADIENT, lcd_mixer_edit_gradient_menu);
MENU_ITEM_ADDON_START(10); MENU_ITEM_ADDON_START(10);
sprintf_P(tmp, PSTR("T%i->T%i"), mixer.gradient.start_vtool, mixer.gradient.end_vtool); sprintf_P(tmp, PSTR("T%i->T%i"), mixer.gradient.start_vtool, mixer.gradient.end_vtool);
LCDPRINT(tmp); LCDPRINT(tmp);
MENU_ITEM_ADDON_END(); MENU_ITEM_ADDON_END();
MENU_ITEM(function, MSG_REVERSE_GRADIENT, _lcd_mixer_reverse_gradient); ACTION_ITEM(MSG_REVERSE_GRADIENT, _lcd_mixer_reverse_gradient);
} }
#endif #endif

View File

@ -71,24 +71,24 @@ inline void action_mmu2_load_filament_4() { _mmu2_load_filament(4); }
void menu_mmu2_load_filament() { void menu_mmu2_load_filament() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MMU2_MENU); BACK_ITEM(MSG_MMU2_MENU);
MENU_ITEM(function, MSG_MMU2_ALL, action_mmu2_load_all); ACTION_ITEM(MSG_MMU2_ALL, action_mmu2_load_all);
MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_load_filament_0); ACTION_ITEM(MSG_MMU2_FILAMENT0, action_mmu2_load_filament_0);
MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_load_filament_1); ACTION_ITEM(MSG_MMU2_FILAMENT1, action_mmu2_load_filament_1);
MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_load_filament_2); ACTION_ITEM(MSG_MMU2_FILAMENT2, action_mmu2_load_filament_2);
MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_load_filament_3); ACTION_ITEM(MSG_MMU2_FILAMENT3, action_mmu2_load_filament_3);
MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_load_filament_4); ACTION_ITEM(MSG_MMU2_FILAMENT4, action_mmu2_load_filament_4);
END_MENU(); END_MENU();
} }
void menu_mmu2_load_to_nozzle() { void menu_mmu2_load_to_nozzle() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MMU2_MENU); BACK_ITEM(MSG_MMU2_MENU);
MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_load_filament_to_nozzle_0); ACTION_ITEM(MSG_MMU2_FILAMENT0, action_mmu2_load_filament_to_nozzle_0);
MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_load_filament_to_nozzle_1); ACTION_ITEM(MSG_MMU2_FILAMENT1, action_mmu2_load_filament_to_nozzle_1);
MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_load_filament_to_nozzle_2); ACTION_ITEM(MSG_MMU2_FILAMENT2, action_mmu2_load_filament_to_nozzle_2);
MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_load_filament_to_nozzle_3); ACTION_ITEM(MSG_MMU2_FILAMENT3, action_mmu2_load_filament_to_nozzle_3);
MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_load_filament_to_nozzle_4); ACTION_ITEM(MSG_MMU2_FILAMENT4, action_mmu2_load_filament_to_nozzle_4);
END_MENU(); END_MENU();
} }
@ -118,12 +118,12 @@ void action_mmu2_unload_filament() {
void menu_mmu2_eject_filament() { void menu_mmu2_eject_filament() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MMU2_MENU); BACK_ITEM(MSG_MMU2_MENU);
MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_eject_filament_0); ACTION_ITEM(MSG_MMU2_FILAMENT0, action_mmu2_eject_filament_0);
MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_eject_filament_1); ACTION_ITEM(MSG_MMU2_FILAMENT1, action_mmu2_eject_filament_1);
MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_eject_filament_2); ACTION_ITEM(MSG_MMU2_FILAMENT2, action_mmu2_eject_filament_2);
MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_eject_filament_3); ACTION_ITEM(MSG_MMU2_FILAMENT3, action_mmu2_eject_filament_3);
MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_eject_filament_4); ACTION_ITEM(MSG_MMU2_FILAMENT4, action_mmu2_eject_filament_4);
END_MENU(); END_MENU();
} }
@ -138,12 +138,12 @@ void action_mmu2_reset() {
void menu_mmu2() { void menu_mmu2() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
MENU_ITEM(submenu, MSG_MMU2_LOAD_FILAMENT, menu_mmu2_load_filament); SUBMENU(MSG_MMU2_LOAD_FILAMENT, menu_mmu2_load_filament);
MENU_ITEM(submenu, MSG_MMU2_LOAD_TO_NOZZLE, menu_mmu2_load_to_nozzle); SUBMENU(MSG_MMU2_LOAD_TO_NOZZLE, menu_mmu2_load_to_nozzle);
MENU_ITEM(submenu, MSG_MMU2_EJECT_FILAMENT, menu_mmu2_eject_filament); SUBMENU(MSG_MMU2_EJECT_FILAMENT, menu_mmu2_eject_filament);
MENU_ITEM(function, MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_unload_filament); ACTION_ITEM(MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_unload_filament);
MENU_ITEM(function, MSG_MMU2_RESET, action_mmu2_reset); ACTION_ITEM(MSG_MMU2_RESET, action_mmu2_reset);
END_MENU(); END_MENU();
} }
@ -166,11 +166,11 @@ void menu_mmu2_choose_filament() {
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, SS_CENTER|SS_INVERT); STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, SS_CENTER|SS_INVERT);
#endif #endif
MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_choose0); ACTION_ITEM(MSG_MMU2_FILAMENT0, action_mmu2_choose0);
MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_choose1); ACTION_ITEM(MSG_MMU2_FILAMENT1, action_mmu2_choose1);
MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_choose2); ACTION_ITEM(MSG_MMU2_FILAMENT2, action_mmu2_choose2);
MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_choose3); ACTION_ITEM(MSG_MMU2_FILAMENT3, action_mmu2_choose3);
MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_choose4); ACTION_ITEM(MSG_MMU2_FILAMENT4, action_mmu2_choose4);
END_MENU(); END_MENU();
} }
@ -189,10 +189,10 @@ void menu_mmu2_pause() {
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_MMU2_FILAMENT_CHANGE_HEADER, SS_CENTER|SS_INVERT); STATIC_ITEM(MSG_MMU2_FILAMENT_CHANGE_HEADER, SS_CENTER|SS_INVERT);
#endif #endif
MENU_ITEM(function, MSG_MMU2_RESUME, action_mmu2_M600_resume); ACTION_ITEM(MSG_MMU2_RESUME, action_mmu2_M600_resume);
MENU_ITEM(function, MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_M600_unload_filament); ACTION_ITEM(MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_M600_unload_filament);
MENU_ITEM(function, MSG_MMU2_LOAD_FILAMENT, action_mmu2_M600_load_current_filament); ACTION_ITEM(MSG_MMU2_LOAD_FILAMENT, action_mmu2_M600_load_current_filament);
MENU_ITEM(function, MSG_MMU2_LOAD_TO_NOZZLE, action_mmu2_M600_load_current_filament_to_nozzle); ACTION_ITEM(MSG_MMU2_LOAD_TO_NOZZLE, action_mmu2_M600_load_current_filament_to_nozzle);
END_MENU(); END_MENU();
} }

View File

@ -275,16 +275,16 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
} }
#if ENABLED(PREVENT_COLD_EXTRUSION) #if ENABLED(PREVENT_COLD_EXTRUSION)
if (axis == E_AXIS && thermalManager.tooColdToExtrude(eindex >= 0 ? eindex : active_extruder)) if (axis == E_AXIS && thermalManager.tooColdToExtrude(eindex >= 0 ? eindex : active_extruder))
MENU_BACK(MSG_HOTEND_TOO_COLD); BACK_ITEM(MSG_HOTEND_TOO_COLD);
else else
#endif #endif
{ {
MENU_BACK(MSG_MOVE_AXIS); BACK_ITEM(MSG_MOVE_AXIS);
MENU_ITEM(submenu, MSG_MOVE_10MM, menu_move_10mm); SUBMENU(MSG_MOVE_10MM, menu_move_10mm);
MENU_ITEM(submenu, MSG_MOVE_1MM, menu_move_1mm); SUBMENU(MSG_MOVE_1MM, menu_move_1mm);
MENU_ITEM(submenu, MSG_MOVE_01MM, menu_move_01mm); SUBMENU(MSG_MOVE_01MM, menu_move_01mm);
if (axis == Z_AXIS && (SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) { if (axis == Z_AXIS && (SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) {
MENU_ITEM(submenu, "", []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); }); SUBMENU("", []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
MENU_ITEM_ADDON_START(1); MENU_ITEM_ADDON_START(1);
char tmp[20], numstr[10]; char tmp[20], numstr[10];
// Determine digits needed right of decimal // Determine digits needed right of decimal
@ -330,10 +330,10 @@ void lcd_move_get_z_amount() { _menu_move_distance(Z_AXIS, lcd_move_z); }
void menu_move() { void menu_move() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MOTION); BACK_ITEM(MSG_MOTION);
#if HAS_SOFTWARE_ENDSTOPS && ENABLED(SOFT_ENDSTOPS_MENU_ITEM) #if HAS_SOFTWARE_ENDSTOPS && ENABLED(SOFT_ENDSTOPS_MENU_ITEM)
MENU_ITEM_EDIT(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstops_enabled); EDIT_ITEM(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstops_enabled);
#endif #endif
if ( if (
@ -350,57 +350,57 @@ void menu_move() {
true true
#endif #endif
) { ) {
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_get_x_amount); SUBMENU(MSG_MOVE_X, lcd_move_get_x_amount);
MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_get_y_amount); SUBMENU(MSG_MOVE_Y, lcd_move_get_y_amount);
} }
#if ENABLED(DELTA) #if ENABLED(DELTA)
else else
MENU_ITEM(function, MSG_FREE_XY, lcd_lower_z_to_clip_height); ACTION_ITEM(MSG_FREE_XY, lcd_lower_z_to_clip_height);
#endif #endif
MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_get_z_amount); SUBMENU(MSG_MOVE_Z, lcd_move_get_z_amount);
} }
else else
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); GCODES_ITEM(MSG_AUTO_HOME, PSTR("G28"));
#if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, MAGNETIC_SWITCHING_TOOLHEAD) #if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, MAGNETIC_SWITCHING_TOOLHEAD)
#if EXTRUDERS == 6 #if EXTRUDERS == 6
switch (active_extruder) { switch (active_extruder) {
case 0: MENU_ITEM(gcode, MSG_SELECT " " MSG_E2, PSTR("T1")); break; case 0: GCODES_ITEM(MSG_SELECT " " MSG_E2, PSTR("T1")); break;
case 1: MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0")); break; case 1: GCODES_ITEM(MSG_SELECT " " MSG_E1, PSTR("T0")); break;
case 2: MENU_ITEM(gcode, MSG_SELECT " " MSG_E4, PSTR("T3")); break; case 2: GCODES_ITEM(MSG_SELECT " " MSG_E4, PSTR("T3")); break;
case 3: MENU_ITEM(gcode, MSG_SELECT " " MSG_E3, PSTR("T2")); break; case 3: GCODES_ITEM(MSG_SELECT " " MSG_E3, PSTR("T2")); break;
case 4: MENU_ITEM(gcode, MSG_SELECT " " MSG_E6, PSTR("T5")); break; case 4: GCODES_ITEM(MSG_SELECT " " MSG_E6, PSTR("T5")); break;
case 5: MENU_ITEM(gcode, MSG_SELECT " " MSG_E5, PSTR("T4")); break; case 5: GCODES_ITEM(MSG_SELECT " " MSG_E5, PSTR("T4")); break;
} }
#elif EXTRUDERS == 5 || EXTRUDERS == 4 #elif EXTRUDERS == 5 || EXTRUDERS == 4
switch (active_extruder) { switch (active_extruder) {
case 0: MENU_ITEM(gcode, MSG_SELECT " " MSG_E2, PSTR("T1")); break; case 0: GCODES_ITEM(MSG_SELECT " " MSG_E2, PSTR("T1")); break;
case 1: MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0")); break; case 1: GCODES_ITEM(MSG_SELECT " " MSG_E1, PSTR("T0")); break;
case 2: MENU_ITEM(gcode, MSG_SELECT " " MSG_E4, PSTR("T3")); break; case 2: GCODES_ITEM(MSG_SELECT " " MSG_E4, PSTR("T3")); break;
case 3: MENU_ITEM(gcode, MSG_SELECT " " MSG_E3, PSTR("T2")); break; case 3: GCODES_ITEM(MSG_SELECT " " MSG_E3, PSTR("T2")); break;
} }
#elif EXTRUDERS == 3 #elif EXTRUDERS == 3
if (active_extruder < 2) { if (active_extruder < 2) {
if (active_extruder) if (active_extruder)
MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0")); GCODES_ITEM(MSG_SELECT " " MSG_E1, PSTR("T0"));
else else
MENU_ITEM(gcode, MSG_SELECT " " MSG_E2, PSTR("T1")); GCODES_ITEM(MSG_SELECT " " MSG_E2, PSTR("T1"));
} }
#else #else
if (active_extruder) if (active_extruder)
MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0")); GCODES_ITEM(MSG_SELECT " " MSG_E1, PSTR("T0"));
else else
MENU_ITEM(gcode, MSG_SELECT " " MSG_E2, PSTR("T1")); GCODES_ITEM(MSG_SELECT " " MSG_E2, PSTR("T1"));
#endif #endif
#elif ENABLED(DUAL_X_CARRIAGE) #elif ENABLED(DUAL_X_CARRIAGE)
if (active_extruder) if (active_extruder)
MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0")); GCODES_ITEM(MSG_SELECT " " MSG_E1, PSTR("T0"));
else else
MENU_ITEM(gcode, MSG_SELECT " " MSG_E2, PSTR("T1")); GCODES_ITEM(MSG_SELECT " " MSG_E2, PSTR("T1"));
#endif #endif
@ -409,29 +409,29 @@ void menu_move() {
#if EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE) #if EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE)
// Only the current... // Only the current...
MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_get_e_amount); SUBMENU(MSG_MOVE_E, lcd_move_get_e_amount);
// ...and the non-switching // ...and the non-switching
#if E_MANUAL == 5 #if E_MANUAL == 5
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E5, lcd_move_get_e4_amount); SUBMENU(MSG_MOVE_E MSG_MOVE_E5, lcd_move_get_e4_amount);
#elif E_MANUAL == 3 #elif E_MANUAL == 3
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E3, lcd_move_get_e2_amount); SUBMENU(MSG_MOVE_E MSG_MOVE_E3, lcd_move_get_e2_amount);
#endif #endif
#else #else
// Independent extruders with one E-stepper per hotend // Independent extruders with one E-stepper per hotend
MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_get_e_amount); SUBMENU(MSG_MOVE_E, lcd_move_get_e_amount);
#if E_MANUAL > 1 #if E_MANUAL > 1
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E1, lcd_move_get_e0_amount); SUBMENU(MSG_MOVE_E MSG_MOVE_E1, lcd_move_get_e0_amount);
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E2, lcd_move_get_e1_amount); SUBMENU(MSG_MOVE_E MSG_MOVE_E2, lcd_move_get_e1_amount);
#if E_MANUAL > 2 #if E_MANUAL > 2
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E3, lcd_move_get_e2_amount); SUBMENU(MSG_MOVE_E MSG_MOVE_E3, lcd_move_get_e2_amount);
#if E_MANUAL > 3 #if E_MANUAL > 3
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E4, lcd_move_get_e3_amount); SUBMENU(MSG_MOVE_E MSG_MOVE_E4, lcd_move_get_e3_amount);
#if E_MANUAL > 4 #if E_MANUAL > 4
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E5, lcd_move_get_e4_amount); SUBMENU(MSG_MOVE_E MSG_MOVE_E5, lcd_move_get_e4_amount);
#if E_MANUAL > 5 #if E_MANUAL > 5
MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E6, lcd_move_get_e5_amount); SUBMENU(MSG_MOVE_E MSG_MOVE_E6, lcd_move_get_e5_amount);
#endif // E_MANUAL > 5 #endif // E_MANUAL > 5
#endif // E_MANUAL > 4 #endif // E_MANUAL > 4
#endif // E_MANUAL > 3 #endif // E_MANUAL > 3
@ -457,7 +457,7 @@ void menu_motion() {
// //
// ^ Main // ^ Main
// //
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
// //
// Move Axis // Move Axis
@ -465,23 +465,23 @@ void menu_motion() {
#if ENABLED(DELTA) #if ENABLED(DELTA)
if (all_axes_homed()) if (all_axes_homed())
#endif #endif
MENU_ITEM(submenu, MSG_MOVE_AXIS, menu_move); SUBMENU(MSG_MOVE_AXIS, menu_move);
// //
// Auto Home // Auto Home
// //
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); GCODES_ITEM(MSG_AUTO_HOME, PSTR("G28"));
#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU)
MENU_ITEM(gcode, MSG_AUTO_HOME_X, PSTR("G28 X")); GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28 X"));
MENU_ITEM(gcode, MSG_AUTO_HOME_Y, PSTR("G28 Y")); GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28 Y"));
MENU_ITEM(gcode, MSG_AUTO_HOME_Z, PSTR("G28 Z")); GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28 Z"));
#endif #endif
// //
// Auto Z-Align // Auto Z-Align
// //
#if ENABLED(Z_STEPPER_AUTO_ALIGN) #if ENABLED(Z_STEPPER_AUTO_ALIGN)
MENU_ITEM(gcode, MSG_AUTO_Z_ALIGN, PSTR("G34")); GCODES_ITEM(MSG_AUTO_Z_ALIGN, PSTR("G34"));
#endif #endif
// //
@ -489,39 +489,39 @@ void menu_motion() {
// //
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
MENU_ITEM(submenu, MSG_UBL_LEVEL_BED, _lcd_ubl_level_bed); SUBMENU(MSG_UBL_LEVEL_BED, _lcd_ubl_level_bed);
#elif ENABLED(LCD_BED_LEVELING) #elif ENABLED(LCD_BED_LEVELING)
if (!g29_in_progress) MENU_ITEM(submenu, MSG_BED_LEVELING, menu_bed_leveling); if (!g29_in_progress) SUBMENU(MSG_BED_LEVELING, menu_bed_leveling);
#elif HAS_LEVELING && DISABLED(SLIM_LCD_MENUS) #elif HAS_LEVELING && DISABLED(SLIM_LCD_MENUS)
#if DISABLED(PROBE_MANUALLY) #if DISABLED(PROBE_MANUALLY)
MENU_ITEM(gcode, MSG_LEVEL_BED, PSTR("G28\nG29")); GCODES_ITEM(MSG_LEVEL_BED, PSTR("G28\nG29"));
#endif #endif
if (all_axes_homed() && leveling_is_valid()) { if (all_axes_homed() && leveling_is_valid()) {
bool new_level_state = planner.leveling_active; bool new_level_state = planner.leveling_active;
MENU_ITEM_EDIT_CALLBACK(bool, MSG_BED_LEVELING, &new_level_state, _lcd_toggle_bed_leveling); EDIT_ITEM(bool, MSG_BED_LEVELING, &new_level_state, _lcd_toggle_bed_leveling);
} }
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float3, MSG_Z_FADE_HEIGHT, &lcd_z_fade_height, 0, 100, _lcd_set_z_fade_height); EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &lcd_z_fade_height, 0, 100, _lcd_set_z_fade_height);
#endif #endif
#endif #endif
#if ENABLED(LEVEL_BED_CORNERS) && DISABLED(LCD_BED_LEVELING) #if ENABLED(LEVEL_BED_CORNERS) && DISABLED(LCD_BED_LEVELING)
MENU_ITEM(function, MSG_LEVEL_CORNERS, _lcd_level_bed_corners); ACTION_ITEM(MSG_LEVEL_CORNERS, _lcd_level_bed_corners);
#endif #endif
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
MENU_ITEM(gcode, MSG_M48_TEST, PSTR("G28\nM48 P10")); GCODES_ITEM(MSG_M48_TEST, PSTR("G28\nM48 P10"));
#endif #endif
// //
// Disable Steppers // Disable Steppers
// //
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); GCODES_ITEM(MSG_DISABLE_STEPPERS, PSTR("M84"));
END_MENU(); END_MENU();
} }

View File

@ -35,17 +35,17 @@
void menu_spindle_laser() { void menu_spindle_laser() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
if (cutter.enabled()) { if (cutter.enabled()) {
#if ENABLED(SPINDLE_LASER_PWM) #if ENABLED(SPINDLE_LASER_PWM)
MENU_ITEM_EDIT_CALLBACK(CUTTER_MENU_TYPE, MSG_CUTTER(POWER), &cutter.power, SPEED_POWER_MIN, SPEED_POWER_MAX, cutter.update_output); EDIT_ITEM(CUTTER_MENU_TYPE, MSG_CUTTER(POWER), &cutter.power, SPEED_POWER_MIN, SPEED_POWER_MAX, cutter.update_output);
#endif #endif
MENU_ITEM(function, MSG_CUTTER(OFF), cutter.disable); ACTION_ITEM(MSG_CUTTER(OFF), cutter.disable);
} }
else { else {
MENU_ITEM(function, MSG_CUTTER(ON), cutter.enable_forward); ACTION_ITEM(MSG_CUTTER(ON), cutter.enable_forward);
#if ENABLED(SPINDLE_CHANGE_DIR) #if ENABLED(SPINDLE_CHANGE_DIR)
MENU_ITEM(function, MSG_SPINDLE_REVERSE, cutter.enable_reverse); ACTION_ITEM(MSG_SPINDLE_REVERSE, cutter.enable_reverse);
#endif #endif
} }
END_MENU(); END_MENU();

View File

@ -183,120 +183,120 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
void menu_preheat_m1() { void menu_preheat_m1() {
START_MENU(); START_MENU();
MENU_BACK(MSG_TEMPERATURE); BACK_ITEM(MSG_TEMPERATURE);
#if HOTENDS == 1 #if HOTENDS == 1
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0); ACTION_ITEM(MSG_PREHEAT_1, lcd_preheat_m1_e0);
MENU_ITEM(function, MSG_PREHEAT_1_END, lcd_preheat_m1_e0_only); ACTION_ITEM(MSG_PREHEAT_1_END, lcd_preheat_m1_e0_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0_only); ACTION_ITEM(MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
#endif #endif
#elif HOTENDS > 1 #elif HOTENDS > 1
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0);
MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E1, lcd_preheat_m1_e0_only); ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E1, lcd_preheat_m1_e0_only);
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1);
MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E2, lcd_preheat_m1_e1_only); ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E2, lcd_preheat_m1_e1_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0_only); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0_only);
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1_only); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1_only);
#endif #endif
#if HOTENDS > 2 #if HOTENDS > 2
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2);
MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E3, lcd_preheat_m1_e2_only); ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E3, lcd_preheat_m1_e2_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2_only); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2_only);
#endif #endif
#if HOTENDS > 3 #if HOTENDS > 3
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3);
MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E4, lcd_preheat_m1_e3_only); ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E4, lcd_preheat_m1_e3_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only);
#endif #endif
#if HOTENDS > 4 #if HOTENDS > 4
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4);
MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E5, lcd_preheat_m1_e4_only); ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E5, lcd_preheat_m1_e4_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4_only); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4_only);
#endif #endif
#if HOTENDS > 5 #if HOTENDS > 5
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H6, lcd_preheat_m1_e5); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H6, lcd_preheat_m1_e5);
MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E6, lcd_preheat_m1_e5_only); ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E6, lcd_preheat_m1_e5_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H6, lcd_preheat_m1_e5_only); ACTION_ITEM(MSG_PREHEAT_1_N MSG_H6, lcd_preheat_m1_e5_only);
#endif #endif
#endif // HOTENDS > 5 #endif // HOTENDS > 5
#endif // HOTENDS > 4 #endif // HOTENDS > 4
#endif // HOTENDS > 3 #endif // HOTENDS > 3
#endif // HOTENDS > 2 #endif // HOTENDS > 2
MENU_ITEM(function, MSG_PREHEAT_1_ALL, lcd_preheat_m1_all); ACTION_ITEM(MSG_PREHEAT_1_ALL, lcd_preheat_m1_all);
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_1_BEDONLY, lcd_preheat_m1_bedonly); ACTION_ITEM(MSG_PREHEAT_1_BEDONLY, lcd_preheat_m1_bedonly);
#endif #endif
END_MENU(); END_MENU();
} }
void menu_preheat_m2() { void menu_preheat_m2() {
START_MENU(); START_MENU();
MENU_BACK(MSG_TEMPERATURE); BACK_ITEM(MSG_TEMPERATURE);
#if HOTENDS == 1 #if HOTENDS == 1
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0); ACTION_ITEM(MSG_PREHEAT_2, lcd_preheat_m2_e0);
MENU_ITEM(function, MSG_PREHEAT_2_END, lcd_preheat_m2_e0_only); ACTION_ITEM(MSG_PREHEAT_2_END, lcd_preheat_m2_e0_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0_only); ACTION_ITEM(MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
#endif #endif
#elif HOTENDS > 1 #elif HOTENDS > 1
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0);
MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E1, lcd_preheat_m2_e0_only); ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E1, lcd_preheat_m2_e0_only);
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1);
MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E2, lcd_preheat_m2_e1_only); ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E2, lcd_preheat_m2_e1_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0_only); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0_only);
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1_only); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1_only);
#endif #endif
#if HOTENDS > 2 #if HOTENDS > 2
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2);
MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E3, lcd_preheat_m2_e2_only); ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E3, lcd_preheat_m2_e2_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2_only); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2_only);
#endif #endif
#if HOTENDS > 3 #if HOTENDS > 3
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3);
MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E4, lcd_preheat_m2_e3_only); ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E4, lcd_preheat_m2_e3_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only);
#endif #endif
#if HOTENDS > 4 #if HOTENDS > 4
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4);
MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E5, lcd_preheat_m2_e4_only); ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E5, lcd_preheat_m2_e4_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4_only); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4_only);
#endif #endif
#if HOTENDS > 5 #if HOTENDS > 5
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H6, lcd_preheat_m2_e5); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H6, lcd_preheat_m2_e5);
MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E6, lcd_preheat_m2_e5_only); ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E6, lcd_preheat_m2_e5_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H6, lcd_preheat_m2_e5_only); ACTION_ITEM(MSG_PREHEAT_2_N MSG_H6, lcd_preheat_m2_e5_only);
#endif #endif
#endif // HOTENDS > 5 #endif // HOTENDS > 5
#endif // HOTENDS > 4 #endif // HOTENDS > 4
#endif // HOTENDS > 3 #endif // HOTENDS > 3
#endif // HOTENDS > 2 #endif // HOTENDS > 2
MENU_ITEM(function, MSG_PREHEAT_2_ALL, lcd_preheat_m2_all); ACTION_ITEM(MSG_PREHEAT_2_ALL, lcd_preheat_m2_all);
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_2_BEDONLY, lcd_preheat_m2_bedonly); ACTION_ITEM(MSG_PREHEAT_2_BEDONLY, lcd_preheat_m2_bedonly);
#endif #endif
END_MENU(); END_MENU();
} }
@ -311,16 +311,16 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
void menu_temperature() { void menu_temperature() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
// //
// Nozzle: // Nozzle:
// Nozzle [1-5]: // Nozzle [1-5]:
// //
#if HOTENDS == 1 #if HOTENDS == 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, thermalManager.start_watching_E0); EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, thermalManager.start_watching_E0);
#elif HOTENDS > 1 #elif HOTENDS > 1
#define EDIT_TARGET(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, thermalManager.start_watching_E##N) #define EDIT_TARGET(N) EDIT_ITEM_FAST(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, thermalManager.start_watching_E##N)
EDIT_TARGET(0); EDIT_TARGET(0);
EDIT_TARGET(1); EDIT_TARGET(1);
#if HOTENDS > 2 #if HOTENDS > 2
@ -338,21 +338,21 @@ void menu_temperature() {
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#if ENABLED(SINGLENOZZLE) #if ENABLED(SINGLENOZZLE)
MENU_MULTIPLIER_ITEM_EDIT(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15); EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
#endif #endif
// //
// Bed: // Bed:
// //
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed); EDIT_ITEM_FAST(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed);
#endif #endif
// //
// Chamber: // Chamber:
// //
#if HAS_HEATED_CHAMBER #if HAS_HEATED_CHAMBER
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 5, thermalManager.start_watching_chamber); EDIT_ITEM_FAST(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 5, thermalManager.start_watching_chamber);
#endif #endif
// //
@ -360,21 +360,21 @@ void menu_temperature() {
// //
#if FAN_COUNT > 0 #if FAN_COUNT > 0
#if HAS_FAN0 #if HAS_FAN0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(percent, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.lcd_tmpfan_speed[0], 0, 255, thermalManager.lcd_setFanSpeed0); EDIT_ITEM_FAST(percent, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.lcd_tmpfan_speed[0], 0, 255, thermalManager.lcd_setFanSpeed0);
#if ENABLED(EXTRA_FAN_SPEED) #if ENABLED(EXTRA_FAN_SPEED)
MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.new_fan_speed[0], 3, 255); EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.new_fan_speed[0], 3, 255);
#endif #endif
#endif #endif
#if HAS_FAN1 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 1) #if HAS_FAN1 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 1)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(percent, MSG_FAN_SPEED " 2", &thermalManager.lcd_tmpfan_speed[1], 0, 255, thermalManager.lcd_setFanSpeed1); EDIT_ITEM_FAST(percent, MSG_FAN_SPEED " 2", &thermalManager.lcd_tmpfan_speed[1], 0, 255, thermalManager.lcd_setFanSpeed1);
#if ENABLED(EXTRA_FAN_SPEED) #if ENABLED(EXTRA_FAN_SPEED)
MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_EXTRA_FAN_SPEED " 2", &thermalManager.new_fan_speed[1], 3, 255); EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED " 2", &thermalManager.new_fan_speed[1], 3, 255);
#endif #endif
#endif #endif
#if HAS_FAN2 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 2) #if HAS_FAN2 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 2)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(percent, MSG_FAN_SPEED " 3", &thermalManager.lcd_tmpfan_speed[2], 0, 255, thermalManager.lcd_setFanSpeed2); EDIT_ITEM_FAST(percent, MSG_FAN_SPEED " 3", &thermalManager.lcd_tmpfan_speed[2], 0, 255, thermalManager.lcd_setFanSpeed2);
#if ENABLED(EXTRA_FAN_SPEED) #if ENABLED(EXTRA_FAN_SPEED)
MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_EXTRA_FAN_SPEED " 3", &thermalManager.new_fan_speed[2], 3, 255); EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED " 3", &thermalManager.new_fan_speed[2], 3, 255);
#endif #endif
#endif #endif
#endif // FAN_COUNT > 0 #endif // FAN_COUNT > 0
@ -385,11 +385,11 @@ void menu_temperature() {
// Preheat for Material 1 and 2 // Preheat for Material 1 and 2
// //
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || TEMP_SENSOR_5 != 0 || HAS_HEATED_BED #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || TEMP_SENSOR_5 != 0 || HAS_HEATED_BED
MENU_ITEM(submenu, MSG_PREHEAT_1, menu_preheat_m1); SUBMENU(MSG_PREHEAT_1, menu_preheat_m1);
MENU_ITEM(submenu, MSG_PREHEAT_2, menu_preheat_m2); SUBMENU(MSG_PREHEAT_2, menu_preheat_m2);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0_only); ACTION_ITEM(MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0_only); ACTION_ITEM(MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
#endif #endif
// //
@ -400,7 +400,7 @@ void menu_temperature() {
#if HAS_TEMP_BED #if HAS_TEMP_BED
if (thermalManager.temp_bed.target) has_heat = true; if (thermalManager.temp_bed.target) has_heat = true;
#endif #endif
if (has_heat) MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown); if (has_heat) ACTION_ITEM(MSG_COOLDOWN, lcd_cooldown);
#endif // HAS_TEMP_HOTEND #endif // HAS_TEMP_HOTEND

View File

@ -32,7 +32,7 @@
#include "../../module/stepper/indirection.h" #include "../../module/stepper/indirection.h"
#include "../../feature/tmc_util.h" #include "../../feature/tmc_util.h"
#define TMC_EDIT_STORED_I_RMS(ST,MSG) MENU_ITEM_EDIT_CALLBACK(uint16_4, MSG, &stepper##ST.val_mA, 100, 3000, refresh_stepper_current_##ST) #define TMC_EDIT_STORED_I_RMS(ST,MSG) EDIT_ITEM(uint16_4, MSG, &stepper##ST.val_mA, 100, 3000, refresh_stepper_current_##ST)
#if AXIS_IS_TMC(X) #if AXIS_IS_TMC(X)
void refresh_stepper_current_X() { stepperX.refresh_stepper_current(); } void refresh_stepper_current_X() { stepperX.refresh_stepper_current(); }
@ -76,7 +76,7 @@
void menu_tmc_current() { void menu_tmc_current() {
START_MENU(); START_MENU();
MENU_BACK(MSG_TMC_DRIVERS); BACK_ITEM(MSG_TMC_DRIVERS);
#if AXIS_IS_TMC(X) #if AXIS_IS_TMC(X)
TMC_EDIT_STORED_I_RMS(X, MSG_X); TMC_EDIT_STORED_I_RMS(X, MSG_X);
#endif #endif
@ -121,7 +121,7 @@ void menu_tmc_current() {
#if ENABLED(HYBRID_THRESHOLD) #if ENABLED(HYBRID_THRESHOLD)
#define TMC_EDIT_STORED_HYBRID_THRS(ST, MSG) MENU_ITEM_EDIT_CALLBACK(uint8, MSG, &stepper##ST.stored.hybrid_thrs, 0, 255, refresh_hybrid_thrs_##ST); #define TMC_EDIT_STORED_HYBRID_THRS(ST, MSG) EDIT_ITEM(uint8, MSG, &stepper##ST.stored.hybrid_thrs, 0, 255, refresh_hybrid_thrs_##ST);
#if AXIS_HAS_STEALTHCHOP(X) #if AXIS_HAS_STEALTHCHOP(X)
void refresh_hybrid_thrs_X() { stepperX.refresh_hybrid_thrs(); } void refresh_hybrid_thrs_X() { stepperX.refresh_hybrid_thrs(); }
@ -165,7 +165,7 @@ void menu_tmc_current() {
void menu_tmc_hybrid_thrs() { void menu_tmc_hybrid_thrs() {
START_MENU(); START_MENU();
MENU_BACK(MSG_TMC_DRIVERS); BACK_ITEM(MSG_TMC_DRIVERS);
#if AXIS_HAS_STEALTHCHOP(X) #if AXIS_HAS_STEALTHCHOP(X)
TMC_EDIT_STORED_HYBRID_THRS(X, MSG_X); TMC_EDIT_STORED_HYBRID_THRS(X, MSG_X);
#endif #endif
@ -212,7 +212,7 @@ void menu_tmc_current() {
#if ENABLED(SENSORLESS_HOMING) #if ENABLED(SENSORLESS_HOMING)
#define TMC_EDIT_STORED_SGT(ST) MENU_ITEM_EDIT_CALLBACK(int4, MSG_##ST, &stepper##ST.stored.homing_thrs, stepper##ST.sgt_min, stepper##ST.sgt_max, refresh_homing_thrs_##ST); #define TMC_EDIT_STORED_SGT(ST) EDIT_ITEM(int4, MSG_##ST, &stepper##ST.stored.homing_thrs, stepper##ST.sgt_min, stepper##ST.sgt_max, refresh_homing_thrs_##ST);
#if X_SENSORLESS #if X_SENSORLESS
void refresh_homing_thrs_X() { stepperX.refresh_homing_thrs(); } void refresh_homing_thrs_X() { stepperX.refresh_homing_thrs(); }
@ -229,7 +229,7 @@ void menu_tmc_current() {
void menu_tmc_homing_thrs() { void menu_tmc_homing_thrs() {
START_MENU(); START_MENU();
MENU_BACK(MSG_TMC_DRIVERS); BACK_ITEM(MSG_TMC_DRIVERS);
#if X_SENSORLESS #if X_SENSORLESS
TMC_EDIT_STORED_SGT(X); TMC_EDIT_STORED_SGT(X);
#endif #endif
@ -249,7 +249,7 @@ void menu_tmc_current() {
#if HAS_STEALTHCHOP #if HAS_STEALTHCHOP
#define TMC_EDIT_STEP_MODE(ST, MSG) MENU_ITEM_EDIT_CALLBACK(bool, MSG, &stepper##ST.stored.stealthChop_enabled, refresh_stepping_mode_##ST) #define TMC_EDIT_STEP_MODE(ST, MSG) EDIT_ITEM(bool, MSG, &stepper##ST.stored.stealthChop_enabled, refresh_stepping_mode_##ST)
#if AXIS_HAS_STEALTHCHOP(X) #if AXIS_HAS_STEALTHCHOP(X)
void refresh_stepping_mode_X() { stepperX.refresh_stepping_mode(); } void refresh_stepping_mode_X() { stepperX.refresh_stepping_mode(); }
@ -294,7 +294,7 @@ void menu_tmc_current() {
void menu_tmc_step_mode() { void menu_tmc_step_mode() {
START_MENU(); START_MENU();
STATIC_ITEM(MSG_TMC_STEALTH_ENABLED); STATIC_ITEM(MSG_TMC_STEALTH_ENABLED);
MENU_BACK(MSG_TMC_DRIVERS); BACK_ITEM(MSG_TMC_DRIVERS);
#if AXIS_HAS_STEALTHCHOP(X) #if AXIS_HAS_STEALTHCHOP(X)
TMC_EDIT_STEP_MODE(X, MSG_X); TMC_EDIT_STEP_MODE(X, MSG_X);
#endif #endif
@ -341,16 +341,16 @@ void menu_tmc_current() {
void menu_tmc() { void menu_tmc() {
START_MENU(); START_MENU();
MENU_BACK(MSG_CONTROL); BACK_ITEM(MSG_CONTROL);
MENU_ITEM(submenu, MSG_TMC_CURRENT, menu_tmc_current); SUBMENU(MSG_TMC_CURRENT, menu_tmc_current);
#if ENABLED(HYBRID_THRESHOLD) #if ENABLED(HYBRID_THRESHOLD)
MENU_ITEM(submenu, MSG_TMC_HYBRID_THRS, menu_tmc_hybrid_thrs); SUBMENU(MSG_TMC_HYBRID_THRS, menu_tmc_hybrid_thrs);
#endif #endif
#if ENABLED(SENSORLESS_HOMING) #if ENABLED(SENSORLESS_HOMING)
MENU_ITEM(submenu, MSG_TMC_HOMING_THRS, menu_tmc_homing_thrs); SUBMENU(MSG_TMC_HOMING_THRS, menu_tmc_homing_thrs);
#endif #endif
#if HAS_STEALTHCHOP #if HAS_STEALTHCHOP
MENU_ITEM(submenu, MSG_TMC_STEPPING_MODE, menu_tmc_step_mode); SUBMENU(MSG_TMC_STEPPING_MODE, menu_tmc_step_mode);
#endif #endif
END_MENU(); END_MENU();
} }

View File

@ -124,18 +124,18 @@
void menu_tune() { void menu_tune() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); BACK_ITEM(MSG_MAIN);
// //
// Speed: // Speed:
// //
MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999); EDIT_ITEM(int3, MSG_SPEED, &feedrate_percentage, 10, 999);
// //
// Manual bed leveling, Bed Z: // Manual bed leveling, Bed Z:
// //
#if BOTH(MESH_BED_LEVELING, LCD_BED_LEVELING) #if BOTH(MESH_BED_LEVELING, LCD_BED_LEVELING)
MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); EDIT_ITEM(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
#endif #endif
// //
@ -143,9 +143,9 @@ void menu_tune() {
// Nozzle [1-4]: // Nozzle [1-4]:
// //
#if HOTENDS == 1 #if HOTENDS == 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, thermalManager.start_watching_E0); EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, thermalManager.start_watching_E0);
#elif HOTENDS > 1 #elif HOTENDS > 1
#define EDIT_NOZZLE(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, thermalManager.start_watching_E##N) #define EDIT_NOZZLE(N) EDIT_ITEM_FAST(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, thermalManager.start_watching_E##N)
EDIT_NOZZLE(0); EDIT_NOZZLE(0);
EDIT_NOZZLE(1); EDIT_NOZZLE(1);
#if HOTENDS > 2 #if HOTENDS > 2
@ -163,14 +163,14 @@ void menu_tune() {
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#if ENABLED(SINGLENOZZLE) #if ENABLED(SINGLENOZZLE)
MENU_MULTIPLIER_ITEM_EDIT(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15); EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
#endif #endif
// //
// Bed: // Bed:
// //
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed); EDIT_ITEM_FAST(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed);
#endif #endif
// //
@ -178,21 +178,21 @@ void menu_tune() {
// //
#if FAN_COUNT > 0 #if FAN_COUNT > 0
#if HAS_FAN0 #if HAS_FAN0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(uint8, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.lcd_tmpfan_speed[0], 0, 255, thermalManager.lcd_setFanSpeed0); EDIT_ITEM_FAST(uint8, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.lcd_tmpfan_speed[0], 0, 255, thermalManager.lcd_setFanSpeed0);
#if ENABLED(EXTRA_FAN_SPEED) #if ENABLED(EXTRA_FAN_SPEED)
MENU_MULTIPLIER_ITEM_EDIT(uint8, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.new_fan_speed[0], 3, 255); EDIT_ITEM_FAST(uint8, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.new_fan_speed[0], 3, 255);
#endif #endif
#endif #endif
#if HAS_FAN1 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 1) #if HAS_FAN1 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 1)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(uint8, MSG_FAN_SPEED " 2", &thermalManager.lcd_tmpfan_speed[1], 0, 255, thermalManager.lcd_setFanSpeed1); EDIT_ITEM_FAST(uint8, MSG_FAN_SPEED " 2", &thermalManager.lcd_tmpfan_speed[1], 0, 255, thermalManager.lcd_setFanSpeed1);
#if ENABLED(EXTRA_FAN_SPEED) #if ENABLED(EXTRA_FAN_SPEED)
MENU_MULTIPLIER_ITEM_EDIT(uint8, MSG_EXTRA_FAN_SPEED " 2", &thermalManager.new_fan_speed[1], 3, 255); EDIT_ITEM_FAST(uint8, MSG_EXTRA_FAN_SPEED " 2", &thermalManager.new_fan_speed[1], 3, 255);
#endif #endif
#endif #endif
#if HAS_FAN2 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 2) #if HAS_FAN2 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 2)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(uint8, MSG_FAN_SPEED " 3", &thermalManager.lcd_tmpfan_speed[2], 0, 255, thermalManager.lcd_setFanSpeed2); EDIT_ITEM_FAST(uint8, MSG_FAN_SPEED " 3", &thermalManager.lcd_tmpfan_speed[2], 0, 255, thermalManager.lcd_setFanSpeed2);
#if ENABLED(EXTRA_FAN_SPEED) #if ENABLED(EXTRA_FAN_SPEED)
MENU_MULTIPLIER_ITEM_EDIT(uint8, MSG_EXTRA_FAN_SPEED " 3", &thermalManager.new_fan_speed[2], 3, 255); EDIT_ITEM_FAST(uint8, MSG_EXTRA_FAN_SPEED " 3", &thermalManager.new_fan_speed[2], 3, 255);
#endif #endif
#endif #endif
#endif // FAN_COUNT > 0 #endif // FAN_COUNT > 0
@ -202,10 +202,10 @@ void menu_tune() {
// Flow [1-5]: // Flow [1-5]:
// //
#if EXTRUDERS == 1 #if EXTRUDERS == 1
MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0); EDIT_ITEM(int3, MSG_FLOW, &planner.flow_percentage[0], 10, 999, _lcd_refresh_e_factor_0);
#elif EXTRUDERS #elif EXTRUDERS
MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, _lcd_refresh_e_factor); EDIT_ITEM(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, _lcd_refresh_e_factor);
#define EDIT_FLOW(N) MENU_ITEM_EDIT_CALLBACK(int3, MSG_FLOW MSG_LCD_N##N, &planner.flow_percentage[N], 10, 999, _lcd_refresh_e_factor_##N) #define EDIT_FLOW(N) EDIT_ITEM(int3, MSG_FLOW MSG_LCD_N##N, &planner.flow_percentage[N], 10, 999, _lcd_refresh_e_factor_##N)
EDIT_FLOW(0); EDIT_FLOW(0);
EDIT_FLOW(1); EDIT_FLOW(1);
#if EXTRUDERS > 2 #if EXTRUDERS > 2
@ -229,13 +229,13 @@ void menu_tune() {
// //
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)
#if ENABLED(BABYSTEP_XY) #if ENABLED(BABYSTEP_XY)
MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_babystep_x); SUBMENU(MSG_BABYSTEP_X, lcd_babystep_x);
MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_babystep_y); SUBMENU(MSG_BABYSTEP_Y, lcd_babystep_y);
#endif #endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
#else #else
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z); SUBMENU(MSG_BABYSTEP_Z, lcd_babystep_z);
#endif #endif
#endif #endif

View File

@ -127,12 +127,12 @@ void _lcd_ubl_build_custom_mesh() {
*/ */
void _lcd_ubl_custom_mesh() { void _lcd_ubl_custom_mesh() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_BUILD_MESH_MENU); BACK_ITEM(MSG_UBL_BUILD_MESH_MENU);
MENU_ITEM_EDIT(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 10)); EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 10));
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM_EDIT(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, (BED_MAXTEMP - 10)); EDIT_ITEM(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, (BED_MAXTEMP - 10));
#endif #endif
MENU_ITEM(function, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_build_custom_mesh); ACTION_ITEM(MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_build_custom_mesh);
END_MENU(); END_MENU();
} }
@ -157,9 +157,9 @@ void _lcd_ubl_adjust_height_cmd() {
*/ */
void _menu_ubl_height_adjust() { void _menu_ubl_height_adjust() {
START_MENU(); START_MENU();
MENU_BACK(MSG_EDIT_MESH); BACK_ITEM(MSG_EDIT_MESH);
MENU_ITEM_EDIT_CALLBACK(int3, MSG_UBL_MESH_HEIGHT_AMOUNT, &ubl_height_amount, -9, 9, _lcd_ubl_adjust_height_cmd); EDIT_ITEM(int3, MSG_UBL_MESH_HEIGHT_AMOUNT, &ubl_height_amount, -9, 9, _lcd_ubl_adjust_height_cmd);
MENU_ITEM(function, MSG_WATCH, ui.return_to_status); ACTION_ITEM(MSG_WATCH, ui.return_to_status);
END_MENU(); END_MENU();
} }
@ -174,11 +174,11 @@ void _menu_ubl_height_adjust() {
*/ */
void _lcd_ubl_edit_mesh() { void _lcd_ubl_edit_mesh() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_TOOLS); BACK_ITEM(MSG_UBL_TOOLS);
MENU_ITEM(gcode, MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R999 T")); GCODES_ITEM(MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R999 T"));
MENU_ITEM(gcode, MSG_UBL_FINE_TUNE_CLOSEST, PSTR("G29 P4 T")); GCODES_ITEM(MSG_UBL_FINE_TUNE_CLOSEST, PSTR("G29 P4 T"));
MENU_ITEM(submenu, MSG_UBL_MESH_HEIGHT_ADJUST, _menu_ubl_height_adjust); SUBMENU(MSG_UBL_MESH_HEIGHT_ADJUST, _menu_ubl_height_adjust);
MENU_ITEM(function, MSG_WATCH, ui.return_to_status); ACTION_ITEM(MSG_WATCH, ui.return_to_status);
END_MENU(); END_MENU();
} }
@ -210,16 +210,16 @@ void _lcd_ubl_validate_custom_mesh() {
*/ */
void _lcd_ubl_validate_mesh() { void _lcd_ubl_validate_mesh() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_TOOLS); BACK_ITEM(MSG_UBL_TOOLS);
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(gcode, MSG_UBL_VALIDATE_MESH_M1, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_1_TEMP_BED) " H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P")); GCODES_ITEM(MSG_UBL_VALIDATE_MESH_M1, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_1_TEMP_BED) " H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P"));
MENU_ITEM(gcode, MSG_UBL_VALIDATE_MESH_M2, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_2_TEMP_BED) " H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P")); GCODES_ITEM(MSG_UBL_VALIDATE_MESH_M2, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_2_TEMP_BED) " H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P"));
#else #else
MENU_ITEM(gcode, MSG_UBL_VALIDATE_MESH_M1, PSTR("G28\nG26 C B0 H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P")); GCODES_ITEM(MSG_UBL_VALIDATE_MESH_M1, PSTR("G28\nG26 C B0 H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P"));
MENU_ITEM(gcode, MSG_UBL_VALIDATE_MESH_M2, PSTR("G28\nG26 C B0 H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P")); GCODES_ITEM(MSG_UBL_VALIDATE_MESH_M2, PSTR("G28\nG26 C B0 H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P"));
#endif #endif
MENU_ITEM(function, MSG_UBL_VALIDATE_CUSTOM_MESH, _lcd_ubl_validate_custom_mesh); ACTION_ITEM(MSG_UBL_VALIDATE_CUSTOM_MESH, _lcd_ubl_validate_custom_mesh);
MENU_ITEM(function, MSG_WATCH, ui.return_to_status); ACTION_ITEM(MSG_WATCH, ui.return_to_status);
END_MENU(); END_MENU();
} }
@ -241,9 +241,9 @@ void _lcd_ubl_grid_level_cmd() {
*/ */
void _lcd_ubl_grid_level() { void _lcd_ubl_grid_level() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_TOOLS); BACK_ITEM(MSG_UBL_TOOLS);
MENU_ITEM_EDIT(int3, MSG_UBL_SIDE_POINTS, &side_points, 2, 6); EDIT_ITEM(int3, MSG_UBL_SIDE_POINTS, &side_points, 2, 6);
MENU_ITEM(function, MSG_UBL_MESH_LEVEL, _lcd_ubl_grid_level_cmd); ACTION_ITEM(MSG_UBL_MESH_LEVEL, _lcd_ubl_grid_level_cmd);
END_MENU(); END_MENU();
} }
@ -257,10 +257,10 @@ void _lcd_ubl_grid_level() {
*/ */
void _lcd_ubl_mesh_leveling() { void _lcd_ubl_mesh_leveling() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_TOOLS); BACK_ITEM(MSG_UBL_TOOLS);
MENU_ITEM(gcode, MSG_UBL_3POINT_MESH_LEVELING, PSTR("G29 J0")); GCODES_ITEM(MSG_UBL_3POINT_MESH_LEVELING, PSTR("G29 J0"));
MENU_ITEM(submenu, MSG_UBL_GRID_MESH_LEVELING, _lcd_ubl_grid_level); SUBMENU(MSG_UBL_GRID_MESH_LEVELING, _lcd_ubl_grid_level);
MENU_ITEM(function, MSG_WATCH, ui.return_to_status); ACTION_ITEM(MSG_WATCH, ui.return_to_status);
END_MENU(); END_MENU();
} }
@ -285,11 +285,11 @@ void _lcd_ubl_fillin_amount_cmd() {
*/ */
void _menu_ubl_fillin() { void _menu_ubl_fillin() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_BUILD_MESH_MENU); BACK_ITEM(MSG_UBL_BUILD_MESH_MENU);
MENU_ITEM_EDIT_CALLBACK(int3, MSG_UBL_FILLIN_AMOUNT, &ubl_fillin_amount, 0, 9, _lcd_ubl_fillin_amount_cmd); EDIT_ITEM(int3, MSG_UBL_FILLIN_AMOUNT, &ubl_fillin_amount, 0, 9, _lcd_ubl_fillin_amount_cmd);
MENU_ITEM(gcode, MSG_UBL_SMART_FILLIN, PSTR("G29 P3 T0")); GCODES_ITEM(MSG_UBL_SMART_FILLIN, PSTR("G29 P3 T0"));
MENU_ITEM(gcode, MSG_UBL_MANUAL_FILLIN, PSTR("G29 P2 B T0")); GCODES_ITEM(MSG_UBL_MANUAL_FILLIN, PSTR("G29 P2 B T0"));
MENU_ITEM(function, MSG_WATCH, ui.return_to_status); ACTION_ITEM(MSG_WATCH, ui.return_to_status);
END_MENU(); END_MENU();
} }
@ -314,9 +314,9 @@ void _lcd_ubl_invalidate() {
*/ */
void _lcd_ubl_build_mesh() { void _lcd_ubl_build_mesh() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_TOOLS); BACK_ITEM(MSG_UBL_TOOLS);
#if HAS_HEATED_BED #if HAS_HEATED_BED
MENU_ITEM(gcode, MSG_UBL_BUILD_MESH_M1, PSTR( GCODES_ITEM(MSG_UBL_BUILD_MESH_M1, PSTR(
"G28\n" "G28\n"
"M190 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\n" "M190 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\n"
"M109 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) "\n" "M109 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) "\n"
@ -324,7 +324,7 @@ void _lcd_ubl_build_mesh() {
"M104 S0\n" "M104 S0\n"
"M140 S0" "M140 S0"
)); ));
MENU_ITEM(gcode, MSG_UBL_BUILD_MESH_M2, PSTR( GCODES_ITEM(MSG_UBL_BUILD_MESH_M2, PSTR(
"G28\n" "G28\n"
"M190 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\n" "M190 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\n"
"M109 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) "\n" "M109 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) "\n"
@ -333,26 +333,26 @@ void _lcd_ubl_build_mesh() {
"M140 S0" "M140 S0"
)); ));
#else #else
MENU_ITEM(gcode, MSG_UBL_BUILD_MESH_M1, PSTR( GCODES_ITEM(MSG_UBL_BUILD_MESH_M1, PSTR(
"G28\n" "G28\n"
"M109 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) "\n" "M109 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) "\n"
"G29 P1\n" "G29 P1\n"
"M104 S0" "M104 S0"
)); ));
MENU_ITEM(gcode, MSG_UBL_BUILD_MESH_M2, PSTR( GCODES_ITEM(MSG_UBL_BUILD_MESH_M2, PSTR(
"G28\n" "G28\n"
"M109 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) "\n" "M109 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) "\n"
"G29 P1\n" "G29 P1\n"
"M104 S0" "M104 S0"
)); ));
#endif #endif
MENU_ITEM(submenu, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_custom_mesh); SUBMENU(MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_custom_mesh);
MENU_ITEM(gcode, MSG_UBL_BUILD_COLD_MESH, PSTR("G28\nG29 P1")); GCODES_ITEM(MSG_UBL_BUILD_COLD_MESH, PSTR("G28\nG29 P1"));
MENU_ITEM(submenu, MSG_UBL_FILLIN_MESH, _menu_ubl_fillin); SUBMENU(MSG_UBL_FILLIN_MESH, _menu_ubl_fillin);
MENU_ITEM(gcode, MSG_UBL_CONTINUE_MESH, PSTR("G29 P1 C")); GCODES_ITEM(MSG_UBL_CONTINUE_MESH, PSTR("G29 P1 C"));
MENU_ITEM(function, MSG_UBL_INVALIDATE_ALL, _lcd_ubl_invalidate); ACTION_ITEM(MSG_UBL_INVALIDATE_ALL, _lcd_ubl_invalidate);
MENU_ITEM(gcode, MSG_UBL_INVALIDATE_CLOSEST, PSTR("G29 I")); GCODES_ITEM(MSG_UBL_INVALIDATE_CLOSEST, PSTR("G29 I"));
MENU_ITEM(function, MSG_WATCH, ui.return_to_status); ACTION_ITEM(MSG_WATCH, ui.return_to_status);
END_MENU(); END_MENU();
} }
@ -389,14 +389,14 @@ void _lcd_ubl_save_mesh_cmd() {
void _lcd_ubl_storage_mesh() { void _lcd_ubl_storage_mesh() {
int16_t a = settings.calc_num_meshes(); int16_t a = settings.calc_num_meshes();
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_LEVEL_BED); BACK_ITEM(MSG_UBL_LEVEL_BED);
if (!WITHIN(ubl_storage_slot, 0, a - 1)) { if (!WITHIN(ubl_storage_slot, 0, a - 1)) {
STATIC_ITEM(MSG_UBL_NO_STORAGE); STATIC_ITEM(MSG_UBL_NO_STORAGE);
} }
else { else {
MENU_ITEM_EDIT(int3, MSG_UBL_STORAGE_SLOT, &ubl_storage_slot, 0, a - 1); EDIT_ITEM(int3, MSG_UBL_STORAGE_SLOT, &ubl_storage_slot, 0, a - 1);
MENU_ITEM(function, MSG_UBL_LOAD_MESH, _lcd_ubl_load_mesh_cmd); ACTION_ITEM(MSG_UBL_LOAD_MESH, _lcd_ubl_load_mesh_cmd);
MENU_ITEM(function, MSG_UBL_SAVE_MESH, _lcd_ubl_save_mesh_cmd); ACTION_ITEM(MSG_UBL_SAVE_MESH, _lcd_ubl_save_mesh_cmd);
} }
END_MENU(); END_MENU();
} }
@ -540,11 +540,11 @@ void _lcd_ubl_output_map_lcd_cmd() {
*/ */
void _lcd_ubl_output_map() { void _lcd_ubl_output_map() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_LEVEL_BED); BACK_ITEM(MSG_UBL_LEVEL_BED);
MENU_ITEM(gcode, MSG_UBL_OUTPUT_MAP_HOST, PSTR("G29 T0")); GCODES_ITEM(MSG_UBL_OUTPUT_MAP_HOST, PSTR("G29 T0"));
MENU_ITEM(gcode, MSG_UBL_OUTPUT_MAP_CSV, PSTR("G29 T1")); GCODES_ITEM(MSG_UBL_OUTPUT_MAP_CSV, PSTR("G29 T1"));
MENU_ITEM(gcode, MSG_UBL_OUTPUT_MAP_BACKUP, PSTR("G29 S-1")); GCODES_ITEM(MSG_UBL_OUTPUT_MAP_BACKUP, PSTR("G29 S-1"));
MENU_ITEM(function, MSG_UBL_OUTPUT_MAP, _lcd_ubl_output_map_lcd_cmd); ACTION_ITEM(MSG_UBL_OUTPUT_MAP, _lcd_ubl_output_map_lcd_cmd);
END_MENU(); END_MENU();
} }
@ -559,12 +559,12 @@ void _lcd_ubl_output_map() {
*/ */
void _menu_ubl_tools() { void _menu_ubl_tools() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_LEVEL_BED); BACK_ITEM(MSG_UBL_LEVEL_BED);
MENU_ITEM(submenu, MSG_UBL_BUILD_MESH_MENU, _lcd_ubl_build_mesh); SUBMENU(MSG_UBL_BUILD_MESH_MENU, _lcd_ubl_build_mesh);
MENU_ITEM(gcode, MSG_UBL_MANUAL_MESH, PSTR("G29 I999\nG29 P2 B T0")); GCODES_ITEM(MSG_UBL_MANUAL_MESH, PSTR("G29 I999\nG29 P2 B T0"));
MENU_ITEM(submenu, MSG_UBL_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh); SUBMENU(MSG_UBL_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh);
MENU_ITEM(submenu, MSG_EDIT_MESH, _lcd_ubl_edit_mesh); SUBMENU(MSG_EDIT_MESH, _lcd_ubl_edit_mesh);
MENU_ITEM(submenu, MSG_UBL_MESH_LEVELING, _lcd_ubl_mesh_leveling); SUBMENU(MSG_UBL_MESH_LEVELING, _lcd_ubl_mesh_leveling);
END_MENU(); END_MENU();
} }
@ -582,14 +582,14 @@ void _menu_ubl_tools() {
*/ */
void _lcd_ubl_step_by_step() { void _lcd_ubl_step_by_step() {
START_MENU(); START_MENU();
MENU_BACK(MSG_UBL_LEVEL_BED); BACK_ITEM(MSG_UBL_LEVEL_BED);
MENU_ITEM(gcode, "1 " MSG_UBL_BUILD_COLD_MESH, PSTR("G28\nG29 P1")); GCODES_ITEM("1 " MSG_UBL_BUILD_COLD_MESH, PSTR("G28\nG29 P1"));
MENU_ITEM(gcode, "2 " MSG_UBL_SMART_FILLIN, PSTR("G29 P3 T0")); GCODES_ITEM("2 " MSG_UBL_SMART_FILLIN, PSTR("G29 P3 T0"));
MENU_ITEM(submenu, "3 " MSG_UBL_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh); SUBMENU("3 " MSG_UBL_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh);
MENU_ITEM(gcode, "4 " MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R999 T")); GCODES_ITEM("4 " MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R999 T"));
MENU_ITEM(submenu, "5 " MSG_UBL_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh); SUBMENU("5 " MSG_UBL_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh);
MENU_ITEM(gcode, "6 " MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R999 T")); GCODES_ITEM("6 " MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R999 T"));
MENU_ITEM(function, "7 " MSG_UBL_SAVE_MESH, _lcd_ubl_save_mesh_cmd); ACTION_ITEM("7 " MSG_UBL_SAVE_MESH, _lcd_ubl_save_mesh_cmd);
END_MENU(); END_MENU();
} }
@ -609,19 +609,19 @@ void _lcd_ubl_step_by_step() {
void _lcd_ubl_level_bed() { void _lcd_ubl_level_bed() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MOTION); BACK_ITEM(MSG_MOTION);
if (planner.leveling_active) if (planner.leveling_active)
MENU_ITEM(gcode, MSG_UBL_DEACTIVATE_MESH, PSTR("G29 D")); GCODES_ITEM(MSG_UBL_DEACTIVATE_MESH, PSTR("G29 D"));
else else
MENU_ITEM(gcode, MSG_UBL_ACTIVATE_MESH, PSTR("G29 A")); GCODES_ITEM(MSG_UBL_ACTIVATE_MESH, PSTR("G29 A"));
MENU_ITEM(submenu, MSG_UBL_STEP_BY_STEP_MENU, _lcd_ubl_step_by_step); SUBMENU(MSG_UBL_STEP_BY_STEP_MENU, _lcd_ubl_step_by_step);
MENU_ITEM(function, MSG_UBL_MESH_EDIT, _lcd_ubl_output_map_lcd_cmd); ACTION_ITEM(MSG_UBL_MESH_EDIT, _lcd_ubl_output_map_lcd_cmd);
MENU_ITEM(submenu, MSG_UBL_STORAGE_MESH_MENU, _lcd_ubl_storage_mesh); SUBMENU(MSG_UBL_STORAGE_MESH_MENU, _lcd_ubl_storage_mesh);
MENU_ITEM(submenu, MSG_UBL_OUTPUT_MAP, _lcd_ubl_output_map); SUBMENU(MSG_UBL_OUTPUT_MAP, _lcd_ubl_output_map);
MENU_ITEM(submenu, MSG_UBL_TOOLS, _menu_ubl_tools); SUBMENU(MSG_UBL_TOOLS, _menu_ubl_tools);
MENU_ITEM(gcode, MSG_UBL_INFO_UBL, PSTR("G29 W")); GCODES_ITEM(MSG_UBL_INFO_UBL, PSTR("G29 W"));
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float3, MSG_Z_FADE_HEIGHT, &lcd_z_fade_height, 0, 100, _lcd_set_z_fade_height); EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &lcd_z_fade_height, 0, 100, _lcd_set_z_fade_height);
#endif #endif
END_MENU(); END_MENU();
} }