CTRE Phoenix 6 C++ 26.50.0-alpha-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 <wpi/units/angle.hpp>
12#include <wpi/units/dimensionless.hpp>
13#include <wpi/units/time.hpp>
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 wpi::units::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 wpi::units::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 wpi::units::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 * - Default Value: signals#FeedbackSensorSourceValue#RotorSensor
124 */
126 /**
127 * \brief Device ID of which remote device to use. This is not used
128 * if the Sensor Source is the internal rotor sensor.
129 *
130 * - Minimum Value: 0
131 * - Maximum Value: 62
132 * - Default Value: 0
133 * - Units:
134 */
136 /**
137 * \brief The configurable time constant of the Kalman velocity
138 * filter. The velocity Kalman filter will adjust to act as a low-pass
139 * with this value as its time constant.
140 *
141 * \details If the user is aiming for an expected cutoff frequency,
142 * the frequency is calculated as 1 / (2 * π * τ) with τ being the
143 * time constant.
144 *
145 * - Minimum Value: 0
146 * - Maximum Value: 1
147 * - Default Value: 0
148 * - Units: seconds
149 */
150 wpi::units::second_t VelocityFilterTimeConstant = 0_s;
151
152 /**
153 * \brief Modifies this configuration's FeedbackRotorOffset parameter and returns itself for
154 * method-chaining and easier to use config API.
155 *
156 * The offset added to the absolute integrated rotor sensor. This can
157 * be used to zero the rotor in applications that are within one rotor
158 * rotation.
159 *
160 * - Minimum Value: -1
161 * - Maximum Value: 1
162 * - Default Value: 0.0
163 * - Units: rotations
164 *
165 * \param newFeedbackRotorOffset Parameter to modify
166 * \returns Itself
167 */
168 constexpr FeedbackConfigs &WithFeedbackRotorOffset(wpi::units::turn_t newFeedbackRotorOffset)
169 {
170 FeedbackRotorOffset = std::move(newFeedbackRotorOffset);
171 return *this;
172 }
173
174 /**
175 * \brief Modifies this configuration's SensorToMechanismRatio parameter and returns itself for
176 * method-chaining and easier to use config API.
177 *
178 * The ratio of sensor rotations to the mechanism's output, where a
179 * ratio greater than 1 is a reduction.
180 *
181 * This is equivalent to the mechanism's gear ratio if the sensor is
182 * located on the input of a gearbox. If sensor is on the output of a
183 * gearbox, then this is typically set to 1.
184 *
185 * We recommend against using this config to perform onboard unit
186 * conversions. Instead, unit conversions should be performed in
187 * robot code using the units library.
188 *
189 * If this is set to zero, the device will reset back to one.
190 *
191 * - Minimum Value: -1000
192 * - Maximum Value: 1000
193 * - Default Value: 1.0
194 * - Units: scalar
195 *
196 * \param newSensorToMechanismRatio Parameter to modify
197 * \returns Itself
198 */
199 constexpr FeedbackConfigs &WithSensorToMechanismRatio(wpi::units::scalar_t newSensorToMechanismRatio)
200 {
201 SensorToMechanismRatio = std::move(newSensorToMechanismRatio);
202 return *this;
203 }
204
205 /**
206 * \brief Modifies this configuration's RotorToSensorRatio parameter and returns itself for
207 * method-chaining and easier to use config API.
208 *
209 * The ratio of motor rotor rotations to remote sensor rotations,
210 * where a ratio greater than 1 is a reduction.
211 *
212 * The Talon FX is capable of fusing a remote CANcoder with its rotor
213 * sensor to produce a high-bandwidth sensor source. This feature
214 * requires specifying the ratio between the motor rotor and the
215 * remote sensor.
216 *
217 * If this is set to zero, the device will reset back to one.
218 *
219 * - Minimum Value: -1000
220 * - Maximum Value: 1000
221 * - Default Value: 1.0
222 * - Units: scalar
223 *
224 * \param newRotorToSensorRatio Parameter to modify
225 * \returns Itself
226 */
227 constexpr FeedbackConfigs &WithRotorToSensorRatio(wpi::units::scalar_t newRotorToSensorRatio)
228 {
229 RotorToSensorRatio = std::move(newRotorToSensorRatio);
230 return *this;
231 }
232
233 /**
234 * \brief Modifies this configuration's FeedbackSensorSource parameter and returns itself for
235 * method-chaining and easier to use config API.
236 *
237 * Choose what sensor source is reported via API and used by
238 * closed-loop and limit features. The default is RotorSensor, which
239 * uses the internal rotor sensor in the Talon.
240 *
241 * Choose Remote* to use another sensor on the same CAN bus (this also
242 * requires setting FeedbackRemoteSensorID). Talon will update its
243 * position and velocity whenever the remote sensor publishes its
244 * information on CAN bus, and the Talon internal rotor will not be
245 * used.
246 *
247 * Choose Fused* (requires Phoenix Pro) and Talon will fuse another
248 * sensor's information with the internal rotor, which provides the
249 * best possible position and velocity for accuracy and bandwidth
250 * (this also requires setting FeedbackRemoteSensorID). This was
251 * developed for applications such as swerve-azimuth.
252 *
253 * Choose Sync* (requires Phoenix Pro) and Talon will synchronize its
254 * internal rotor position against another sensor, then continue to
255 * use the rotor sensor for closed loop control (this also requires
256 * setting FeedbackRemoteSensorID). The Talon will report if its
257 * internal position differs significantly from the reported remote
258 * sensor position. This was developed for mechanisms where there is
259 * a risk of the sensor failing in such a way that it reports a
260 * position that does not match the mechanism, such as the sensor
261 * mounting assembly breaking off.
262 *
263 * Choose RemotePigeon2Yaw, RemotePigeon2Pitch, and RemotePigeon2Roll
264 * to use another Pigeon2 on the same CAN bus (this also requires
265 * setting FeedbackRemoteSensorID). Talon will update its position to
266 * match the selected value whenever Pigeon2 publishes its information
267 * on CAN bus. Note that the Talon position will be in rotations and
268 * not degrees.
269 *
270 * \details Note: When the feedback source is changed to Fused* or
271 * Sync*, the Talon needs a period of time to fuse before sensor-based
272 * (soft-limit, closed loop, etc.) features are used. This period of
273 * time is determined by the update frequency of the remote sensor's
274 * Position signal.
275 *
276 * - Default Value: signals#FeedbackSensorSourceValue#RotorSensor
277 *
278 * \param newFeedbackSensorSource Parameter to modify
279 * \returns Itself
280 */
282 {
283 FeedbackSensorSource = std::move(newFeedbackSensorSource);
284 return *this;
285 }
286
287 /**
288 * \brief Modifies this configuration's FeedbackRemoteSensorID parameter and returns itself for
289 * method-chaining and easier to use config API.
290 *
291 * Device ID of which remote device to use. This is not used if the
292 * Sensor Source is the internal rotor sensor.
293 *
294 * - Minimum Value: 0
295 * - Maximum Value: 62
296 * - Default Value: 0
297 * - Units:
298 *
299 * \param newFeedbackRemoteSensorID Parameter to modify
300 * \returns Itself
301 */
302 constexpr FeedbackConfigs &WithFeedbackRemoteSensorID(int newFeedbackRemoteSensorID)
303 {
304 FeedbackRemoteSensorID = std::move(newFeedbackRemoteSensorID);
305 return *this;
306 }
307
308 /**
309 * \brief Modifies this configuration's VelocityFilterTimeConstant parameter and returns itself for
310 * method-chaining and easier to use config API.
311 *
312 * The configurable time constant of the Kalman velocity filter. The
313 * velocity Kalman filter will adjust to act as a low-pass with this
314 * value as its time constant.
315 *
316 * \details If the user is aiming for an expected cutoff frequency,
317 * the frequency is calculated as 1 / (2 * π * τ) with τ being the
318 * time constant.
319 *
320 * - Minimum Value: 0
321 * - Maximum Value: 1
322 * - Default Value: 0
323 * - Units: seconds
324 *
325 * \param newVelocityFilterTimeConstant Parameter to modify
326 * \returns Itself
327 */
328 constexpr FeedbackConfigs &WithVelocityFilterTimeConstant(wpi::units::second_t newVelocityFilterTimeConstant)
329 {
330 VelocityFilterTimeConstant = std::move(newVelocityFilterTimeConstant);
331 return *this;
332 }
333
334 /**
335 * \brief Helper method to configure this feedback group to use
336 * RemoteCANcoder by passing in the CANcoder object.
337 *
338 * When using RemoteCANcoder, the Talon will use another
339 * CANcoder on the same CAN bus. The Talon will update its
340 * position and velocity whenever CANcoder publishes its
341 * information on CAN bus, and the Talon internal rotor will
342 * not be used.
343 *
344 * \param device CANcoder reference to use for RemoteCANcoder
345 * \returns Itself
346 */
348
349 /**
350 * \brief Helper method to configure this feedback group to use
351 * FusedCANcoder by passing in the CANcoder object.
352 *
353 * When using FusedCANcoder (requires Phoenix Pro), the Talon
354 * will fuse another CANcoder's information with the internal
355 * rotor, which provides the best possible position and
356 * velocity for accuracy and bandwidth. FusedCANcoder was
357 * developed for applications such as swerve-azimuth.
358 *
359 * \param device CANcoder reference to use for FusedCANcoder
360 * \returns Itself
361 */
363
364 /**
365 * \brief Helper method to configure this feedback group to use
366 * SyncCANcoder by passing in the CANcoder object.
367 *
368 * When using SyncCANcoder (requires Phoenix Pro), the Talon
369 * will synchronize its internal rotor position against another
370 * CANcoder, then continue to use the rotor sensor for closed
371 * loop control. The Talon will report if its internal position
372 * differs significantly from the reported CANcoder position.
373 * SyncCANcoder was developed for mechanisms where there is a
374 * risk of the CANcoder failing in such a way that it reports a
375 * position that does not match the mechanism, such as the
376 * sensor mounting assembly breaking off.
377 *
378 * \param device CANcoder reference to use for SyncCANcoder
379 * \returns Itself
380 */
382
383 /**
384 * \brief Helper method to configure this feedback group to use
385 * RemotePigeon2Yaw by passing in the Pigeon2 object.
386 *
387 * When using RemotePigeon2Yaw, the Talon will use another
388 * Pigeon2 on the same CAN bus. The Talon will update its
389 * position to match the Pigeon2 yaw whenever Pigeon2 publishes
390 * its information on CAN bus. Note that the Talon position
391 * will be in rotations and not degrees.
392 *
393 * \param device Pigeon2 reference to use for RemotePigeon2Yaw
394 * \returns Itself
395 */
397
398 /**
399 * \brief Helper method to configure this feedback group to use
400 * RemotePigeon2Pitch by passing in the Pigeon2 object.
401 *
402 * When using RemotePigeon2Pitch, the Talon will use another
403 * Pigeon2 on the same CAN bus. The Talon will update its
404 * position to match the Pigeon2 pitch whenever Pigeon2
405 * publishes its information on CAN bus. Note that the Talon
406 * position will be in rotations and not degrees.
407 *
408 * \param device Pigeon2 reference to use for RemotePigeon2Pitch
409 * \returns Itself
410 */
412
413 /**
414 * \brief Helper method to configure this feedback group to use
415 * RemotePigeon2Roll by passing in the Pigeon2 object.
416 *
417 * When using RemotePigeon2Roll, the Talon will use another
418 * Pigeon2 on the same CAN bus. The Talon will update its
419 * position to match the Pigeon2 roll whenever Pigeon2
420 * publishes its information on CAN bus. Note that the Talon
421 * position will be in rotations and not degrees.
422 *
423 * \param device Pigeon2 reference to use for RemotePigeon2Roll
424 * \returns Itself
425 */
427
428 /**
429 * \brief Helper method to configure this feedback group to use
430 * RemoteCANdi PWM 1 by passing in the CANdi object.
431 *
432 * When using RemoteCANdi, the Talon will use another CTR
433 * Electronics' CANdi™ on the same CAN bus. The Talon will
434 * update its position and velocity whenever the CTR
435 * Electronics' CANdi™ publishes its information on CAN bus,
436 * and the Talon commutation sensor will not be used.
437 *
438 * \param device CANdi reference to use for RemoteCANdi
439 * \returns Itself
440 */
442
443 /**
444 * \brief Helper method to configure this feedback group to use
445 * RemoteCANdi PWM 2 by passing in the CANdi object.
446 *
447 * When using RemoteCANdi, the Talon will use another CTR
448 * Electronics' CANdi™ on the same CAN bus. The Talon will
449 * update its position and velocity whenever the CTR
450 * Electronics' CANdi™ publishes its information on CAN bus,
451 * and the Talon commutation sensor will not be used.
452 *
453 * \param device CANdi reference to use for RemoteCANdi
454 * \returns Itself
455 */
457
458 /**
459 * \brief Helper method to configure this feedback group to use
460 * RemoteCANdi Quadrature by passing in the CANdi object.
461 *
462 * When using RemoteCANdi, the Talon will use another CTR
463 * Electronics' CANdi™ on the same CAN bus. The Talon will
464 * update its position and velocity whenever the CTR
465 * Electronics' CANdi™ publishes its information on CAN bus,
466 * and the Talon commutation sensor will not be used.
467 *
468 * \param device CANdi reference to use for RemoteCANdi
469 * \returns Itself
470 */
472
473 /**
474 * \brief Helper method to configure this feedback group to use
475 * FusedCANdi PWM 1 by passing in the CANdi object.
476 *
477 * When using FusedCANdi (requires Phoenix Pro), the Talon will
478 * fuse another CANdi™ branded device's information with the
479 * internal rotor, which provides the best possible position
480 * and velocity for accuracy and bandwidth.
481 *
482 * \param device CANdi reference to use for FusedCANdi
483 * \returns Itself
484 */
486
487 /**
488 * \brief Helper method to configure this feedback group to use
489 * FusedCANdi PWM 2 by passing in the CANdi object.
490 *
491 * When using FusedCANdi (requires Phoenix Pro), the Talon will
492 * fuse another CANdi™ branded device's information with the
493 * internal rotor, which provides the best possible position
494 * and velocity for accuracy and bandwidth.
495 *
496 * \param device CANdi reference to use for FusedCANdi
497 * \returns Itself
498 */
500
501 /**
502 * \brief Helper method to configure this feedback group to use
503 * FusedCANdi Quadrature by passing in the CANdi object.
504 *
505 * When using FusedCANdi (requires Phoenix Pro), the Talon will
506 * fuse another CANdi™ branded device's information with the
507 * internal rotor, which provides the best possible position
508 * and velocity for accuracy and bandwidth.
509 *
510 * \param device CANdi reference to use for FusedCANdi
511 * \returns Itself
512 */
514
515 /**
516 * \brief Helper method to configure this feedback group to use
517 * SyncCANdi PWM 1 by passing in the CANdi object.
518 *
519 * When using SyncCANdi (requires Phoenix Pro), the Talon will
520 * synchronize its internal rotor position against another
521 * CANdi™ branded device, then continue to use the rotor sensor
522 * for closed loop control. The Talon will report if its
523 * internal position differs significantly from the reported
524 * CANdi™ branded device's position. SyncCANdi was developed
525 * for mechanisms where there is a risk of the CANdi™ branded
526 * device failing in such a way that it reports a position that
527 * does not match the mechanism, such as the sensor mounting
528 * assembly breaking off.
529 *
530 * \param device CANdi reference to use for SyncCANdi
531 * \returns Itself
532 */
534
535 /**
536 * \brief Helper method to configure this feedback group to use
537 * SyncCANdi PWM 2 by passing in the CANdi object.
538 *
539 * When using SyncCANdi (requires Phoenix Pro), the Talon will
540 * synchronize its internal rotor position against another
541 * CANdi™ branded device, then continue to use the rotor sensor
542 * for closed loop control. The Talon will report if its
543 * internal position differs significantly from the reported
544 * CANdi™ branded device's position. SyncCANdi was developed
545 * for mechanisms where there is a risk of the CANdi™ branded
546 * device failing in such a way that it reports a position that
547 * does not match the mechanism, such as the sensor mounting
548 * assembly breaking off.
549 *
550 * \param device CANdi reference to use for SyncCANdi
551 * \returns Itself
552 */
554
555
556
557 std::string ToString() const override;
558
559 std::string Serialize() const final;
560 ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final;
561};
562
563}
564}
565}
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...
wpi::units::turn_t FeedbackRotorOffset
The offset added to the absolute integrated rotor sensor.
Definition FeedbackConfigs.hpp:45
constexpr FeedbackConfigs & WithRotorToSensorRatio(wpi::units::scalar_t newRotorToSensorRatio)
Modifies this configuration's RotorToSensorRatio parameter and returns itself for method-chaining and...
Definition FeedbackConfigs.hpp:227
constexpr FeedbackConfigs & WithVelocityFilterTimeConstant(wpi::units::second_t newVelocityFilterTimeConstant)
Modifies this configuration's VelocityFilterTimeConstant parameter and returns itself for method-chai...
Definition FeedbackConfigs.hpp:328
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
constexpr FeedbackConfigs & WithFeedbackRotorOffset(wpi::units::turn_t newFeedbackRotorOffset)
Modifies this configuration's FeedbackRotorOffset parameter and returns itself for method-chaining an...
Definition FeedbackConfigs.hpp:168
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.
wpi::units::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
signals::FeedbackSensorSourceValue FeedbackSensorSource
Choose what sensor source is reported via API and used by closed-loop and limit features.
Definition FeedbackConfigs.hpp:125
wpi::units::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 & 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...
constexpr FeedbackConfigs & WithSensorToMechanismRatio(wpi::units::scalar_t newSensorToMechanismRatio)
Modifies this configuration's SensorToMechanismRatio parameter and returns itself for method-chaining...
Definition FeedbackConfigs.hpp:199
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 ...
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...
FeedbackConfigs & WithFusedCANdiQuadrature(const hardware::core::CoreCANdi &device)
Helper method to configure this feedback group to use FusedCANdi Quadrature by passing in the CANdi o...
std::string Serialize() const final
int FeedbackRemoteSensorID
Device ID of which remote device to use.
Definition FeedbackConfigs.hpp:135
constexpr FeedbackConfigs & WithFeedbackSensorSource(signals::FeedbackSensorSourceValue newFeedbackSensorSource)
Modifies this configuration's FeedbackSensorSource parameter and returns itself for method-chaining a...
Definition FeedbackConfigs.hpp:281
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:302
wpi::units::second_t VelocityFilterTimeConstant
The configurable time constant of the Kalman velocity filter.
Definition FeedbackConfigs.hpp:150
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:601
Class for CTR Electronics' CANdi™ branded device, a device that integrates digital signals into the e...
Definition CoreCANdi.hpp:924
Class description for the Pigeon 2 IMU sensor that measures orientation.
Definition CorePigeon2.hpp:1062
Definition ExternalFeedbackConfigs.hpp:21
Definition ExternalFeedbackConfigs.hpp:17
Definition ExternalFeedbackConfigs.hpp:16
Definition FrcUsageReport.hpp:12
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