Fix cancel of inner commands in ConditionalCommands (#858)

This commit is contained in:
sciencewhiz
2018-01-18 20:04:33 -08:00
committed by Peter Johnson
parent 0e8ff4663d
commit e4e1eab413
15 changed files with 901 additions and 30 deletions

View File

@@ -62,6 +62,8 @@ class Command : public ErrorBase, public SendableBase {
bool Run();
void Cancel();
bool IsRunning() const;
bool IsInitialized() const;
bool IsCompleted() const;
bool IsInterruptible() const;
void SetInterruptible(bool interruptible);
bool DoesRequire(Subsystem* subsystem) const;
@@ -148,6 +150,9 @@ class Command : public ErrorBase, public SendableBase {
// The CommandGroup this is in
CommandGroup* m_parent = nullptr;
// Whether or not this command has completed running
bool m_completed = false;
int m_commandID = m_commandCounter++;
static int m_commandCounter;