Skip to content

Commit 30a885a

Browse files
committed
🐛 Fix M808 starting count
Reported by adcurtin on Discord
1 parent 847391c commit 30a885a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Marlin/src/feature/repeat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) {
4242
SERIAL_ECHO_MSG("!Too many markers.");
4343
else {
4444
marker[index].sdpos = sdpos;
45-
marker[index].counter = count ?: -1;
45+
marker[index].counter = count ? count - 1 : -1;
4646
index++;
4747
DEBUG_ECHOLNPGM("Add Marker ", index, " at ", sdpos, " (", count, ")");
4848
}

0 commit comments

Comments
 (0)