mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
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:
committed by
Peter Johnson
parent
f2d601d834
commit
0965d60a71
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user