Smarter MIN, MAX, ABS macros
Use macros that explicitly avoid double-evaluation and can be used for any datatype, replacing `min`, `max`, `abs`, `fabs`, `labs`, and `FABS`. Co-Authored-By: ejtagle <ejtagle@hotmail.com>
This commit is contained in:
@@ -47,7 +47,7 @@ void GcodeSuite::M603() {
|
||||
|
||||
// Unload length
|
||||
if (parser.seen('U')) {
|
||||
filament_change_unload_length[target_extruder] = FABS(parser.value_axis_units(E_AXIS));
|
||||
filament_change_unload_length[target_extruder] = ABS(parser.value_axis_units(E_AXIS));
|
||||
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
||||
NOMORE(filament_change_unload_length[target_extruder], EXTRUDE_MAXLENGTH);
|
||||
#endif
|
||||
@@ -55,7 +55,7 @@ void GcodeSuite::M603() {
|
||||
|
||||
// Load length
|
||||
if (parser.seen('L')) {
|
||||
filament_change_load_length[target_extruder] = FABS(parser.value_axis_units(E_AXIS));
|
||||
filament_change_load_length[target_extruder] = ABS(parser.value_axis_units(E_AXIS));
|
||||
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
||||
NOMORE(filament_change_load_length[target_extruder], EXTRUDE_MAXLENGTH);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user