Skip to content

Commit d9d44b8

Browse files
committed
Updated Marlin shapers
1 parent 740aef3 commit d9d44b8

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

InputShaping.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ def getSettingDataString(self):
2121
"type": "enum",
2222
"options": {
2323
"is": "M593 (ZV Input Shaping)",
24-
"ftm": "M493 (Fixed-Time Motion)"
24+
"oldis": "M593 (ZV Input Shaping - Beta)",
25+
"ftm": "M493 (Fixed-Time Motion)",
26+
"oldftm": "M493 (Fixed-Time Motion - Beta)",
27+
"voldftm": "M493 (Fixed-Time Motion - Alpha)"
2528
},
2629
"default_value": "is"
2730
},
@@ -55,13 +58,26 @@ def execute(self, data):
5558
elif line.startswith(';LAYER:'):
5659
layer = float(line.strip(';LAYER:'))
5760
hz = 0 if layer < 2 else start_hz + (end_hz-start_hz) * (layer - 2) / (max_layer-3)
58-
if gc == 'ftm':
59-
if layer == 0:
60-
lines[j] += '\n;TYPE:INPUTSHAPING\nM493 S11 D0 ;Enable ZVD Input Shaping'
61+
if layer == 0:
62+
params = ""
63+
if gc == 'voldftm':
64+
params = "S11"
65+
else if gc == 'oldftm':
66+
params = "S1 X11 Y11"
67+
else if gc == 'ftm':
68+
params = "S1 XY C11"
69+
if params:
70+
lines[j] += '\n;TYPE:INPUTSHAPING\nM493 %s D0 ;Enable ZVD Input Shaping' % params
71+
72+
if gc in ('oldftm','voldftm'):
6173
lines[j] += '\n;TYPE:INPUTSHAPING\nM493 A%f ;(Hz) X Input Shaping Test' % hz
6274
lines[j] += '\nM493 B%f ;(Hz) Y Input Shaping Test' % hz
63-
if gc == 'is':
75+
else if gc == 'ftm':
76+
lines[j] += '\n;TYPE:INPUTSHAPING\nM493 XY A%f ;(Hz) XY Input Shaping Test' % hz
77+
else if gc == 'oldis':
6478
lines[j] += '\n;TYPE:INPUTSHAPING\nM593 F%f ;(Hz) Input Shaping Test' % hz
79+
else if gc == 'is':
80+
lines[j] += '\n;TYPE:INPUTSHAPING\nM593 XY F%f ;(Hz) Input Shaping Test' % hz
6581
data[i] = '\n'.join(lines)
6682

6783
return data

0 commit comments

Comments
 (0)