11#include <units/angle.h>
15namespace hardware::core {
class CoreCANcoder; }
16namespace hardware::core {
class CoreCANdi; }
17namespace hardware::core {
class CoreCANrange; }
18namespace hardware::traits {
class CommonTalon; }
Configs that change how the motor controller behaves under different limit switch states.
Definition HardwareLimitSwitchConfigs.hpp:30
std::string Serialize() const final
std::string ToString() const override
HardwareLimitSwitchConfigs & WithForwardLimitRemoteCANrange(const hardware::core::CoreCANrange &device)
Helper method to configure this feedback group to use the RemoteCANrange by passing in the CANrange o...
HardwareLimitSwitchConfigs & WithReverseLimitRemoteTalonFX(const hardware::traits::CommonTalon &device)
Helper method to configure this feedback group to use RemoteTalonFX reverse limit switch by passing i...
signals::ForwardLimitTypeValue ForwardLimitType
Determines if the forward limit switch is normally-open (default) or normally-closed.
Definition HardwareLimitSwitchConfigs.hpp:39
constexpr HardwareLimitSwitchConfigs()=default
constexpr HardwareLimitSwitchConfigs & WithForwardLimitAutosetPositionValue(units::angle::turn_t newForwardLimitAutosetPositionValue)
Modifies this configuration's ForwardLimitAutosetPositionValue parameter and returns itself for metho...
Definition HardwareLimitSwitchConfigs.hpp:211
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
units::angle::turn_t ForwardLimitAutosetPositionValue
The value to automatically set the position to when the forward limit switch is asserted.
Definition HardwareLimitSwitchConfigs.hpp:58
signals::ForwardLimitSourceValue ForwardLimitSource
Determines where to poll the forward limit switch.
Definition HardwareLimitSwitchConfigs.hpp:85
constexpr HardwareLimitSwitchConfigs & WithForwardLimitEnable(bool newForwardLimitEnable)
Modifies this configuration's ForwardLimitEnable parameter and returns itself for method-chaining and...
Definition HardwareLimitSwitchConfigs.hpp:229
bool ForwardLimitEnable
If enabled, motor output is set to neutral when the forward limit switch is asserted and positive out...
Definition HardwareLimitSwitchConfigs.hpp:65
bool ReverseLimitAutosetPositionEnable
If enabled, the position is automatically set to a specific value, specified by ReverseLimitAutosetPo...
Definition HardwareLimitSwitchConfigs.hpp:109
bool ForwardLimitAutosetPositionEnable
If enabled, the position is automatically set to a specific value, specified by ForwardLimitAutosetPo...
Definition HardwareLimitSwitchConfigs.hpp:47
constexpr HardwareLimitSwitchConfigs & WithReverseLimitAutosetPositionValue(units::angle::turn_t newReverseLimitAutosetPositionValue)
Modifies this configuration's ReverseLimitAutosetPositionValue parameter and returns itself for metho...
Definition HardwareLimitSwitchConfigs.hpp:338
constexpr HardwareLimitSwitchConfigs & WithReverseLimitSource(signals::ReverseLimitSourceValue newReverseLimitSource)
Modifies this configuration's ReverseLimitSource parameter and returns itself for method-chaining and...
Definition HardwareLimitSwitchConfigs.hpp:386
signals::ReverseLimitTypeValue ReverseLimitType
Determines if the reverse limit switch is normally-open (default) or normally-closed.
Definition HardwareLimitSwitchConfigs.hpp:101
units::angle::turn_t ReverseLimitAutosetPositionValue
The value to automatically set the position to when the reverse limit switch is asserted.
Definition HardwareLimitSwitchConfigs.hpp:120
HardwareLimitSwitchConfigs & WithForwardLimitRemoteCANdiS1(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi forward limit switch on Signal 1 In...
constexpr HardwareLimitSwitchConfigs & WithForwardLimitAutosetPositionEnable(bool newForwardLimitAutosetPositionEnable)
Modifies this configuration's ForwardLimitAutosetPositionEnable parameter and returns itself for meth...
Definition HardwareLimitSwitchConfigs.hpp:189
constexpr HardwareLimitSwitchConfigs & WithForwardLimitRemoteSensorID(int newForwardLimitRemoteSensorID)
Modifies this configuration's ForwardLimitRemoteSensorID parameter and returns itself for method-chai...
Definition HardwareLimitSwitchConfigs.hpp:280
constexpr HardwareLimitSwitchConfigs & WithReverseLimitAutosetPositionEnable(bool newReverseLimitAutosetPositionEnable)
Modifies this configuration's ReverseLimitAutosetPositionEnable parameter and returns itself for meth...
Definition HardwareLimitSwitchConfigs.hpp:316
HardwareLimitSwitchConfigs & WithReverseLimitRemoteCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use RemoteCANcoder reverse limit switch by passing ...
constexpr HardwareLimitSwitchConfigs & WithReverseLimitType(signals::ReverseLimitTypeValue newReverseLimitType)
Modifies this configuration's ReverseLimitType parameter and returns itself for method-chaining and e...
Definition HardwareLimitSwitchConfigs.hpp:297
HardwareLimitSwitchConfigs & WithForwardLimitRemoteCANdiS2(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi forward limit switch on Signal 2 In...
constexpr HardwareLimitSwitchConfigs & WithReverseLimitEnable(bool newReverseLimitEnable)
Modifies this configuration's ReverseLimitEnable parameter and returns itself for method-chaining and...
Definition HardwareLimitSwitchConfigs.hpp:356
int ForwardLimitRemoteSensorID
Device ID of the remote device if using remote limit switch features for the forward limit switch.
Definition HardwareLimitSwitchConfigs.hpp:95
constexpr HardwareLimitSwitchConfigs & WithForwardLimitType(signals::ForwardLimitTypeValue newForwardLimitType)
Modifies this configuration's ForwardLimitType parameter and returns itself for method-chaining and e...
Definition HardwareLimitSwitchConfigs.hpp:170
signals::ReverseLimitSourceValue ReverseLimitSource
Determines where to poll the reverse limit switch.
Definition HardwareLimitSwitchConfigs.hpp:147
HardwareLimitSwitchConfigs & WithReverseLimitRemoteCANrange(const hardware::core::CoreCANrange &device)
Helper method to configure this feedback group to use the RemoteCANrange by passing in the CANrange o...
HardwareLimitSwitchConfigs & WithReverseLimitRemoteCANdiS2(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi reverse limit switch on Signal 2 In...
HardwareLimitSwitchConfigs & WithForwardLimitRemoteTalonFX(const hardware::traits::CommonTalon &device)
Helper method to configure this feedback group to use RemoteTalonFX forward limit switch by passing i...
constexpr HardwareLimitSwitchConfigs & WithReverseLimitRemoteSensorID(int newReverseLimitRemoteSensorID)
Modifies this configuration's ReverseLimitRemoteSensorID parameter and returns itself for method-chai...
Definition HardwareLimitSwitchConfigs.hpp:407
constexpr HardwareLimitSwitchConfigs & WithForwardLimitSource(signals::ForwardLimitSourceValue newForwardLimitSource)
Modifies this configuration's ForwardLimitSource parameter and returns itself for method-chaining and...
Definition HardwareLimitSwitchConfigs.hpp:259
HardwareLimitSwitchConfigs & WithReverseLimitRemoteCANdiS1(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi reverse limit switch on Signal 1 In...
HardwareLimitSwitchConfigs & WithForwardLimitRemoteCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use RemoteCANcoder forward limit switch by passing ...
bool ReverseLimitEnable
If enabled, motor output is set to neutral when reverse limit switch is asseted and negative output i...
Definition HardwareLimitSwitchConfigs.hpp:127
int ReverseLimitRemoteSensorID
Device ID of the remote device if using remote limit switch features for the reverse limit switch.
Definition HardwareLimitSwitchConfigs.hpp:157
Definition Configuration.hpp:17
Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along w...
Definition CoreCANcoder.hpp:602
Class for CTR Electronics' CANdi™ branded device, a device that integrates digital signals into the e...
Definition CoreCANdi.hpp:925
Class for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front o...
Definition CoreCANrange.hpp:735
Contains everything common between Talon motor controllers.
Definition CommonTalon.hpp:26
Definition motor_constants.h:14
Determines where to poll the forward limit switch.
Definition SpnEnums.hpp:1931
static constexpr int LimitSwitchPin
Use the forward limit switch pin on the limit switch connector.
Definition SpnEnums.hpp:1937
Determines if the forward limit switch is normally-open (default) or normally-closed.
Definition SpnEnums.hpp:1869
static constexpr int NormallyOpen
Definition SpnEnums.hpp:1872
Determines where to poll the reverse limit switch.
Definition SpnEnums.hpp:2091
static constexpr int LimitSwitchPin
Use the reverse limit switch pin on the limit switch connector.
Definition SpnEnums.hpp:2097
Determines if the reverse limit switch is normally-open (default) or normally-closed.
Definition SpnEnums.hpp:2029
static constexpr int NormallyOpen
Definition SpnEnums.hpp:2032