SpinFor Timeout or Abort

We sometimes experience an auton getting stuck in a SpinFor that never reaches its target position. Is there a way to set a timeout or a way to abort the operation and continue the next command?

for a motor,

/** 
 * @brief Sets the timeout for the motor. If the motor does not reach its commanded position prior to the completion of the timeout, the motor will stop.
 * @param time Sets the amount of time.
 * @param units The measurement unit for the time value.
 */
void setTimeout( int32_t time, timeUnits units );

similar API for drivetrain

5 Likes

Well, that was easy! Can’t believe we missed that method. :wink:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.