Skip to content

Commit

Permalink
🐛 Fix M808 starting count
Browse files Browse the repository at this point in the history
Reported by adcurtin on Discord
  • Loading branch information
thinkyhead committed Dec 16, 2022
1 parent 847391c commit 30a885a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/feature/repeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) {
SERIAL_ECHO_MSG("!Too many markers.");
else {
marker[index].sdpos = sdpos;
marker[index].counter = count ?: -1;
marker[index].counter = count ? count - 1 : -1;
index++;
DEBUG_ECHOLNPGM("Add Marker ", index, " at ", sdpos, " (", count, ")");
}
Expand Down

0 comments on commit 30a885a

Please sign in to comment.