Fixed a bug where using the two parameter constructor for CANTalon could cause invert-direction to not be initialized. (#26)

Original fix from Jacob Caporuscio
This commit is contained in:
Omar Zrien
2016-05-21 02:08:35 -04:00
committed by Peter Johnson
parent f2d601d834
commit 0965d60a71
2 changed files with 5 additions and 2 deletions

View File

@@ -573,7 +573,11 @@ class CANTalon : public MotorSafety,
// LiveWindow stuff.
std::shared_ptr<ITable> m_table;
bool m_isInverted;
/**
* Flips the output direction during open-loop modes like percent
* voltage, or certain closed loop modes like speed/current mode.
*/
bool m_isInverted = false;
HasBeenMoved m_hasBeenMoved;
};

View File

@@ -38,7 +38,6 @@ CANTalon::CANTalon(int deviceNumber)
m_safetyHelper(new MotorSafetyHelper(this)) {
ApplyControlMode(m_controlMode);
m_impl->SetProfileSlotSelect(m_profile);
m_isInverted = false;
LiveWindow::GetInstance()->AddActuator("CANTalon", m_deviceNumber, this);
}
/**