🧑‍💻 EXTRUDER_LOOP macro

This commit is contained in:
Scott Lahteine
2022-03-22 22:22:08 -05:00
committed by Scott Lahteine
parent b094a3fc0d
commit 4a8b99d505
15 changed files with 62 additions and 61 deletions

View File

@ -117,10 +117,10 @@ void GcodeSuite::M900() {
#if EXTRUDERS < 2
SERIAL_ECHOLNPGM("Advance S", new_slot, " K", kref, "(S", !new_slot, " K", lref, ")");
#else
LOOP_L_N(i, EXTRUDERS) {
const bool slot = TEST(lin_adv_slot, i);
SERIAL_ECHOLNPGM("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i],
"(S", !slot, " K", other_extruder_advance_K[i], ")");
EXTRUDER_LOOP() {
const bool slot = TEST(lin_adv_slot, e);
SERIAL_ECHOLNPGM("Advance T", e, " S", slot, " K", planner.extruder_advance_K[e],
"(S", !slot, " K", other_extruder_advance_K[e], ")");
SERIAL_EOL();
}
#endif
@ -132,9 +132,9 @@ void GcodeSuite::M900() {
SERIAL_ECHOLNPGM("Advance K=", planner.extruder_advance_K[0]);
#else
SERIAL_ECHOPGM("Advance K");
LOOP_L_N(i, EXTRUDERS) {
SERIAL_CHAR(' ', '0' + i, ':');
SERIAL_DECIMAL(planner.extruder_advance_K[i]);
EXTRUDER_LOOP() {
SERIAL_CHAR(' ', '0' + e, ':');
SERIAL_DECIMAL(planner.extruder_advance_K[e]);
}
SERIAL_EOL();
#endif
@ -150,9 +150,9 @@ void GcodeSuite::M900_report(const bool forReplay/*=true*/) {
report_echo_start(forReplay);
SERIAL_ECHOLNPGM(" M900 K", planner.extruder_advance_K[0]);
#else
LOOP_L_N(i, EXTRUDERS) {
EXTRUDER_LOOP() {
report_echo_start(forReplay);
SERIAL_ECHOLNPGM(" M900 T", i, " K", planner.extruder_advance_K[i]);
SERIAL_ECHOLNPGM(" M900 T", e, " K", planner.extruder_advance_K[e]);
}
#endif
}

View File

@ -72,7 +72,7 @@ void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
SERIAL_ECHOPGM(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;");
say_units();
#else
LOOP_L_N(e, EXTRUDERS) {
EXTRUDER_LOOP() {
report_echo_start(forReplay);
SERIAL_ECHOPGM(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;");
say_units();