Apply loop shorthand macros (#17159)
This commit is contained in:
@ -49,7 +49,7 @@ void GcodeSuite::M111() {
|
||||
SERIAL_ECHOPGM(STR_DEBUG_PREFIX);
|
||||
if (marlin_debug_flags) {
|
||||
uint8_t comma = 0;
|
||||
for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
|
||||
LOOP_L_N(i, COUNT(debug_strings)) {
|
||||
if (TEST(marlin_debug_flags, i)) {
|
||||
if (comma++) SERIAL_CHAR(',');
|
||||
serialprintPGM((char*)pgm_read_ptr(&debug_strings[i]));
|
||||
|
@ -33,7 +33,7 @@
|
||||
* Warning: Steps-per-unit remains unchanged.
|
||||
*/
|
||||
void GcodeSuite::M350() {
|
||||
if (parser.seen('S')) for (uint8_t i = 0; i <= 4; i++) stepper.microstep_mode(i, parser.value_byte());
|
||||
if (parser.seen('S')) LOOP_LE_N(i, 4) stepper.microstep_mode(i, parser.value_byte());
|
||||
LOOP_XYZE(i) if (parser.seen(axis_codes[i])) stepper.microstep_mode(i, parser.value_byte());
|
||||
if (parser.seen('B')) stepper.microstep_mode(4, parser.value_byte());
|
||||
stepper.microstep_readings();
|
||||
|
Reference in New Issue
Block a user