🔧 Configurable FR/Flow edit ranges (#26446)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
fd3de02a37
commit
bd872a7a98
|
@ -1254,7 +1254,7 @@
|
||||||
*/
|
*/
|
||||||
//#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>.
|
//#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>.
|
||||||
#ifdef XY_FREQUENCY_LIMIT
|
#ifdef XY_FREQUENCY_LIMIT
|
||||||
#define XY_FREQUENCY_MIN_PERCENT 5 // (percent) Minimum FR percentage to apply. Set with M201 G<min%>.
|
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 G<min%>.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1625,6 +1625,15 @@
|
||||||
|
|
||||||
#endif // HAS_DISPLAY
|
#endif // HAS_DISPLAY
|
||||||
|
|
||||||
|
#if HAS_FEEDRATE_EDIT
|
||||||
|
#define SPEED_EDIT_MIN 10 // (%) Feedrate percentage edit range minimum
|
||||||
|
#define SPEED_EDIT_MAX 999 // (%) Feedrate percentage edit range maximum
|
||||||
|
#endif
|
||||||
|
#if HAS_FLOW_EDIT
|
||||||
|
#define FLOW_EDIT_MIN 10 // (%) Flow percentage edit range minimum
|
||||||
|
#define FLOW_EDIT_MAX 999 // (%) Flow percentage edit range maximum
|
||||||
|
#endif
|
||||||
|
|
||||||
// Add 'M73' to set print job progress, overrides Marlin's built-in estimate
|
// Add 'M73' to set print job progress, overrides Marlin's built-in estimate
|
||||||
//#define SET_PROGRESS_MANUALLY
|
//#define SET_PROGRESS_MANUALLY
|
||||||
#if ENABLED(SET_PROGRESS_MANUALLY)
|
#if ENABLED(SET_PROGRESS_MANUALLY)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -97,10 +97,6 @@
|
||||||
#define MENU_CHAR_LIMIT 24
|
#define MENU_CHAR_LIMIT 24
|
||||||
#define STATUS_Y 354
|
#define STATUS_Y 354
|
||||||
|
|
||||||
// Print speed limit
|
|
||||||
#define MIN_PRINT_SPEED 10
|
|
||||||
#define MAX_PRINT_SPEED 999
|
|
||||||
|
|
||||||
#define FEEDRATE_E (60)
|
#define FEEDRATE_E (60)
|
||||||
|
|
||||||
// Minimum unit (0.1) : multiple (10)
|
// Minimum unit (0.1) : multiple (10)
|
||||||
|
@ -1559,7 +1555,7 @@ void hmiPrintSpeed() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// printSpeed limit
|
// printSpeed limit
|
||||||
LIMIT(hmiValues.printSpeed, MIN_PRINT_SPEED, MAX_PRINT_SPEED);
|
LIMIT(hmiValues.printSpeed, SPEED_EDIT_MIN, SPEED_EDIT_MAX);
|
||||||
// printSpeed value
|
// printSpeed value
|
||||||
drawEditInteger3(select_tune.now + MROWS - index_tune, hmiValues.printSpeed, true);
|
drawEditInteger3(select_tune.now + MROWS - index_tune, hmiValues.printSpeed, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,16 +135,14 @@
|
||||||
|
|
||||||
#define PAUSE_HEAT
|
#define PAUSE_HEAT
|
||||||
|
|
||||||
// Print speed limit
|
|
||||||
#define MIN_PRINT_SPEED 10
|
|
||||||
#define MAX_PRINT_SPEED 999
|
|
||||||
|
|
||||||
// Print flow limit
|
|
||||||
#define MIN_PRINT_FLOW 10
|
|
||||||
#define MAX_PRINT_FLOW 299
|
|
||||||
|
|
||||||
// Load and Unload limits
|
// Load and Unload limits
|
||||||
#define MAX_LOAD_UNLOAD 500
|
#ifndef EXTRUDE_MAXLENGTH
|
||||||
|
#ifdef FILAMENT_CHANGE_UNLOAD_LENGTH
|
||||||
|
#define EXTRUDE_MAXLENGTH (FILAMENT_CHANGE_UNLOAD_LENGTH + 10)
|
||||||
|
#else
|
||||||
|
#define EXTRUDE_MAXLENGTH 500
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Juntion deviation limits
|
// Juntion deviation limits
|
||||||
#define MIN_JD_MM 0.001
|
#define MIN_JD_MM 0.001
|
||||||
|
@ -2254,8 +2252,8 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
void setFilLoad() { setPFloatOnClick(0, MAX_LOAD_UNLOAD, UNITFDIGITS); }
|
void setFilLoad() { setPFloatOnClick(0, EXTRUDE_MAXLENGTH, UNITFDIGITS); }
|
||||||
void setFilUnload() { setPFloatOnClick(0, MAX_LOAD_UNLOAD, UNITFDIGITS); }
|
void setFilUnload() { setPFloatOnClick(0, EXTRUDE_MAXLENGTH, UNITFDIGITS); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||||
|
@ -2263,7 +2261,7 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS,
|
||||||
void setExtMinT() { setPIntOnClick(MIN_ETEMP, MAX_ETEMP, applyExtMinT); }
|
void setExtMinT() { setPIntOnClick(MIN_ETEMP, MAX_ETEMP, applyExtMinT); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void setSpeed() { setPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); }
|
void setSpeed() { setPIntOnClick(SPEED_EDIT_MIN, SPEED_EDIT_MAX); }
|
||||||
|
|
||||||
#if HAS_HOTEND
|
#if HAS_HOTEND
|
||||||
void applyHotendTemp() { thermalManager.setTargetHotend(menuData.value, 0); }
|
void applyHotendTemp() { thermalManager.setTargetHotend(menuData.value, 0); }
|
||||||
|
@ -2308,7 +2306,7 @@ void setSpeed() { setPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); }
|
||||||
|
|
||||||
#endif // ADVANCED_PAUSE_FEATURE
|
#endif // ADVANCED_PAUSE_FEATURE
|
||||||
|
|
||||||
void setFlow() { setPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, []{ planner.refresh_e_factor(0); }); }
|
void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refresh_e_factor(0); }); }
|
||||||
|
|
||||||
// Bed Tramming
|
// Bed Tramming
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ void process_lcd_c_command(const char *command) {
|
||||||
case 'C': // Cope with both V1 early rev and later LCDs.
|
case 'C': // Cope with both V1 early rev and later LCDs.
|
||||||
case 'S':
|
case 'S':
|
||||||
feedrate_percentage = target_val * 10;
|
feedrate_percentage = target_val * 10;
|
||||||
LIMIT(feedrate_percentage, 10, 999);
|
LIMIT(feedrate_percentage, SPEED_EDIT_MIN, SPEED_EDIT_MAX);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'T':
|
case 'T':
|
||||||
|
|
|
@ -695,7 +695,7 @@ void MarlinUI::init() {
|
||||||
else if ((old_frm < 100 && new_frm > 100) || (old_frm > 100 && new_frm < 100))
|
else if ((old_frm < 100 && new_frm > 100) || (old_frm > 100 && new_frm < 100))
|
||||||
new_frm = 100;
|
new_frm = 100;
|
||||||
|
|
||||||
LIMIT(new_frm, 10, 999);
|
LIMIT(new_frm, SPEED_EDIT_MIN, SPEED_EDIT_MAX);
|
||||||
|
|
||||||
if (old_frm != new_frm) {
|
if (old_frm != new_frm) {
|
||||||
feedrate_percentage = new_frm;
|
feedrate_percentage = new_frm;
|
||||||
|
|
|
@ -264,9 +264,9 @@ class MenuItem_bool : public MenuEditItemBase {
|
||||||
* MenuItem_function::action(flabel, lcd_sdcard_pause)
|
* MenuItem_function::action(flabel, lcd_sdcard_pause)
|
||||||
* MenuItem_function::draw(sel, row, flabel, lcd_sdcard_pause)
|
* MenuItem_function::draw(sel, row, flabel, lcd_sdcard_pause)
|
||||||
*
|
*
|
||||||
* EDIT_ITEM(int3, MSG_SPEED, &feedrate_percentage, 10, 999)
|
* EDIT_ITEM(int3, MSG_SPEED, &feedrate_percentage, SPEED_EDIT_MIN, SPEED_EDIT_MAX)
|
||||||
* MenuItem_int3::action(flabel, &feedrate_percentage, 10, 999)
|
* MenuItem_int3::action(flabel, &feedrate_percentage, SPEED_EDIT_MIN, SPEED_EDIT_MAX)
|
||||||
* MenuItem_int3::draw(sel, row, flabel, &feedrate_percentage, 10, 999)
|
* MenuItem_int3::draw(sel, row, flabel, &feedrate_percentage, SPEED_EDIT_MIN, SPEED_EDIT_MAX)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ENABLED(ENCODER_RATE_MULTIPLIER)
|
#if ENABLED(ENCODER_RATE_MULTIPLIER)
|
||||||
|
|
|
@ -114,7 +114,7 @@ void menu_tune() {
|
||||||
//
|
//
|
||||||
// Speed:
|
// Speed:
|
||||||
//
|
//
|
||||||
EDIT_ITEM(int3, MSG_SPEED, &feedrate_percentage, 10, 999);
|
EDIT_ITEM(int3, MSG_SPEED, &feedrate_percentage, SPEED_EDIT_MIN, SPEED_EDIT_MAX);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Manual bed leveling, Bed Z:
|
// Manual bed leveling, Bed Z:
|
||||||
|
@ -198,11 +198,11 @@ void menu_tune() {
|
||||||
// Flow:
|
// Flow:
|
||||||
//
|
//
|
||||||
#if HAS_EXTRUDERS
|
#if HAS_EXTRUDERS
|
||||||
EDIT_ITEM(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, []{ planner.refresh_e_factor(active_extruder); });
|
EDIT_ITEM(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refresh_e_factor(active_extruder); });
|
||||||
// Flow En:
|
// Flow En:
|
||||||
#if HAS_MULTI_EXTRUDER
|
#if HAS_MULTI_EXTRUDER
|
||||||
EXTRUDER_LOOP()
|
EXTRUDER_LOOP()
|
||||||
EDIT_ITEM_N(int3, e, MSG_FLOW_N, &planner.flow_percentage[e], 10, 999, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
|
EDIT_ITEM_N(int3, e, MSG_FLOW_N, &planner.flow_percentage[e], FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ void Touch::touch(touch_control_t *control) {
|
||||||
break;
|
break;
|
||||||
case FEEDRATE:
|
case FEEDRATE:
|
||||||
ui.clear_lcd();
|
ui.clear_lcd();
|
||||||
MenuItem_int3::action(GET_TEXT_F(MSG_SPEED), &feedrate_percentage, 10, 999);
|
MenuItem_int3::action(GET_TEXT_F(MSG_SPEED), &feedrate_percentage, SPEED_EDIT_MIN, SPEED_EDIT_MAX);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if HAS_EXTRUDERS
|
#if HAS_EXTRUDERS
|
||||||
|
@ -228,9 +228,9 @@ void Touch::touch(touch_control_t *control) {
|
||||||
ui.clear_lcd();
|
ui.clear_lcd();
|
||||||
MenuItemBase::itemIndex = control->data;
|
MenuItemBase::itemIndex = control->data;
|
||||||
#if EXTRUDERS == 1
|
#if EXTRUDERS == 1
|
||||||
MenuItem_int3::action(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], FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
|
||||||
#else
|
#else
|
||||||
MenuItem_int3::action(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], FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue