CTRE Phoenix 6 C++ 26.50.0-alpha-1
Loading...
Searching...
No Matches
HardwareLimitSwitchConfigs.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
13namespace ctre {
14namespace phoenix6 {
15namespace hardware::core { class CoreCANcoder; }
16namespace hardware::core { class CoreCANdi; }
17namespace hardware::core { class CoreCANrange; }
18namespace hardware::traits { class CommonTalon; }
19
20namespace configs {
21
22/**
23 * \brief Configs that change how the motor controller behaves under
24 * different limit switch states.
25 *
26 * \details Includes configs such as enabling limit switches,
27 * configuring the remote sensor ID, the source, and the
28 * position to set on limit.
29 */
31public:
32 constexpr HardwareLimitSwitchConfigs() = default;
33
34 /**
35 * \brief Determines if the forward limit switch is normally-open
36 * (default) or normally-closed.
37 *
38 * - Default Value: signals#ForwardLimitTypeValue#NormallyOpen
39 */
41 /**
42 * \brief If enabled, the position is automatically set to a specific
43 * value, specified by ForwardLimitAutosetPositionValue, when the
44 * forward limit switch is asserted.
45 *
46 * - Default Value: False
47 */
49 /**
50 * \brief The value to automatically set the position to when the
51 * forward limit switch is asserted. This has no effect if
52 * ForwardLimitAutosetPositionEnable is false.
53 *
54 * - Minimum Value: -3.4e+38
55 * - Maximum Value: 3.4e+38
56 * - Default Value: 0
57 * - Units: rotations
58 */
59 wpi::units::turn_t ForwardLimitAutosetPositionValue = 0_tr;
60 /**
61 * \brief If enabled, motor output is set to neutral when the forward
62 * limit switch is asserted and positive output is requested.
63 *
64 * - Default Value: True
65 */
66 bool ForwardLimitEnable = true;
67 /**
68 * \brief Determines where to poll the forward limit switch. This
69 * defaults to the forward limit switch pin on the limit switch
70 * connector.
71 *
72 * Choose RemoteTalonFX to use the forward limit switch attached to
73 * another Talon FX on the same CAN bus (this also requires setting
74 * ForwardLimitRemoteSensorID).
75 *
76 * Choose RemoteCANifier to use the forward limit switch attached to
77 * another CANifier on the same CAN bus (this also requires setting
78 * ForwardLimitRemoteSensorID).
79 *
80 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
81 * (this also requires setting ForwardLimitRemoteSensorID). The
82 * forward limit will assert when the CANcoder magnet strength changes
83 * from BAD (red) to ADEQUATE (orange) or GOOD (green).
84 *
85 * - Default Value: signals#ForwardLimitSourceValue#LimitSwitchPin
86 */
88 /**
89 * \brief Device ID of the remote device if using remote limit switch
90 * features for the forward limit switch.
91 *
92 * - Minimum Value: 0
93 * - Maximum Value: 62
94 * - Default Value: 0
95 * - Units:
96 */
98 /**
99 * \brief Determines if the reverse limit switch is normally-open
100 * (default) or normally-closed.
101 *
102 * - Default Value: signals#ReverseLimitTypeValue#NormallyOpen
103 */
105 /**
106 * \brief If enabled, the position is automatically set to a specific
107 * value, specified by ReverseLimitAutosetPositionValue, when the
108 * reverse limit switch is asserted.
109 *
110 * - Default Value: False
111 */
113 /**
114 * \brief The value to automatically set the position to when the
115 * reverse limit switch is asserted. This has no effect if
116 * ReverseLimitAutosetPositionEnable is false.
117 *
118 * - Minimum Value: -3.4e+38
119 * - Maximum Value: 3.4e+38
120 * - Default Value: 0
121 * - Units: rotations
122 */
123 wpi::units::turn_t ReverseLimitAutosetPositionValue = 0_tr;
124 /**
125 * \brief If enabled, motor output is set to neutral when reverse
126 * limit switch is asseted and negative output is requested.
127 *
128 * - Default Value: True
129 */
131 /**
132 * \brief Determines where to poll the reverse limit switch. This
133 * defaults to the reverse limit switch pin on the limit switch
134 * connector.
135 *
136 * Choose RemoteTalonFX to use the reverse limit switch attached to
137 * another Talon FX on the same CAN bus (this also requires setting
138 * ReverseLimitRemoteSensorID).
139 *
140 * Choose RemoteCANifier to use the reverse limit switch attached to
141 * another CANifier on the same CAN bus (this also requires setting
142 * ReverseLimitRemoteSensorID).
143 *
144 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
145 * (this also requires setting ReverseLimitRemoteSensorID). The
146 * reverse limit will assert when the CANcoder magnet strength changes
147 * from BAD (red) to ADEQUATE (orange) or GOOD (green).
148 *
149 * - Default Value: signals#ReverseLimitSourceValue#LimitSwitchPin
150 */
152 /**
153 * \brief Device ID of the remote device if using remote limit switch
154 * features for the reverse limit switch.
155 *
156 * - Minimum Value: 0
157 * - Maximum Value: 62
158 * - Default Value: 0
159 * - Units:
160 */
162
163 /**
164 * \brief Modifies this configuration's ForwardLimitType parameter and returns itself for
165 * method-chaining and easier to use config API.
166 *
167 * Determines if the forward limit switch is normally-open (default)
168 * or normally-closed.
169 *
170 * - Default Value: signals#ForwardLimitTypeValue#NormallyOpen
171 *
172 * \param newForwardLimitType Parameter to modify
173 * \returns Itself
174 */
176 {
177 ForwardLimitType = std::move(newForwardLimitType);
178 return *this;
179 }
180
181 /**
182 * \brief Modifies this configuration's ForwardLimitAutosetPositionEnable parameter and returns itself for
183 * method-chaining and easier to use config API.
184 *
185 * If enabled, the position is automatically set to a specific value,
186 * specified by ForwardLimitAutosetPositionValue, when the forward
187 * limit switch is asserted.
188 *
189 * - Default Value: False
190 *
191 * \param newForwardLimitAutosetPositionEnable Parameter to modify
192 * \returns Itself
193 */
194 constexpr HardwareLimitSwitchConfigs &WithForwardLimitAutosetPositionEnable(bool newForwardLimitAutosetPositionEnable)
195 {
196 ForwardLimitAutosetPositionEnable = std::move(newForwardLimitAutosetPositionEnable);
197 return *this;
198 }
199
200 /**
201 * \brief Modifies this configuration's ForwardLimitAutosetPositionValue parameter and returns itself for
202 * method-chaining and easier to use config API.
203 *
204 * The value to automatically set the position to when the forward
205 * limit switch is asserted. This has no effect if
206 * ForwardLimitAutosetPositionEnable is false.
207 *
208 * - Minimum Value: -3.4e+38
209 * - Maximum Value: 3.4e+38
210 * - Default Value: 0
211 * - Units: rotations
212 *
213 * \param newForwardLimitAutosetPositionValue Parameter to modify
214 * \returns Itself
215 */
216 constexpr HardwareLimitSwitchConfigs &WithForwardLimitAutosetPositionValue(wpi::units::turn_t newForwardLimitAutosetPositionValue)
217 {
218 ForwardLimitAutosetPositionValue = std::move(newForwardLimitAutosetPositionValue);
219 return *this;
220 }
221
222 /**
223 * \brief Modifies this configuration's ForwardLimitEnable parameter and returns itself for
224 * method-chaining and easier to use config API.
225 *
226 * If enabled, motor output is set to neutral when the forward limit
227 * switch is asserted and positive output is requested.
228 *
229 * - Default Value: True
230 *
231 * \param newForwardLimitEnable Parameter to modify
232 * \returns Itself
233 */
234 constexpr HardwareLimitSwitchConfigs &WithForwardLimitEnable(bool newForwardLimitEnable)
235 {
236 ForwardLimitEnable = std::move(newForwardLimitEnable);
237 return *this;
238 }
239
240 /**
241 * \brief Modifies this configuration's ForwardLimitSource parameter and returns itself for
242 * method-chaining and easier to use config API.
243 *
244 * Determines where to poll the forward limit switch. This defaults
245 * to the forward limit switch pin on the limit switch connector.
246 *
247 * Choose RemoteTalonFX to use the forward limit switch attached to
248 * another Talon FX on the same CAN bus (this also requires setting
249 * ForwardLimitRemoteSensorID).
250 *
251 * Choose RemoteCANifier to use the forward limit switch attached to
252 * another CANifier on the same CAN bus (this also requires setting
253 * ForwardLimitRemoteSensorID).
254 *
255 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
256 * (this also requires setting ForwardLimitRemoteSensorID). The
257 * forward limit will assert when the CANcoder magnet strength changes
258 * from BAD (red) to ADEQUATE (orange) or GOOD (green).
259 *
260 * - Default Value: signals#ForwardLimitSourceValue#LimitSwitchPin
261 *
262 * \param newForwardLimitSource Parameter to modify
263 * \returns Itself
264 */
266 {
267 ForwardLimitSource = std::move(newForwardLimitSource);
268 return *this;
269 }
270
271 /**
272 * \brief Modifies this configuration's ForwardLimitRemoteSensorID parameter and returns itself for
273 * method-chaining and easier to use config API.
274 *
275 * Device ID of the remote device if using remote limit switch
276 * features for the forward limit switch.
277 *
278 * - Minimum Value: 0
279 * - Maximum Value: 62
280 * - Default Value: 0
281 * - Units:
282 *
283 * \param newForwardLimitRemoteSensorID Parameter to modify
284 * \returns Itself
285 */
286 constexpr HardwareLimitSwitchConfigs &WithForwardLimitRemoteSensorID(int newForwardLimitRemoteSensorID)
287 {
288 ForwardLimitRemoteSensorID = std::move(newForwardLimitRemoteSensorID);
289 return *this;
290 }
291
292 /**
293 * \brief Modifies this configuration's ReverseLimitType parameter and returns itself for
294 * method-chaining and easier to use config API.
295 *
296 * Determines if the reverse limit switch is normally-open (default)
297 * or normally-closed.
298 *
299 * - Default Value: signals#ReverseLimitTypeValue#NormallyOpen
300 *
301 * \param newReverseLimitType Parameter to modify
302 * \returns Itself
303 */
305 {
306 ReverseLimitType = std::move(newReverseLimitType);
307 return *this;
308 }
309
310 /**
311 * \brief Modifies this configuration's ReverseLimitAutosetPositionEnable parameter and returns itself for
312 * method-chaining and easier to use config API.
313 *
314 * If enabled, the position is automatically set to a specific value,
315 * specified by ReverseLimitAutosetPositionValue, when the reverse
316 * limit switch is asserted.
317 *
318 * - Default Value: False
319 *
320 * \param newReverseLimitAutosetPositionEnable Parameter to modify
321 * \returns Itself
322 */
323 constexpr HardwareLimitSwitchConfigs &WithReverseLimitAutosetPositionEnable(bool newReverseLimitAutosetPositionEnable)
324 {
325 ReverseLimitAutosetPositionEnable = std::move(newReverseLimitAutosetPositionEnable);
326 return *this;
327 }
328
329 /**
330 * \brief Modifies this configuration's ReverseLimitAutosetPositionValue parameter and returns itself for
331 * method-chaining and easier to use config API.
332 *
333 * The value to automatically set the position to when the reverse
334 * limit switch is asserted. This has no effect if
335 * ReverseLimitAutosetPositionEnable is false.
336 *
337 * - Minimum Value: -3.4e+38
338 * - Maximum Value: 3.4e+38
339 * - Default Value: 0
340 * - Units: rotations
341 *
342 * \param newReverseLimitAutosetPositionValue Parameter to modify
343 * \returns Itself
344 */
345 constexpr HardwareLimitSwitchConfigs &WithReverseLimitAutosetPositionValue(wpi::units::turn_t newReverseLimitAutosetPositionValue)
346 {
347 ReverseLimitAutosetPositionValue = std::move(newReverseLimitAutosetPositionValue);
348 return *this;
349 }
350
351 /**
352 * \brief Modifies this configuration's ReverseLimitEnable parameter and returns itself for
353 * method-chaining and easier to use config API.
354 *
355 * If enabled, motor output is set to neutral when reverse limit
356 * switch is asseted and negative output is requested.
357 *
358 * - Default Value: True
359 *
360 * \param newReverseLimitEnable Parameter to modify
361 * \returns Itself
362 */
363 constexpr HardwareLimitSwitchConfigs &WithReverseLimitEnable(bool newReverseLimitEnable)
364 {
365 ReverseLimitEnable = std::move(newReverseLimitEnable);
366 return *this;
367 }
368
369 /**
370 * \brief Modifies this configuration's ReverseLimitSource parameter and returns itself for
371 * method-chaining and easier to use config API.
372 *
373 * Determines where to poll the reverse limit switch. This defaults
374 * to the reverse limit switch pin on the limit switch connector.
375 *
376 * Choose RemoteTalonFX to use the reverse limit switch attached to
377 * another Talon FX on the same CAN bus (this also requires setting
378 * ReverseLimitRemoteSensorID).
379 *
380 * Choose RemoteCANifier to use the reverse limit switch attached to
381 * another CANifier on the same CAN bus (this also requires setting
382 * ReverseLimitRemoteSensorID).
383 *
384 * Choose RemoteCANcoder to use another CANcoder on the same CAN bus
385 * (this also requires setting ReverseLimitRemoteSensorID). The
386 * reverse limit will assert when the CANcoder magnet strength changes
387 * from BAD (red) to ADEQUATE (orange) or GOOD (green).
388 *
389 * - Default Value: signals#ReverseLimitSourceValue#LimitSwitchPin
390 *
391 * \param newReverseLimitSource Parameter to modify
392 * \returns Itself
393 */
395 {
396 ReverseLimitSource = std::move(newReverseLimitSource);
397 return *this;
398 }
399
400 /**
401 * \brief Modifies this configuration's ReverseLimitRemoteSensorID parameter and returns itself for
402 * method-chaining and easier to use config API.
403 *
404 * Device ID of the remote device if using remote limit switch
405 * features for the reverse limit switch.
406 *
407 * - Minimum Value: 0
408 * - Maximum Value: 62
409 * - Default Value: 0
410 * - Units:
411 *
412 * \param newReverseLimitRemoteSensorID Parameter to modify
413 * \returns Itself
414 */
415 constexpr HardwareLimitSwitchConfigs &WithReverseLimitRemoteSensorID(int newReverseLimitRemoteSensorID)
416 {
417 ReverseLimitRemoteSensorID = std::move(newReverseLimitRemoteSensorID);
418 return *this;
419 }
420
421 /**
422 * \brief Helper method to configure this feedback group to use
423 * RemoteTalonFX forward limit switch by passing in the
424 * CommonTalon object. When using RemoteTalonFX, the Talon FX
425 * will use the forward limit switch attached to another Talon
426 * FX on the same CAN bus.
427 *
428 * \param device CommonTalon reference to use for RemoteTalonFX forward limit
429 * switch
430 * \returns Itself
431 */
433
434 /**
435 * \brief Helper method to configure this feedback group to use
436 * RemoteCANcoder forward limit switch by passing in the
437 * CANcoder object. When using RemoteCANcoder, the Talon FX
438 * will use another CANcoder on the same CAN bus. The forward
439 * limit will assert when the CANcoder magnet strength changes
440 * from BAD (red) to ADEQUATE (orange) or GOOD (green).
441 *
442 * \param device CANcoder reference to use for RemoteCANcoder forward limit
443 * switch
444 * \returns Itself
445 */
447
448 /**
449 * \brief Helper method to configure this feedback group to use the
450 * RemoteCANrange by passing in the CANrange object. The
451 * forward limit will assert when the CANrange proximity detect
452 * is tripped.
453 *
454 * \param device CANrange reference to use for RemoteCANrange forward limit
455 * switch
456 * \returns Itself
457 */
459
460 /**
461 * \brief Helper method to configure this feedback group to use
462 * RemoteCANdi forward limit switch on Signal 1 Input (S1IN) by
463 * passing in the CANdi object. The forward limit will assert
464 * when the CANdi™ branded device's Signal 1 Input (S1IN) pin
465 * matches the configured closed state.
466 *
467 * \param device CANdi reference to use for RemoteCANdi forward limit switch
468 * \returns Itself
469 */
471
472 /**
473 * \brief Helper method to configure this feedback group to use
474 * RemoteCANdi forward limit switch on Signal 2 Input (S2IN) by
475 * passing in the CANdi object. The forward limit will assert
476 * when the CANdi™ branded device's Signal 2 Input (S2IN) pin
477 * matches the configured closed state.
478 *
479 * \param device CANdi reference to use for RemoteCANdi forward limit switch
480 * \returns Itself
481 */
483
484 /**
485 * \brief Helper method to configure this feedback group to use
486 * RemoteTalonFX reverse limit switch by passing in the
487 * CommonTalon object. When using RemoteTalonFX, the Talon FX
488 * will use the reverse limit switch attached to another Talon
489 * FX on the same CAN bus.
490 *
491 * \param device CommonTalon reference to use for RemoteTalonFX reverse limit
492 * switch
493 * \returns Itself
494 */
496
497 /**
498 * \brief Helper method to configure this feedback group to use
499 * RemoteCANcoder reverse limit switch by passing in the
500 * CANcoder object. When using RemoteCANcoder, the Talon FX
501 * will use another CANcoder on the same CAN bus. The reverse
502 * limit will assert when the CANcoder magnet strength changes
503 * from BAD (red) to ADEQUATE (orange) or GOOD (green).
504 *
505 * \param device CANcoder reference to use for RemoteCANcoder reverse limit
506 * switch
507 * \returns Itself
508 */
510
511 /**
512 * \brief Helper method to configure this feedback group to use the
513 * RemoteCANrange by passing in the CANrange object. The
514 * reverse limit will assert when the CANrange proximity detect
515 * is tripped.
516 *
517 * \param device CANrange reference to use for RemoteCANrange reverse limit
518 * switch
519 * \returns Itself
520 */
522
523 /**
524 * \brief Helper method to configure this feedback group to use
525 * RemoteCANdi reverse limit switch on Signal 1 Input (S1IN) by
526 * passing in the CANdi object. The reverse limit will assert
527 * when the CANdi™ branded device's Signal 1 Input (S1IN) pin
528 * matches the configured closed state.
529 *
530 * \param device CANdi reference to use for RemoteCANdi reverse limit switch
531 * \returns Itself
532 */
534
535 /**
536 * \brief Helper method to configure this feedback group to use
537 * RemoteCANdi reverse limit switch on Signal 2 Input (S2IN) by
538 * passing in the CANdi object. The reverse limit will assert
539 * when the CANdi™ branded device's Signal 2 Input (S2IN) pin
540 * matches the configured closed state.
541 *
542 * \param device CANdi reference to use for RemoteCANdi reverse limit switch
543 * \returns Itself
544 */
546
547
548
549 std::string ToString() const override;
550
551 std::string Serialize() const final;
552 ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final;
553};
554
555}
556}
557}
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:40
ctre::phoenix::StatusCode Deserialize(std::string const &to_deserialize) final
signals::ForwardLimitSourceValue ForwardLimitSource
Determines where to poll the forward limit switch.
Definition HardwareLimitSwitchConfigs.hpp:87
constexpr HardwareLimitSwitchConfigs & WithForwardLimitEnable(bool newForwardLimitEnable)
Modifies this configuration's ForwardLimitEnable parameter and returns itself for method-chaining and...
Definition HardwareLimitSwitchConfigs.hpp:234
bool ForwardLimitEnable
If enabled, motor output is set to neutral when the forward limit switch is asserted and positive out...
Definition HardwareLimitSwitchConfigs.hpp:66
wpi::units::turn_t ReverseLimitAutosetPositionValue
The value to automatically set the position to when the reverse limit switch is asserted.
Definition HardwareLimitSwitchConfigs.hpp:123
bool ReverseLimitAutosetPositionEnable
If enabled, the position is automatically set to a specific value, specified by ReverseLimitAutosetPo...
Definition HardwareLimitSwitchConfigs.hpp:112
bool ForwardLimitAutosetPositionEnable
If enabled, the position is automatically set to a specific value, specified by ForwardLimitAutosetPo...
Definition HardwareLimitSwitchConfigs.hpp:48
constexpr HardwareLimitSwitchConfigs & WithReverseLimitSource(signals::ReverseLimitSourceValue newReverseLimitSource)
Modifies this configuration's ReverseLimitSource parameter and returns itself for method-chaining and...
Definition HardwareLimitSwitchConfigs.hpp:394
signals::ReverseLimitTypeValue ReverseLimitType
Determines if the reverse limit switch is normally-open (default) or normally-closed.
Definition HardwareLimitSwitchConfigs.hpp:104
constexpr HardwareLimitSwitchConfigs & WithForwardLimitAutosetPositionValue(wpi::units::turn_t newForwardLimitAutosetPositionValue)
Modifies this configuration's ForwardLimitAutosetPositionValue parameter and returns itself for metho...
Definition HardwareLimitSwitchConfigs.hpp:216
wpi::units::turn_t ForwardLimitAutosetPositionValue
The value to automatically set the position to when the forward limit switch is asserted.
Definition HardwareLimitSwitchConfigs.hpp:59
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:194
constexpr HardwareLimitSwitchConfigs & WithForwardLimitRemoteSensorID(int newForwardLimitRemoteSensorID)
Modifies this configuration's ForwardLimitRemoteSensorID parameter and returns itself for method-chai...
Definition HardwareLimitSwitchConfigs.hpp:286
constexpr HardwareLimitSwitchConfigs & WithReverseLimitAutosetPositionEnable(bool newReverseLimitAutosetPositionEnable)
Modifies this configuration's ReverseLimitAutosetPositionEnable parameter and returns itself for meth...
Definition HardwareLimitSwitchConfigs.hpp:323
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:304
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:363
int ForwardLimitRemoteSensorID
Device ID of the remote device if using remote limit switch features for the forward limit switch.
Definition HardwareLimitSwitchConfigs.hpp:97
constexpr HardwareLimitSwitchConfigs & WithForwardLimitType(signals::ForwardLimitTypeValue newForwardLimitType)
Modifies this configuration's ForwardLimitType parameter and returns itself for method-chaining and e...
Definition HardwareLimitSwitchConfigs.hpp:175
signals::ReverseLimitSourceValue ReverseLimitSource
Determines where to poll the reverse limit switch.
Definition HardwareLimitSwitchConfigs.hpp:151
HardwareLimitSwitchConfigs & WithReverseLimitRemoteCANrange(const hardware::core::CoreCANrange &device)
Helper method to configure this feedback group to use the RemoteCANrange by passing in the CANrange o...
constexpr HardwareLimitSwitchConfigs & WithReverseLimitAutosetPositionValue(wpi::units::turn_t newReverseLimitAutosetPositionValue)
Modifies this configuration's ReverseLimitAutosetPositionValue parameter and returns itself for metho...
Definition HardwareLimitSwitchConfigs.hpp:345
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:415
constexpr HardwareLimitSwitchConfigs & WithForwardLimitSource(signals::ForwardLimitSourceValue newForwardLimitSource)
Modifies this configuration's ForwardLimitSource parameter and returns itself for method-chaining and...
Definition HardwareLimitSwitchConfigs.hpp:265
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:130
int ReverseLimitRemoteSensorID
Device ID of the remote device if using remote limit switch features for the reverse limit switch.
Definition HardwareLimitSwitchConfigs.hpp:161
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 for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front o...
Definition CoreCANrange.hpp:734
Contains everything common between Talon motor controllers.
Definition CommonTalon.hpp:26
Definition ExternalFeedbackConfigs.hpp:21
Definition ExternalFeedbackConfigs.hpp:17
Definition CommonTalonWithExternalMotor.hpp:20
Definition ExternalFeedbackConfigs.hpp:16
Definition FrcUsageReport.hpp:12
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