11#include <units/angle.h>
12#include <units/dimensionless.h>
13#include <units/time.h>
17namespace hardware::core {
class CoreCANcoder; }
18namespace hardware::core {
class CoreCANdi; }
19namespace hardware::core {
class CorePigeon2; }
Configs that affect the external feedback sensor of this motor controller.
Definition ExternalFeedbackConfigs.hpp:32
constexpr ExternalFeedbackConfigs & WithSensorPhase(signals::SensorPhaseValue newSensorPhase)
Modifies this configuration's SensorPhase parameter and returns itself for method-chaining and easier...
Definition ExternalFeedbackConfigs.hpp:454
ExternalFeedbackConfigs & WithFusedCANdiPWM2(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use FusedCANdi PWM 2 by passing in the CANdi object...
units::dimensionless::scalar_t SensorToMechanismRatio
The ratio of sensor rotations to the mechanism's output, where a ratio greater than 1 is a reduction.
Definition ExternalFeedbackConfigs.hpp:55
ExternalFeedbackConfigs & WithFusedCANdiPWM1(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use FusedCANdi PWM 1 by passing in the CANdi object...
constexpr ExternalFeedbackConfigs()=default
units::angle::turn_t AbsoluteSensorDiscontinuityPoint
The positive discontinuity point of the absolute sensor in rotations.
Definition ExternalFeedbackConfigs.hpp:239
ExternalFeedbackConfigs & WithSyncCANdiPWM1(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use SyncCANdi PWM 1 by passing in the CANdi object.
units::time::second_t VelocityFilterTimeConstant
The configurable time constant of the Kalman velocity filter.
Definition ExternalFeedbackConfigs.hpp:97
ExternalFeedbackConfigs & WithRemotePigeon2Roll(const hardware::core::CorePigeon2 &device)
Helper method to configure this feedback group to use RemotePigeon2Roll by passing in the Pigeon2 obj...
constexpr ExternalFeedbackConfigs & WithVelocityFilterTimeConstant(units::time::second_t newVelocityFilterTimeConstant)
Modifies this configuration's VelocityFilterTimeConstant parameter and returns itself for method-chai...
Definition ExternalFeedbackConfigs.hpp:341
ExternalFeedbackConfigs & WithSyncCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use SyncCANcoder by passing in the CANcoder object.
signals::ExternalFeedbackSensorSourceValue ExternalFeedbackSensorSource
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition ExternalFeedbackConfigs.hpp:161
units::dimensionless::scalar_t RotorToSensorRatio
The ratio of motor rotor rotations to remote sensor rotations, where a ratio greater than 1 is a redu...
Definition ExternalFeedbackConfigs.hpp:72
constexpr ExternalFeedbackConfigs & WithQuadratureEdgesPerRotation(int newQuadratureEdgesPerRotation)
Modifies this configuration's QuadratureEdgesPerRotation parameter and returns itself for method-chai...
Definition ExternalFeedbackConfigs.hpp:487
constexpr ExternalFeedbackConfigs & WithFeedbackRemoteSensorID(int newFeedbackRemoteSensorID)
Modifies this configuration's FeedbackRemoteSensorID parameter and returns itself for method-chaining...
Definition ExternalFeedbackConfigs.hpp:315
ExternalFeedbackConfigs & WithRemoteCANdiPWM2(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi PWM 2 by passing in the CANdi objec...
ExternalFeedbackConfigs & WithFusedCANdiQuadrature(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use FusedCANdi Quadrature by passing in the CANdi o...
ExternalFeedbackConfigs & WithRemotePigeon2Pitch(const hardware::core::CorePigeon2 &device)
Helper method to configure this feedback group to use RemotePigeon2Pitch by passing in the Pigeon2 ob...
ExternalFeedbackConfigs & WithRemoteCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use RemoteCANcoder by passing in the CANcoder objec...
constexpr ExternalFeedbackConfigs & WithExternalFeedbackSensorSource(signals::ExternalFeedbackSensorSourceValue newExternalFeedbackSensorSource)
Modifies this configuration's ExternalFeedbackSensorSource parameter and returns itself for method-ch...
Definition ExternalFeedbackConfigs.hpp:427
constexpr ExternalFeedbackConfigs & WithRotorToSensorRatio(units::dimensionless::scalar_t newRotorToSensorRatio)
Modifies this configuration's RotorToSensorRatio parameter and returns itself for method-chaining and...
Definition ExternalFeedbackConfigs.hpp:294
std::string Serialize() const final
std::string ToString() const override
ExternalFeedbackConfigs & WithRemoteCANdiPWM1(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi PWM 1 by passing in the CANdi objec...
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
ExternalFeedbackConfigs & WithRemotePigeon2Yaw(const hardware::core::CorePigeon2 &device)
Helper method to configure this feedback group to use RemotePigeon2Yaw by passing in the Pigeon2 obje...
signals::SensorPhaseValue SensorPhase
The relationship between the motor controlled by a Talon and the external sensor connected to the dat...
Definition ExternalFeedbackConfigs.hpp:177
ExternalFeedbackConfigs & WithFusedCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use FusedCANcoder by passing in the CANcoder object...
units::angle::turn_t AbsoluteSensorOffset
The offset added to any absolute sensor connected to the Talon data port.
Definition ExternalFeedbackConfigs.hpp:111
ExternalFeedbackConfigs & WithRemoteCANdiQuadrature(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi Quadrature by passing in the CANdi ...
int FeedbackRemoteSensorID
Device ID of which remote device to use.
Definition ExternalFeedbackConfigs.hpp:82
ExternalFeedbackConfigs & WithSyncCANdiPWM2(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use SyncCANdi PWM 2 by passing in the CANdi object.
constexpr ExternalFeedbackConfigs & WithSensorToMechanismRatio(units::dimensionless::scalar_t newSensorToMechanismRatio)
Modifies this configuration's SensorToMechanismRatio parameter and returns itself for method-chaining...
Definition ExternalFeedbackConfigs.hpp:266
constexpr ExternalFeedbackConfigs & WithAbsoluteSensorDiscontinuityPoint(units::angle::turn_t newAbsoluteSensorDiscontinuityPoint)
Modifies this configuration's AbsoluteSensorDiscontinuityPoint parameter and returns itself for metho...
Definition ExternalFeedbackConfigs.hpp:538
int QuadratureEdgesPerRotation
The number of quadrature edges in one rotation for the quadrature sensor connected to the Talon data ...
Definition ExternalFeedbackConfigs.hpp:199
constexpr ExternalFeedbackConfigs & WithAbsoluteSensorOffset(units::angle::turn_t newAbsoluteSensorOffset)
Modifies this configuration's AbsoluteSensorOffset parameter and returns itself for method-chaining a...
Definition ExternalFeedbackConfigs.hpp:366
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 description for the Pigeon 2 IMU sensor that measures orientation.
Definition CorePigeon2.hpp:1063
Definition motor_constants.h:14
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition SpnEnums.hpp:3271
static constexpr int Commutation
Use the external sensor used for motor commutation.
Definition SpnEnums.hpp:3277
The relationship between the motor controlled by a Talon and the external sensor connected to the dat...
Definition SpnEnums.hpp:3475
static constexpr int Aligned
The sensor direction is normally aligned with the motor.
Definition SpnEnums.hpp:3481