Serial refactor. Default 8-bit ECHO to int, not char (#20985)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
X-Ryl669
2021-02-08 07:37:24 +01:00
committed by GitHub
parent 1e726fe405
commit e7c711996b
72 changed files with 379 additions and 337 deletions

View File

@@ -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 ", int(index), " at ", sdpos, " (", count, ")");
DEBUG_ECHOLNPAIR("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 ", int(index));
DEBUG_ECHOLNPAIR("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 ", int(index), " at ", marker[ind].sdpos, " (", marker[ind].counter, ")");
DEBUG_ECHOLNPAIR("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")");
}
}
}