mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] ElevatorSim: Fix WouldHitLimit methods (#5057)
This commit is contained in:
@@ -41,11 +41,11 @@ ElevatorSim::ElevatorSim(const DCMotor& gearbox, double gearing,
|
||||
m_simulateGravity(simulateGravity) {}
|
||||
|
||||
bool ElevatorSim::WouldHitLowerLimit(units::meter_t elevatorHeight) const {
|
||||
return elevatorHeight < m_minHeight;
|
||||
return elevatorHeight <= m_minHeight;
|
||||
}
|
||||
|
||||
bool ElevatorSim::WouldHitUpperLimit(units::meter_t elevatorHeight) const {
|
||||
return elevatorHeight > m_maxHeight;
|
||||
return elevatorHeight >= m_maxHeight;
|
||||
}
|
||||
|
||||
bool ElevatorSim::HasHitLowerLimit() const {
|
||||
|
||||
Reference in New Issue
Block a user