When using fdm mode with a belt printer and populating the loop count box in the expert section the generated gcode file's M808 L ends up being M808 L-1. So loop count 2 ends up with M808 L1, etc. Originally I assumed this was because the firmware did not consider the first pass a loop count but when implementing and testing this is not the case.
Looking into the background I found https://marlinfw.org/docs/gcode/M808.html. Where the example from the Marling docs calls out that M808 L5 would result in 5 "Hello World" messages, indicating that every loop is counted starting with 1.
Also in the klipper sample macro implementation https://github.com/Klipper3d/klipper/blob/master/config/sample-macros.cfg the logic and the underlying SDCARD_LOOP_BEGIN doc https://www.klipper3d.org/G-Codes.html#sdcard_loop_begin specifically call the L value the count.
The expected behavior is that the M808 L is generated with the entered number in the field.
When using fdm mode with a belt printer and populating the loop count box in the expert section the generated gcode file's M808 L ends up being M808 L-1. So loop count 2 ends up with M808 L1, etc. Originally I assumed this was because the firmware did not consider the first pass a loop count but when implementing and testing this is not the case.
Looking into the background I found https://marlinfw.org/docs/gcode/M808.html. Where the example from the Marling docs calls out that M808 L5 would result in 5 "Hello World" messages, indicating that every loop is counted starting with 1.
Also in the klipper sample macro implementation https://github.com/Klipper3d/klipper/blob/master/config/sample-macros.cfg the logic and the underlying SDCARD_LOOP_BEGIN doc https://www.klipper3d.org/G-Codes.html#sdcard_loop_begin specifically call the L value the count.
The expected behavior is that the M808 L is generated with the entered number in the field.