fix typo, add comments before notes
This commit is contained in:
parent
95f7114635
commit
3e25aa543b
|
|
@ -49,8 +49,9 @@ with open(args.output, "w") as f:
|
||||||
position += -length if position > 100 else length
|
position += -length if position > 100 else length
|
||||||
if position < 0 or position > 200:
|
if position < 0 or position > 200:
|
||||||
sys.exit("does not fit in 200x200")
|
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")
|
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)
|
pause_ms = int(pause * base_duration)
|
||||||
f.write(f"G4 P{pause_ms}\n")
|
f.write(f"G4 P{pause_ms}\n")
|
||||||
f.write("G4 S2 ; wait 2 seconds\n")
|
f.write("G4 S2 ; wait 2 seconds\n")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue