Add an additional member variable for "stopped" which indicates the CAN motor controller has been explicitly stopped, but not disabled by the user (main use case is MotorSafety tripping). When Set() is called the next time the controller will be re-enabled automatically.

Change-Id: Ib1c0e5d0ddd55343d83039acbc46c0f9c4e451a1
This commit is contained in:
Kevin O'Connor
2016-02-08 18:13:57 -05:00
parent f17d27aacf
commit d567bd0bca
6 changed files with 39 additions and 10 deletions

View File

@@ -230,6 +230,7 @@ class CANJaguar : public MotorSafety,
mutable std::atomic<bool> m_receivedStatusMessage2{false};
bool m_controlEnabled = false;
bool m_stopped = false;
void verify();

View File

@@ -437,6 +437,7 @@ class CANTalon : public MotorSafety,
// actually test this.
bool m_controlEnabled = true;
bool m_stopped = false;
ControlMode m_controlMode = kPercentVbus;
TalonControlMode m_sendMode;