diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index bcb180f481f1..05640bce8740 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -204,10 +204,8 @@ #define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1' #define ___TERN(P,V...) THIRD(P,V) // If first argument has a comma, A. Else B. -#define _OPTARG(A) , A -#define _OPTARGS(A...) , A -#define OPTARG(O,A) TERN_(O,DEFER4(_OPTARG)(A)) -#define OPTARGS(O,A...) TERN_(O,DEFER4(_OPTARGS)(A)) +#define _OPTARG(A...) , A +#define OPTARG(O,A...) TERN_(O,DEFER4(_OPTARG)(A)) #define _OPTCODE(A) A; #define OPTCODE(O,A) TERN_(O,DEFER4(_OPTCODE)(A)) diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 686996202840..50f3419c8960 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -314,11 +314,13 @@ void GcodeSuite::G34() { sprintf_P(msg, PSTR("1:2=%s" TERN_(TRIPLE_Z, " 3-2=%s 3-1=%s") TERN_(QUAD_Z, " 4-3=%s 4-2=%s 4-1=%s")), dtostrf(ABS(z_measured[1] - z_measured[0]), 1, 3, fstr1) - OPTARG(TRIPLE_Z, dtostrf(ABS(z_measured[2] - z_measured[1]), 1, 3, fstr2)) - OPTARG(TRIPLE_Z, dtostrf(ABS(z_measured[2] - z_measured[0]), 1, 3, fstr3)) - OPTARG(QUAD_Z, dtostrf(ABS(z_measured[3] - z_measured[2]), 1, 3, fstr4)) - OPTARG(QUAD_Z, dtostrf(ABS(z_measured[3] - z_measured[1]), 1, 3, fstr5)) - OPTARG(QUAD_Z, dtostrf(ABS(z_measured[3] - z_measured[0]), 1, 3, fstr6)) + OPTARG(TRIPLE_Z, + dtostrf(ABS(z_measured[2] - z_measured[1]), 1, 3, fstr2), + dtostrf(ABS(z_measured[2] - z_measured[0]), 1, 3, fstr3)) + OPTARG(QUAD_Z, + dtostrf(ABS(z_measured[3] - z_measured[2]), 1, 3, fstr4), + dtostrf(ABS(z_measured[3] - z_measured[1]), 1, 3, fstr5), + dtostrf(ABS(z_measured[3] - z_measured[0]), 1, 3, fstr6)) ); ui.set_status(msg); #endif diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 63fdd5afc3db..eb6dc6597ce4 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -703,8 +703,7 @@ void restore_feedrate_and_scaling() { * at the same positions relative to the machine. */ void update_software_endstops(const AxisEnum axis - OPTARG(HAS_HOTEND_OFFSET, const uint8_t old_tool_index/*=0*/) - OPTARG(HAS_HOTEND_OFFSET, const uint8_t new_tool_index/*=0*/) + OPTARG(HAS_HOTEND_OFFSET, const uint8_t old_tool_index/*=0*/, const uint8_t new_tool_index/*=0*/) ) { #if ENABLED(DUAL_X_CARRIAGE) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 5ffb80fd20b4..b6e739296eb7 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -205,10 +205,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, MAX##M max##M##_##n = MAX##M( \ TEMP_##n##_CS_PIN \ OPTARG(_MAX31865_##n##_SW, TEMP_##n##_MOSI_PIN) \ - OPTARGS(TEMP_SENSOR_##n##_USES_SW_SPI, \ - TEMP_##n##_MISO_PIN, \ - TEMP_##n##_SCK_PIN \ - ) \ + OPTARG(TEMP_SENSOR_##n##_USES_SW_SPI, TEMP_##n##_MISO_PIN, TEMP_##n##_SCK_PIN) \ OPTARG(LARGE_PINMAP, HIGH) \ )