Proposed Functionality
The robot should not exit a command where it stops at the end until it has actually stopped. We should take this opportunity to set it back into coast mode once it has stopped, to make for easier testing (only activate in a testing mode?). If you think about chaining commands, the fact that the command ends before the robot has actually stopped becomes more of a problem.
Suggested Implementation
In isFinished of a given command, once the condition to start stopping has been met, return the output from a utility function from the DriveTrain subsystem. This utility function should start the stop, and not return true until the robot has actually stopped. This design should allow the command to continue to loop until the robot has actually stopped.
Proposed Functionality
The robot should not exit a command where it stops at the end until it has actually stopped. We should take this opportunity to set it back into coast mode once it has stopped, to make for easier testing (only activate in a testing mode?). If you think about chaining commands, the fact that the command ends before the robot has actually stopped becomes more of a problem.
Suggested Implementation
In isFinished of a given command, once the condition to start stopping has been met, return the output from a utility function from the DriveTrain subsystem. This utility function should start the stop, and not return true until the robot has actually stopped. This design should allow the command to continue to loop until the robot has actually stopped.