Thu, 30 May 2019 18:10:01 +0200
dont know what i have done
tools/axis_speedtest.py | file | annotate | diff | comparison | revisions |
--- a/tools/axis_speedtest.py Sun Sep 09 00:21:30 2018 +0200 +++ b/tools/axis_speedtest.py Thu May 30 18:10:01 2019 +0200 @@ -2,23 +2,23 @@ def gen_speedtest(args): fd = open(args.file, 'wb') - - if args.axis.lowercase() == 'x': + axis = args.axis.upper() + if axis == 'X': pos = [0, args.dx] - print(fd, "G0 y%i F%i" % ( + fd.write("G0 Y%.2f F%i\n" % ( args.dy / 2, args.min * 60)) else: pos = [0, args.dy] - print(fd, "G0 x%i F%i" % ( + fd.write("G0 X%.2f F%i\n" % ( args.dx / 2, args.min * 60)) - loops = (args.max - args.min) / args.increment + loops = (args.max - args.min) / args.inc speed = args.min for loop in range(loops): - print(fd, "G0 %s%i F%i" % ( - args.axis, pos[0], speed * 60)) - print(fd, "G0 %s%i F%i" % ( - args.axis, pos[1], speed * 60)) + fd.write("G0 %s%.2f F%i\n" % ( + axis, pos[0], speed * 60)) + fd.write("G0 %s%.2f F%i\n" % ( + axis, pos[1], speed * 60)) speed += args.inc @@ -33,7 +33,7 @@ parser.add_argument("--max", type=int, default=200, help="Maximum speed mm/s (200)") parser.add_argument("--dx", type=int, default=200, help="Maximum X dimension (200)") parser.add_argument("--dy", type=int, default=200, help="Maximum Y dimension (200)") - parser.add_argument("--inc", type=int, default=10, help="Speed increment after each line") + parser.add_argument("--inc", type=int, default=20, help="Speed increment after each line") args = parser.parse_args()