fix typo, add comments before notes

This commit is contained in:
v 2024-12-23 21:28:55 +01:00
parent 95f7114635
commit 3e25aa543b

View file

@ -49,8 +49,9 @@ with open(args.output, "w") as f:
position += -length if position > 100 else length
if position < 0 or position > 200:
sys.exit("does not fit in 200x200")
f.write(f"; {pitch},{duration},{pause}\n")
f.write(f"G0 X{position:.6f} Y{position:.6f} F{feedrate}\n")
if pause != 1:
if pause != -1:
pause_ms = int(pause * base_duration)
f.write(f"G4 P{pause_ms}\n")
f.write("G4 S2 ; wait 2 seconds\n")