mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpilib] Fixup wouldHitLowerLimit in elevator and arm simulation classes. (#3076)
Closes #3050.
This commit is contained in:
@@ -57,21 +57,35 @@ class ElevatorSim : public LinearSystemSim<2, 1, 1> {
|
||||
units::meter_t minHeight, units::meter_t maxHeight,
|
||||
const std::array<double, 1>& measurementStdDevs = {0.0});
|
||||
|
||||
/**
|
||||
* Returns whether the elevator would hit the lower limit.
|
||||
*
|
||||
* @param elevatorHeight The elevator height.
|
||||
* @return Whether the elevator would hit the lower limit.
|
||||
*/
|
||||
bool WouldHitLowerLimit(units::meter_t elevatorHeight) const;
|
||||
|
||||
/**
|
||||
* Returns whether the elevator would hit the upper limit.
|
||||
*
|
||||
* @param elevatorHeight The elevator height.
|
||||
* @return Whether the elevator would hit the upper limit.
|
||||
*/
|
||||
bool WouldHitUpperLimit(units::meter_t elevatorHeight) const;
|
||||
|
||||
/**
|
||||
* Returns whether the elevator has hit the lower limit.
|
||||
*
|
||||
* @param x The current elevator state.
|
||||
* @return Whether the elevator has hit the lower limit.
|
||||
*/
|
||||
bool HasHitLowerLimit(const Eigen::Matrix<double, 2, 1>& x) const;
|
||||
bool HasHitLowerLimit() const;
|
||||
|
||||
/**
|
||||
* Returns whether the elevator has hit the upper limit.
|
||||
*
|
||||
* @param x The current elevator state.
|
||||
* @return Whether the elevator has hit the upper limit.
|
||||
*/
|
||||
bool HasHitUpperLimit(const Eigen::Matrix<double, 2, 1>& x) const;
|
||||
bool HasHitUpperLimit() const;
|
||||
|
||||
/**
|
||||
* Returns the position of the elevator.
|
||||
|
||||
Reference in New Issue
Block a user