0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-19 08:08:25 +00:00

VOLUMETRIC_EXTRUDER_LIMIT_MAX (#25884)

This commit is contained in:
Giuliano Zaro 2023-08-05 06:56:40 +02:00 committed by GitHub
parent ad112b4d3d
commit 863198a73f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -3805,7 +3805,8 @@
* Use 'M200 [T<extruder>] L<limit>' to override and 'M502' to reset.
* A non-zero value activates Volume-based Extrusion Limiting.
*/
#define DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT 0.00 // (mm^3/sec)
#define DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT 0.00 // (mm^3/sec)
#define VOLUMETRIC_EXTRUDER_LIMIT_MAX 20 // (mm^3/sec)
#endif
#endif

View file

@ -64,10 +64,10 @@
if (parser.seenval('L')) {
// Set volumetric limit (in mm^3/sec)
const float lval = parser.value_float();
if (WITHIN(lval, 0, 20))
if (WITHIN(lval, 0, VOLUMETRIC_EXTRUDER_LIMIT_MAX))
planner.set_volumetric_extruder_limit(target_extruder, lval);
else
SERIAL_ECHOLNPGM("?L value out of range (0-20).");
SERIAL_ECHOLNPGM("?L value out of range (0-" STRINGIFY(VOLUMETRIC_EXTRUDER_LIMIT_MAX) ").");
}
#endif

View file

@ -120,10 +120,10 @@ void menu_backlash();
EDIT_ITEM(bool, MSG_VOLUMETRIC_ENABLED, &parser.volumetric_enabled, planner.calculate_volumetric_multipliers);
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
EDIT_ITEM_FAST(float42_52, MSG_VOLUMETRIC_LIMIT, &planner.volumetric_extruder_limit[active_extruder], 0.0f, 20.0f, planner.calculate_volumetric_extruder_limits);
EDIT_ITEM_FAST(float42_52, MSG_VOLUMETRIC_LIMIT, &planner.volumetric_extruder_limit[active_extruder], 0.0f, float(VOLUMETRIC_EXTRUDER_LIMIT_MAX), planner.calculate_volumetric_extruder_limits);
#if HAS_MULTI_EXTRUDER
EXTRUDER_LOOP()
EDIT_ITEM_FAST_N(float42_52, e, MSG_VOLUMETRIC_LIMIT_E, &planner.volumetric_extruder_limit[e], 0.0f, 20.00f, planner.calculate_volumetric_extruder_limits);
EDIT_ITEM_FAST_N(float42_52, e, MSG_VOLUMETRIC_LIMIT_E, &planner.volumetric_extruder_limit[e], 0.0f, float(VOLUMETRIC_EXTRUDER_LIMIT_MAX), planner.calculate_volumetric_extruder_limits);
#endif
#endif