Open jimmyli97 opened 9 years ago
As a side note, it is impossible to accomplish this for servos because the servos can't send back the actual position (or at least RobotC does not provide a function for it).
For the motors, we could use motorPWMControl, once Robomatter fixes the implementation.
All it takes for a Tetrix motor to burn out is 1-2 seconds, so this period of time should be very short.
This would involve checking to see if encoder is moving a significant amount, when power is above some certain level. If it isn't moving for a specified period of time, the motors should be turned off. If we want to disable braking as well (make it easier for another robot to push us), they should be set to float speed.
Float speed for HT DC motors (where braking is disabled) is -128 (see this link).
See this link for an example implementation - search for "DriveTask" function.