mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Fix cancel of inner commands in ConditionalCommands (#858)
This commit is contained in:
committed by
Peter Johnson
parent
0e8ff4663d
commit
e4e1eab413
@@ -9,6 +9,10 @@
|
||||
|
||||
using namespace frc;
|
||||
|
||||
MockCommand::MockCommand(Subsystem* subsys) : MockCommand() {
|
||||
Requires(subsys);
|
||||
}
|
||||
|
||||
MockCommand::MockCommand() {
|
||||
m_initializeCount = 0;
|
||||
m_executeCount = 0;
|
||||
@@ -36,3 +40,12 @@ bool MockCommand::IsFinished() {
|
||||
void MockCommand::End() { ++m_endCount; }
|
||||
|
||||
void MockCommand::Interrupted() { ++m_interruptedCount; }
|
||||
|
||||
void MockCommand::ResetCounters() {
|
||||
m_initializeCount = 0;
|
||||
m_executeCount = 0;
|
||||
m_isFinishedCount = 0;
|
||||
m_hasFinished = false;
|
||||
m_endCount = 0;
|
||||
m_interruptedCount = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user