Skip to content

Commit

Permalink
Made the delay required and not a conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
yai-rosejo authored and ted-miller committed Feb 23, 2024
1 parent f0ba3bc commit 7574bd2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/MotionControl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,6 @@ BOOL Ros_MotionControl_StartMotionMode(MOTION_MODE mode)
MP_START_JOB_SEND_DATA sStartData;
int checkCount;
int grpNo;
bool ecoModeCheck = false;

Ros_Debug_BroadcastMsg("%s: enter", __func__);

Expand Down Expand Up @@ -1449,7 +1448,6 @@ BOOL Ros_MotionControl_StartMotionMode(MOTION_MODE mode)
Ros_Debug_BroadcastMsg("%s: couldn't disable eco mode");
goto updateStatus;
}
ecoModeCheck = true;
}

// servos are off, eco mode is not active any more (if it was), so
Expand Down Expand Up @@ -1542,9 +1540,8 @@ BOOL Ros_MotionControl_StartMotionMode(MOTION_MODE mode)

Ros_Debug_BroadcastMsg("%s: exit", __func__);

//If recovering from eco mode: Give time for the controller to recognize that the INFORM cursor is sitting on
//a WAIT instructions.
if (ecoModeCheck) Ros_Sleep(200);
//Required to allow motion api to work (Potential race condition)
Ros_Sleep(200);

if (Ros_Controller_IsMotionReady())
{
Expand Down

0 comments on commit 7574bd2

Please sign in to comment.