🎨 Fewer serial macros
This commit is contained in:
@@ -43,7 +43,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) {
|
||||
marker[index].sdpos = sdpos;
|
||||
marker[index].counter = count ?: -1;
|
||||
index++;
|
||||
DEBUG_ECHOLNPAIR("Add Marker ", index, " at ", sdpos, " (", count, ")");
|
||||
DEBUG_ECHOLNPGM("Add Marker ", index, " at ", sdpos, " (", count, ")");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,14 +53,14 @@ void Repeat::loop() {
|
||||
else {
|
||||
const uint8_t ind = index - 1; // Active marker's index
|
||||
if (!marker[ind].counter) { // Did its counter run out?
|
||||
DEBUG_ECHOLNPAIR("Pass Marker ", index);
|
||||
DEBUG_ECHOLNPGM("Pass Marker ", index);
|
||||
index--; // Carry on. Previous marker on the next 'M808'.
|
||||
}
|
||||
else {
|
||||
card.setIndex(marker[ind].sdpos); // Loop back to the marker.
|
||||
if (marker[ind].counter > 0) // Ignore a negative (or zero) counter.
|
||||
--marker[ind].counter; // Decrement the counter. If zero this 'M808' will be skipped next time.
|
||||
DEBUG_ECHOLNPAIR("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")");
|
||||
DEBUG_ECHOLNPGM("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ void Repeat::cancel() { LOOP_L_N(i, index) marker[i].counter = 0; }
|
||||
|
||||
void Repeat::early_parse_M808(char * const cmd) {
|
||||
if (is_command_M808(cmd)) {
|
||||
DEBUG_ECHOLNPAIR("Parsing \"", cmd, "\"");
|
||||
DEBUG_ECHOLNPGM("Parsing \"", cmd, "\"");
|
||||
parser.parse(cmd);
|
||||
if (parser.seen('L'))
|
||||
add_marker(card.getIndex(), parser.value_ushort());
|
||||
|
||||
Reference in New Issue
Block a user