Skip to content

Commit

Permalink
Temp fix for wrist dropping issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-amal committed Jul 4, 2024
1 parent 365fbb8 commit 4ac280a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pages/operator/tsx/function_providers/FunctionProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ export abstract class FunctionProvider {
}, 150);
}

public stopCurrentAction() {
FunctionProvider.remoteRobot?.stopTrajectory();
public stopCurrentAction(send_stop_command: boolean = false) {
if (send_stop_command) FunctionProvider.remoteRobot?.stopTrajectory();
if (this.activeVelocityAction) {
// No matter what region this is, stop the currently running action
this.activeVelocityAction.stop();
// TODO: this.activeVelocityAction.stop sometimes (always?) executes the
// exact same cancellation command(s) as FunctionProvider.remoteRobot?.stopTrajectory,
// which means we are unnecessarily calling it twice.
if (send_stop_command) this.activeVelocityAction.stop();
this.activeVelocityAction = undefined;
}
if (this.velocityExecutionHeartbeat) {
Expand Down

0 comments on commit 4ac280a

Please sign in to comment.