File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -359,6 +359,7 @@ float Axis::getEncAngle(Encoder *enc){
359359
360360
361361void Axis::emergencyStop (bool reset){
362+ drv->turn (0 ); // Send 0 torque first
362363 drv->emergencyStop (reset);
363364 // drv->stopMotor();
364365 control->emergency = !reset;
Original file line number Diff line number Diff line change @@ -149,11 +149,7 @@ void FFBHIDMain::update(){
149149 // logSerial("Update disabled");
150150 return ;
151151 }
152- if (control.emergency ){
153- pulseClipLed ();
154- pulseErrLed ();
155- return ;
156- }
152+
157153 if (control.resetEncoder ){
158154 control.resetEncoder = false ;
159155 axes_manager->resetPosZero ();
@@ -181,7 +177,12 @@ void FFBHIDMain::update(){
181177 this ->send_report ();
182178 }
183179 }
184- axes_manager->updateTorque ();
180+ if (!control.emergency ){
181+ axes_manager->updateTorque ();
182+
183+ }else {
184+ pulseClipLed ();
185+ }
185186 // debugpin.reset();
186187 vTaskPrioritySet ((TaskHandle_t)defaultTaskHandle,prio); // reset priority
187188 }
You can’t perform that action at this time.
0 commit comments