0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-31 14:12:52 +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

@ -3806,6 +3806,7 @@
* A non-zero value activates Volume-based Extrusion Limiting. * 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
#endif #endif

View file

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

View file

@ -120,10 +120,10 @@ void menu_backlash();
EDIT_ITEM(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 ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) #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 #if HAS_MULTI_EXTRUDER
EXTRUDER_LOOP() 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
#endif #endif