♻️ Apply F() to more LCD code (#24228)
This commit is contained in:
committed by
Scott Lahteine
parent
9a74bcd4cf
commit
28f8646aa6
@@ -189,26 +189,26 @@ void Touch::touch(touch_control_t *control) {
|
||||
#if HAS_HOTEND
|
||||
if (heater >= 0) { // HotEnd
|
||||
#if HOTENDS == 1
|
||||
MenuItem_int3::action((const char *)GET_TEXT_F(MSG_NOZZLE), &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.start_watching_hotend(0); });
|
||||
MenuItem_int3::action(GET_TEXT_F(MSG_NOZZLE), &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.start_watching_hotend(0); });
|
||||
#else
|
||||
MenuItemBase::itemIndex = heater;
|
||||
MenuItem_int3::action((const char *)GET_TEXT_F(MSG_NOZZLE_N), &thermalManager.temp_hotend[heater].target, 0, thermalManager.hotend_max_target(heater), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
MenuItem_int3::action(GET_TEXT_F(MSG_NOZZLE_N), &thermalManager.temp_hotend[heater].target, 0, thermalManager.hotend_max_target(heater), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
else if (heater == H_BED) {
|
||||
MenuItem_int3::action((const char *)GET_TEXT_F(MSG_BED), &thermalManager.temp_bed.target, 0, BED_MAX_TARGET, thermalManager.start_watching_bed);
|
||||
MenuItem_int3::action(GET_TEXT_F(MSG_BED), &thermalManager.temp_bed.target, 0, BED_MAX_TARGET, thermalManager.start_watching_bed);
|
||||
}
|
||||
#endif
|
||||
#if HAS_HEATED_CHAMBER
|
||||
else if (heater == H_CHAMBER) {
|
||||
MenuItem_int3::action((const char *)GET_TEXT_F(MSG_CHAMBER), &thermalManager.temp_chamber.target, 0, CHAMBER_MAX_TARGET, thermalManager.start_watching_chamber);
|
||||
MenuItem_int3::action(GET_TEXT_F(MSG_CHAMBER), &thermalManager.temp_chamber.target, 0, CHAMBER_MAX_TARGET, thermalManager.start_watching_chamber);
|
||||
}
|
||||
#endif
|
||||
#if HAS_COOLER
|
||||
else if (heater == H_COOLER) {
|
||||
MenuItem_int3::action((const char *)GET_TEXT_F(MSG_COOLER), &thermalManager.temp_cooler.target, 0, COOLER_MAX_TARGET, thermalManager.start_watching_cooler);
|
||||
MenuItem_int3::action(GET_TEXT_F(MSG_COOLER), &thermalManager.temp_cooler.target, 0, COOLER_MAX_TARGET, thermalManager.start_watching_cooler);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -218,19 +218,19 @@ void Touch::touch(touch_control_t *control) {
|
||||
static uint8_t fan, fan_speed;
|
||||
fan = 0;
|
||||
fan_speed = thermalManager.fan_speed[fan];
|
||||
MenuItem_percent::action((const char *)GET_TEXT_F(MSG_FIRST_FAN_SPEED), &fan_speed, 0, 255, []{ thermalManager.set_fan_speed(fan, fan_speed); });
|
||||
MenuItem_percent::action(GET_TEXT_F(MSG_FIRST_FAN_SPEED), &fan_speed, 0, 255, []{ thermalManager.set_fan_speed(fan, fan_speed); });
|
||||
break;
|
||||
case FEEDRATE:
|
||||
ui.clear_lcd();
|
||||
MenuItem_int3::action((const char *)GET_TEXT_F(MSG_SPEED), &feedrate_percentage, 10, 999);
|
||||
MenuItem_int3::action(GET_TEXT_F(MSG_SPEED), &feedrate_percentage, 10, 999);
|
||||
break;
|
||||
case FLOWRATE:
|
||||
ui.clear_lcd();
|
||||
MenuItemBase::itemIndex = control->data;
|
||||
#if EXTRUDERS == 1
|
||||
MenuItem_int3::action((const char *)GET_TEXT_F(MSG_FLOW), &planner.flow_percentage[MenuItemBase::itemIndex], 10, 999, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
|
||||
MenuItem_int3::action(GET_TEXT_F(MSG_FLOW), &planner.flow_percentage[MenuItemBase::itemIndex], 10, 999, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
|
||||
#else
|
||||
MenuItem_int3::action((const char *)GET_TEXT_F(MSG_FLOW_N), &planner.flow_percentage[MenuItemBase::itemIndex], 10, 999, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
|
||||
MenuItem_int3::action(GET_TEXT_F(MSG_FLOW_N), &planner.flow_percentage[MenuItemBase::itemIndex], 10, 999, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user