Changed speed setting to take opensbp multiple speed rates into account - and only issues a new setting if there are any changes. From the documentation it seems we ought to use VS instead of JS and MS if we don't want the ramp-down-ramp-up procedure involved with FS and MS. Given that Path only changes these settings on a tool change it's probably OK for now.

This commit is contained in:
Markus Lampert
2017-08-17 16:17:45 -07:00
committed by wmayer
parent fd54f7209d
commit 2f1d519a6f

View File

@@ -194,17 +194,25 @@ def move(command):
if 'F' in command.Parameters:
speed = command.Parameters['F']
if speed != CurrentState['F']:
if command.Name in ['G1', 'G01']: # move
movetype = "MS"
else: # jog
movetype = "JS"
zspeed = ""
xyspeed = ""
if 'Z' in axis:
zspeed = "{:f}".format(GetValue(speed))
if ('X' in axis) or ('Y' in axis):
xyspeed = "{:f}".format(GetValue(speed))
if command.Name in ['G1', 'G01']: # move
movetype = "MS"
else: # jog
movetype = "JS"
zspeed = ""
xyspeed = ""
if 'Z' in axis:
speedKey = "{}Z".format(movetype)
speedVal = GetValue(speed)
if CurrentState[speedKey] != speedVal:
CurrentState[speedKey] = speedVal
zspeed = "{:f}".format(speedVal)
if ('X' in axis) or ('Y' in axis):
speedKey = "{}XY".format(movetype)
speedVal = GetValue(speed)
if CurrentState[speedKey] != speedVal:
CurrentState[speedKey] = speedVal
xyspeed = "{:f}".format(speedVal)
if zspeed or xyspeed:
txt += "{},{},{}\n".format(movetype, xyspeed, zspeed)
if command.Name in ['G0', 'G00']: