[command] RamseteCommand: Output 0 if interrupted (#3216)

This commit is contained in:
Starlight220
2021-03-01 08:06:34 +02:00
committed by GitHub
parent 3cf44e0a53
commit 435bbb6a8c
2 changed files with 12 additions and 0 deletions

View File

@@ -146,6 +146,14 @@ void RamseteCommand::Execute() {
void RamseteCommand::End(bool interrupted) {
m_timer.Stop();
if (interrupted) {
if (m_usePID) {
m_outputVolts(0_V, 0_V);
} else {
m_outputVel(0_mps, 0_mps);
}
}
}
bool RamseteCommand::IsFinished() {