@@ -68,22 +68,7 @@ async def test_stallguard(
68
68
except FlexStackerStallError :
69
69
ui .print_info ("Stall Detected" )
70
70
stall_detected = True
71
-
72
- axis_reset = False
73
- while not axis_reset :
74
- try :
75
- # Move the axis off the crash block before re-homing
76
- await stacker .move_axis (
77
- test_axis ,
78
- Direction .EXTEND ,
79
- 20 ,
80
- STACKER_MOTION_CONFIG [test_axis ]["home" ].move_params .max_speed ,
81
- STACKER_MOTION_CONFIG [test_axis ]["home" ].move_params .acceleration ,
82
- STACKER_MOTION_CONFIG [test_axis ]["home" ].run_current ,
83
- )
84
- axis_reset = True
85
- except FlexStackerStallError :
86
- axis_reset = False
71
+ await stacker ._driver .set_stallguard_threshold (test_axis , False , 0 )
87
72
88
73
await stacker .home_axis (test_axis , Direction .EXTEND )
89
74
@@ -134,7 +119,13 @@ async def run(stacker: FlexStacker, report: CSVReport, section: str) -> None:
134
119
test_reset = True
135
120
except FlexStackerStallError :
136
121
# Double check if crash block was actually removed
137
- await stacker .home_axis (StackerAxis .Z , Direction .EXTEND )
138
- await stacker .home_axis (StackerAxis .X , Direction .EXTEND )
122
+ await stacker ._driver .set_stallguard_threshold (StackerAxis .Z , False , 0 )
123
+ await stacker ._driver .set_stallguard_threshold (StackerAxis .X , False , 0 )
124
+ await stacker ._driver .set_stallguard_threshold (
125
+ StackerAxis .Z , True , STALLGUARD_CONFIG [StackerAxis .Z ].threshold
126
+ )
127
+ await stacker ._driver .set_stallguard_threshold (
128
+ StackerAxis .X , True , STALLGUARD_CONFIG [StackerAxis .X ].threshold
129
+ )
139
130
if not stacker .is_simulated :
140
131
ui .get_user_ready ("Remove the crash block from the stacker" )
0 commit comments