CTRE Phoenix 6 C++ 26.1.1
Loading...
Searching...
No Matches
FeedbackConfigs.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
11#include <units/angle.h>
12#include <units/dimensionless.h>
13#include <units/time.h>
14
15namespace ctre {
16namespace phoenix6 {
17namespace hardware::core { class CoreCANcoder; }
18namespace hardware::core { class CoreCANdi; }
19namespace hardware::core { class CorePigeon2; }
20
21namespace configs {
22
23/**
24 * \brief Configs that affect the feedback of this motor controller.
25 *
26 * \details Includes feedback sensor source, any offsets for the
27 * feedback sensor, and various ratios to describe the
28 * relationship between the sensor and the mechanism for
29 * closed looping.
30 */
32public:
33 constexpr FeedbackConfigs() = default;
34
35 /**
36 * \brief The offset added to the absolute integrated rotor sensor.
37 * This can be used to zero the rotor in applications that are within
38 * one rotor rotation.
39 *
40 * - Minimum Value: -1
41 * - Maximum Value: 1
42 * - Default Value: 0.0
43 * - Units: rotations
44 */
45 units::angle::turn_t FeedbackRotorOffset = 0.0_tr;
46 /**
47 * \brief The ratio of sensor rotations to the mechanism's output,
48 * where a ratio greater than 1 is a reduction.
49 *
50 * This is equivalent to the mechanism's gear ratio if the sensor is
51 * located on the input of a gearbox. If sensor is on the output of a
52 * gearbox, then this is typically set to 1.
53 *
54 * We recommend against using this config to perform onboard unit
55 * conversions. Instead, unit conversions should be performed in
56 * robot code using the units library.
57 *
58 * If this is set to zero, the device will reset back to one.
59 *
60 * - Minimum Value: -1000
61 * - Maximum Value: 1000
62 * - Default Value: 1.0
63 * - Units: scalar
64 */
65 units::dimensionless::scalar_t SensorToMechanismRatio = 1.0;
66 /**
67 * \brief The ratio of motor rotor rotations to remote sensor
68 * rotations, where a ratio greater than 1 is a reduction.
69 *
70 * The Talon FX is capable of fusing a remote CANcoder with its rotor
71 * sensor to produce a high-bandwidth sensor source. This feature
72 * requires specifying the ratio between the motor rotor and the
73 * remote sensor.
74 *
75 * If this is set to zero, the device will reset back to one.
76 *
77 * - Minimum Value: -1000
78 * - Maximum Value: 1000
79 * - Default Value: 1.0
80 * - Units: scalar
81 */
82 units::dimensionless::scalar_t RotorToSensorRatio = 1.0;
83 /**
84 * \brief Choose what sensor source is reported via API and used by
85 * closed-loop and limit features. The default is RotorSensor, which
86 * uses the internal rotor sensor in the Talon.
87 *
88 * Choose Remote* to use another sensor on the same CAN bus (this also
89 * requires setting FeedbackRemoteSensorID). Talon will update its
90 * position and velocity whenever the remote sensor publishes its
91 * information on CAN bus, and the Talon internal rotor will not be
92 * used.
93 *
94 * Choose Fused* (requires Phoenix Pro) and Talon will fuse another
95 * sensor's information with the internal rotor, which provides the
96 * best possible position and velocity for accuracy and bandwidth
97 * (this also requires setting FeedbackRemoteSensorID). This was
98 * developed for applications such as swerve-azimuth.
99 *
100 * Choose Sync* (requires Phoenix Pro) and Talon will synchronize its
101 * internal rotor position against another sensor, then continue to
102 * use the rotor sensor for closed loop control (this also requires
103 * setting FeedbackRemoteSensorID). The Talon will report if its
104 * internal position differs significantly from the reported remote
105 * sensor position. This was developed for mechanisms where there is
106 * a risk of the sensor failing in such a way that it reports a
107 * position that does not match the mechanism, such as the sensor
108 * mounting assembly breaking off.
109 *
110 * Choose RemotePigeon2Yaw, RemotePigeon2Pitch, and RemotePigeon2Roll
111 * to use another Pigeon2 on the same CAN bus (this also requires
112 * setting FeedbackRemoteSensorID). Talon will update its position to
113 * match the selected value whenever Pigeon2 publishes its information
114 * on CAN bus. Note that the Talon position will be in rotations and
115 * not degrees.
116 *
117 * \details Note: When the feedback source is changed to Fused* or
118 * Sync*, the Talon needs a period of time to fuse before sensor-based
119 * (soft-limit, closed loop, etc.) features are used. This period of
120 * time is determined by the update frequency of the remote sensor's
121 * Position signal.
122 *
123 */
125 /**
126 * \brief Device ID of which remote device to use. This is not used
127 * if the Sensor Source is the internal rotor sensor.
128 *
129 * - Minimum Value: 0
130 * - Maximum Value: 62
131 * - Default Value: 0
132 * - Units:
133 */
135 /**
136 * \brief The configurable time constant of the Kalman velocity
137 * filter. The velocity Kalman filter will adjust to act as a low-pass
138 * with this value as its time constant.
139 *
140 * \details If the user is aiming for an expected cutoff frequency,
141 * the frequency is calculated as 1 / (2 * π * τ) with τ being the
142 * time constant.
143 *
144 * - Minimum Value: 0
145 * - Maximum Value: 1
146 * - Default Value: 0
147 * - Units: seconds
148 */
149 units::time::second_t VelocityFilterTimeConstant = 0_s;
150
151 /**
152 * \brief Modifies this configuration's FeedbackRotorOffset parameter and returns itself for
153 * method-chaining and easier to use config API.
154 *
155 * The offset added to the absolute integrated rotor sensor. This can
156 * be used to zero the rotor in applications that are within one rotor
157 * rotation.
158 *
159 * - Minimum Value: -1
160 * - Maximum Value: 1
161 * - Default Value: 0.0
162 * - Units: rotations
163 *
164 * \param newFeedbackRotorOffset Parameter to modify
165 * \returns Itself
166 */
167 constexpr FeedbackConfigs &WithFeedbackRotorOffset(units::angle::turn_t newFeedbackRotorOffset)
168 {
169 FeedbackRotorOffset = std::move(newFeedbackRotorOffset);
170 return *this;
171 }
172
173 /**
174 * \brief Modifies this configuration's SensorToMechanismRatio parameter and returns itself for
175 * method-chaining and easier to use config API.
176 *
177 * The ratio of sensor rotations to the mechanism's output, where a
178 * ratio greater than 1 is a reduction.
179 *
180 * This is equivalent to the mechanism's gear ratio if the sensor is
181 * located on the input of a gearbox. If sensor is on the output of a
182 * gearbox, then this is typically set to 1.
183 *
184 * We recommend against using this config to perform onboard unit
185 * conversions. Instead, unit conversions should be performed in
186 * robot code using the units library.
187 *
188 * If this is set to zero, the device will reset back to one.
189 *
190 * - Minimum Value: -1000
191 * - Maximum Value: 1000
192 * - Default Value: 1.0
193 * - Units: scalar
194 *
195 * \param newSensorToMechanismRatio Parameter to modify
196 * \returns Itself
197 */
198 constexpr FeedbackConfigs &WithSensorToMechanismRatio(units::dimensionless::scalar_t newSensorToMechanismRatio)
199 {
200 SensorToMechanismRatio = std::move(newSensorToMechanismRatio);
201 return *this;
202 }
203
204 /**
205 * \brief Modifies this configuration's RotorToSensorRatio parameter and returns itself for
206 * method-chaining and easier to use config API.
207 *
208 * The ratio of motor rotor rotations to remote sensor rotations,
209 * where a ratio greater than 1 is a reduction.
210 *
211 * The Talon FX is capable of fusing a remote CANcoder with its rotor
212 * sensor to produce a high-bandwidth sensor source. This feature
213 * requires specifying the ratio between the motor rotor and the
214 * remote sensor.
215 *
216 * If this is set to zero, the device will reset back to one.
217 *
218 * - Minimum Value: -1000
219 * - Maximum Value: 1000
220 * - Default Value: 1.0
221 * - Units: scalar
222 *
223 * \param newRotorToSensorRatio Parameter to modify
224 * \returns Itself
225 */
226 constexpr FeedbackConfigs &WithRotorToSensorRatio(units::dimensionless::scalar_t newRotorToSensorRatio)
227 {
228 RotorToSensorRatio = std::move(newRotorToSensorRatio);
229 return *this;
230 }
231
232 /**
233 * \brief Modifies this configuration's FeedbackSensorSource parameter and returns itself for
234 * method-chaining and easier to use config API.
235 *
236 * Choose what sensor source is reported via API and used by
237 * closed-loop and limit features. The default is RotorSensor, which
238 * uses the internal rotor sensor in the Talon.
239 *
240 * Choose Remote* to use another sensor on the same CAN bus (this also
241 * requires setting FeedbackRemoteSensorID). Talon will update its
242 * position and velocity whenever the remote sensor publishes its
243 * information on CAN bus, and the Talon internal rotor will not be
244 * used.
245 *
246 * Choose Fused* (requires Phoenix Pro) and Talon will fuse another
247 * sensor's information with the internal rotor, which provides the
248 * best possible position and velocity for accuracy and bandwidth
249 * (this also requires setting FeedbackRemoteSensorID). This was
250 * developed for applications such as swerve-azimuth.
251 *
252 * Choose Sync* (requires Phoenix Pro) and Talon will synchronize its
253 * internal rotor position against another sensor, then continue to
254 * use the rotor sensor for closed loop control (this also requires
255 * setting FeedbackRemoteSensorID). The Talon will report if its
256 * internal position differs significantly from the reported remote
257 * sensor position. This was developed for mechanisms where there is
258 * a risk of the sensor failing in such a way that it reports a
259 * position that does not match the mechanism, such as the sensor
260 * mounting assembly breaking off.
261 *
262 * Choose RemotePigeon2Yaw, RemotePigeon2Pitch, and RemotePigeon2Roll
263 * to use another Pigeon2 on the same CAN bus (this also requires
264 * setting FeedbackRemoteSensorID). Talon will update its position to
265 * match the selected value whenever Pigeon2 publishes its information
266 * on CAN bus. Note that the Talon position will be in rotations and
267 * not degrees.
268 *
269 * \details Note: When the feedback source is changed to Fused* or
270 * Sync*, the Talon needs a period of time to fuse before sensor-based
271 * (soft-limit, closed loop, etc.) features are used. This period of
272 * time is determined by the update frequency of the remote sensor's
273 * Position signal.
274 *
275 *
276 * \param newFeedbackSensorSource Parameter to modify
277 * \returns Itself
278 */
280 {
281 FeedbackSensorSource = std::move(newFeedbackSensorSource);
282 return *this;
283 }
284
285 /**
286 * \brief Modifies this configuration's FeedbackRemoteSensorID parameter and returns itself for
287 * method-chaining and easier to use config API.
288 *
289 * Device ID of which remote device to use. This is not used if the
290 * Sensor Source is the internal rotor sensor.
291 *
292 * - Minimum Value: 0
293 * - Maximum Value: 62
294 * - Default Value: 0
295 * - Units:
296 *
297 * \param newFeedbackRemoteSensorID Parameter to modify
298 * \returns Itself
299 */
300 constexpr FeedbackConfigs &WithFeedbackRemoteSensorID(int newFeedbackRemoteSensorID)
301 {
302 FeedbackRemoteSensorID = std::move(newFeedbackRemoteSensorID);
303 return *this;
304 }
305
306 /**
307 * \brief Modifies this configuration's VelocityFilterTimeConstant parameter and returns itself for
308 * method-chaining and easier to use config API.
309 *
310 * The configurable time constant of the Kalman velocity filter. The
311 * velocity Kalman filter will adjust to act as a low-pass with this
312 * value as its time constant.
313 *
314 * \details If the user is aiming for an expected cutoff frequency,
315 * the frequency is calculated as 1 / (2 * π * τ) with τ being the
316 * time constant.
317 *
318 * - Minimum Value: 0
319 * - Maximum Value: 1
320 * - Default Value: 0
321 * - Units: seconds
322 *
323 * \param newVelocityFilterTimeConstant Parameter to modify
324 * \returns Itself
325 */
326 constexpr FeedbackConfigs &WithVelocityFilterTimeConstant(units::time::second_t newVelocityFilterTimeConstant)
327 {
328 VelocityFilterTimeConstant = std::move(newVelocityFilterTimeConstant);
329 return *this;
330 }
331
332 /**
333 * \brief Helper method to configure this feedback group to use
334 * RemoteCANcoder by passing in the CANcoder object.
335 *
336 * When using RemoteCANcoder, the Talon will use another
337 * CANcoder on the same CAN bus. The Talon will update its
338 * position and velocity whenever CANcoder publishes its
339 * information on CAN bus, and the Talon internal rotor will
340 * not be used.
341 *
342 * \param device CANcoder reference to use for RemoteCANcoder
343 * \returns Itself
344 */
346
347 /**
348 * \brief Helper method to configure this feedback group to use
349 * FusedCANcoder by passing in the CANcoder object.
350 *
351 * When using FusedCANcoder (requires Phoenix Pro), the Talon
352 * will fuse another CANcoder's information with the internal
353 * rotor, which provides the best possible position and
354 * velocity for accuracy and bandwidth. FusedCANcoder was
355 * developed for applications such as swerve-azimuth.
356 *
357 * \param device CANcoder reference to use for FusedCANcoder
358 * \returns Itself
359 */
361
362 /**
363 * \brief Helper method to configure this feedback group to use
364 * SyncCANcoder by passing in the CANcoder object.
365 *
366 * When using SyncCANcoder (requires Phoenix Pro), the Talon
367 * will synchronize its internal rotor position against another
368 * CANcoder, then continue to use the rotor sensor for closed
369 * loop control. The Talon will report if its internal position
370 * differs significantly from the reported CANcoder position.
371 * SyncCANcoder was developed for mechanisms where there is a
372 * risk of the CANcoder failing in such a way that it reports a
373 * position that does not match the mechanism, such as the
374 * sensor mounting assembly breaking off.
375 *
376 * \param device CANcoder reference to use for SyncCANcoder
377 * \returns Itself
378 */
380
381 /**
382 * \brief Helper method to configure this feedback group to use
383 * RemotePigeon2Yaw by passing in the Pigeon2 object.
384 *
385 * When using RemotePigeon2Yaw, the Talon will use another
386 * Pigeon2 on the same CAN bus. The Talon will update its
387 * position to match the Pigeon2 yaw whenever Pigeon2 publishes
388 * its information on CAN bus. Note that the Talon position
389 * will be in rotations and not degrees.
390 *
391 * \param device Pigeon2 reference to use for RemotePigeon2Yaw
392 * \returns Itself
393 */
395
396 /**
397 * \brief Helper method to configure this feedback group to use
398 * RemotePigeon2Pitch by passing in the Pigeon2 object.
399 *
400 * When using RemotePigeon2Pitch, the Talon will use another
401 * Pigeon2 on the same CAN bus. The Talon will update its
402 * position to match the Pigeon2 pitch whenever Pigeon2
403 * publishes its information on CAN bus. Note that the Talon
404 * position will be in rotations and not degrees.
405 *
406 * \param device Pigeon2 reference to use for RemotePigeon2Pitch
407 * \returns Itself
408 */
410
411 /**
412 * \brief Helper method to configure this feedback group to use
413 * RemotePigeon2Roll by passing in the Pigeon2 object.
414 *
415 * When using RemotePigeon2Roll, the Talon will use another
416 * Pigeon2 on the same CAN bus. The Talon will update its
417 * position to match the Pigeon2 roll whenever Pigeon2
418 * publishes its information on CAN bus. Note that the Talon
419 * position will be in rotations and not degrees.
420 *
421 * \param device Pigeon2 reference to use for RemotePigeon2Roll
422 * \returns Itself
423 */
425
426 /**
427 * \brief Helper method to configure this feedback group to use
428 * RemoteCANdi PWM 1 by passing in the CANdi object.
429 *
430 * When using RemoteCANdi, the Talon will use another CTR
431 * Electronics' CANdi™ on the same CAN bus. The Talon will
432 * update its position and velocity whenever the CTR
433 * Electronics' CANdi™ publishes its information on CAN bus,
434 * and the Talon commutation sensor will not be used.
435 *
436 * \param device CANdi reference to use for RemoteCANdi
437 * \returns Itself
438 */
440
441 /**
442 * \brief Helper method to configure this feedback group to use
443 * RemoteCANdi PWM 2 by passing in the CANdi object.
444 *
445 * When using RemoteCANdi, the Talon will use another CTR
446 * Electronics' CANdi™ on the same CAN bus. The Talon will
447 * update its position and velocity whenever the CTR
448 * Electronics' CANdi™ publishes its information on CAN bus,
449 * and the Talon commutation sensor will not be used.
450 *
451 * \param device CANdi reference to use for RemoteCANdi
452 * \returns Itself
453 */
455
456 /**
457 * \brief Helper method to configure this feedback group to use
458 * RemoteCANdi Quadrature by passing in the CANdi object.
459 *
460 * When using RemoteCANdi, the Talon will use another CTR
461 * Electronics' CANdi™ on the same CAN bus. The Talon will
462 * update its position and velocity whenever the CTR
463 * Electronics' CANdi™ publishes its information on CAN bus,
464 * and the Talon commutation sensor will not be used.
465 *
466 * \param device CANdi reference to use for RemoteCANdi
467 * \returns Itself
468 */
470
471 /**
472 * \brief Helper method to configure this feedback group to use
473 * FusedCANdi PWM 1 by passing in the CANdi object.
474 *
475 * When using FusedCANdi (requires Phoenix Pro), the Talon will
476 * fuse another CANdi™ branded device's information with the
477 * internal rotor, which provides the best possible position
478 * and velocity for accuracy and bandwidth.
479 *
480 * \param device CANdi reference to use for FusedCANdi
481 * \returns Itself
482 */
484
485 /**
486 * \brief Helper method to configure this feedback group to use
487 * FusedCANdi PWM 2 by passing in the CANdi object.
488 *
489 * When using FusedCANdi (requires Phoenix Pro), the Talon will
490 * fuse another CANdi™ branded device's information with the
491 * internal rotor, which provides the best possible position
492 * and velocity for accuracy and bandwidth.
493 *
494 * \param device CANdi reference to use for FusedCANdi
495 * \returns Itself
496 */
498
499 /**
500 * \brief Helper method to configure this feedback group to use
501 * FusedCANdi Quadrature by passing in the CANdi object.
502 *
503 * When using FusedCANdi (requires Phoenix Pro), the Talon will
504 * fuse another CANdi™ branded device's information with the
505 * internal rotor, which provides the best possible position
506 * and velocity for accuracy and bandwidth.
507 *
508 * \param device CANdi reference to use for FusedCANdi
509 * \returns Itself
510 */
512
513 /**
514 * \brief Helper method to configure this feedback group to use
515 * SyncCANdi PWM 1 by passing in the CANdi object.
516 *
517 * When using SyncCANdi (requires Phoenix Pro), the Talon will
518 * synchronize its internal rotor position against another
519 * CANdi™ branded device, then continue to use the rotor sensor
520 * for closed loop control. The Talon will report if its
521 * internal position differs significantly from the reported
522 * CANdi™ branded device's position. SyncCANdi was developed
523 * for mechanisms where there is a risk of the CANdi™ branded
524 * device failing in such a way that it reports a position that
525 * does not match the mechanism, such as the sensor mounting
526 * assembly breaking off.
527 *
528 * \param device CANdi reference to use for SyncCANdi
529 * \returns Itself
530 */
532
533 /**
534 * \brief Helper method to configure this feedback group to use
535 * SyncCANdi PWM 2 by passing in the CANdi object.
536 *
537 * When using SyncCANdi (requires Phoenix Pro), the Talon will
538 * synchronize its internal rotor position against another
539 * CANdi™ branded device, then continue to use the rotor sensor
540 * for closed loop control. The Talon will report if its
541 * internal position differs significantly from the reported
542 * CANdi™ branded device's position. SyncCANdi was developed
543 * for mechanisms where there is a risk of the CANdi™ branded
544 * device failing in such a way that it reports a position that
545 * does not match the mechanism, such as the sensor mounting
546 * assembly breaking off.
547 *
548 * \param device CANdi reference to use for SyncCANdi
549 * \returns Itself
550 */
552
553
554
555 std::string ToString() const override;
556
557 std::string Serialize() const final;
558 ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final;
559};
560
561}
562}
563}
Configs that affect the feedback of this motor controller.
Definition FeedbackConfigs.hpp:31
FeedbackConfigs & WithFusedCANdiPWM1(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use FusedCANdi PWM 1 by passing in the CANdi object...
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
std::string ToString() const override
FeedbackConfigs & WithRemotePigeon2Yaw(const hardware::core::CorePigeon2 &device)
Helper method to configure this feedback group to use RemotePigeon2Yaw by passing in the Pigeon2 obje...
FeedbackConfigs & WithFusedCANdiPWM2(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use FusedCANdi PWM 2 by passing in the CANdi object...
FeedbackConfigs & WithSyncCANdiPWM2(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use SyncCANdi PWM 2 by passing in the CANdi object.
signals::FeedbackSensorSourceValue FeedbackSensorSource
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition FeedbackConfigs.hpp:124
constexpr FeedbackConfigs & WithRotorToSensorRatio(units::dimensionless::scalar_t newRotorToSensorRatio)
Modifies this configuration's RotorToSensorRatio parameter and returns itself for method-chaining and...
Definition FeedbackConfigs.hpp:226
FeedbackConfigs & WithRemotePigeon2Roll(const hardware::core::CorePigeon2 &device)
Helper method to configure this feedback group to use RemotePigeon2Roll by passing in the Pigeon2 obj...
FeedbackConfigs & WithRemoteCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use RemoteCANcoder by passing in the CANcoder objec...
FeedbackConfigs & WithRemoteCANdiPWM2(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi PWM 2 by passing in the CANdi objec...
FeedbackConfigs & WithRemoteCANdiPWM1(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi PWM 1 by passing in the CANdi objec...
FeedbackConfigs & WithRemoteCANdiQuadrature(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use RemoteCANdi Quadrature by passing in the CANdi ...
constexpr FeedbackConfigs & WithSensorToMechanismRatio(units::dimensionless::scalar_t newSensorToMechanismRatio)
Modifies this configuration's SensorToMechanismRatio parameter and returns itself for method-chaining...
Definition FeedbackConfigs.hpp:198
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 FeedbackConfigs.hpp:65
FeedbackConfigs & WithSyncCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use SyncCANcoder by passing in the CANcoder object.
FeedbackConfigs & WithRemotePigeon2Pitch(const hardware::core::CorePigeon2 &device)
Helper method to configure this feedback group to use RemotePigeon2Pitch by passing in the Pigeon2 ob...
constexpr FeedbackConfigs & WithVelocityFilterTimeConstant(units::time::second_t newVelocityFilterTimeConstant)
Modifies this configuration's VelocityFilterTimeConstant parameter and returns itself for method-chai...
Definition FeedbackConfigs.hpp:326
FeedbackConfigs & WithFusedCANdiQuadrature(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use FusedCANdi Quadrature by passing in the CANdi o...
units::angle::turn_t FeedbackRotorOffset
The offset added to the absolute integrated rotor sensor.
Definition FeedbackConfigs.hpp:45
std::string Serialize() const final
units::time::second_t VelocityFilterTimeConstant
The configurable time constant of the Kalman velocity filter.
Definition FeedbackConfigs.hpp:149
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 FeedbackConfigs.hpp:82
int FeedbackRemoteSensorID
Device ID of which remote device to use.
Definition FeedbackConfigs.hpp:134
constexpr FeedbackConfigs & WithFeedbackSensorSource(signals::FeedbackSensorSourceValue newFeedbackSensorSource)
Modifies this configuration's FeedbackSensorSource parameter and returns itself for method-chaining a...
Definition FeedbackConfigs.hpp:279
FeedbackConfigs & WithFusedCANcoder(const hardware::core::CoreCANcoder &device)
Helper method to configure this feedback group to use FusedCANcoder by passing in the CANcoder object...
constexpr FeedbackConfigs & WithFeedbackRemoteSensorID(int newFeedbackRemoteSensorID)
Modifies this configuration's FeedbackRemoteSensorID parameter and returns itself for method-chaining...
Definition FeedbackConfigs.hpp:300
constexpr FeedbackConfigs & WithFeedbackRotorOffset(units::angle::turn_t newFeedbackRotorOffset)
Modifies this configuration's FeedbackRotorOffset parameter and returns itself for method-chaining an...
Definition FeedbackConfigs.hpp:167
FeedbackConfigs & WithSyncCANdiPWM1(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use SyncCANdi PWM 1 by passing in the CANdi object.
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:1686
static constexpr int RotorSensor
Use the internal rotor sensor in the Talon.
Definition SpnEnums.hpp:1692