CTRE Phoenix C++ 5.33.1
RemoteSensorSource.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
4#include <string>
5
6namespace ctre {
7namespace phoenix {
8namespace motorcontrol {
9
10/**
11 * Choose the remote sensor source for a motor controller
12 */
14 /**
15 * Don't use a sensor
16 */
18 /**
19 * Use a sensor connected to
20 * a TalonSRX and configured on
21 * the TalonSRX
22 */
24 /**
25 * Use a CAN Pigeon's Yaw value
26 */
28 /**
29 * Use a CAN Pigeon's Pitch value
30 */
32 /**
33 * Use a CAN Pigeon's Roll value
34 */
36 /**
37 * Use a quadrature sensor
38 * connected to a CANifier
39 */
41 /**
42 * Use a PWM sensor connected
43 * to CANifier's PWM0
44 */
46 /**
47 * Use a PWM sensor connected
48 * to CANifier's PWM1
49 */
51 /**
52 * Use a PWM sensor connected
53 * to CANifier's PWM2
54 */
56 /**
57 * Use a PWM sensor connected
58 * to CANifier's PWM3
59 */
61 /**
62 * Use the yaw value of a pigeon
63 * connected to a talon over ribbon cable
64 */
66 /**
67 * Use the pitch value of a pigeon
68 * connected to a talon over ribbon cable
69 */
71 /**
72 * Use the roll value of a pigeon
73 * connected to a talon over ribbon cable
74 */
76 /**
77 * Use CANCoder
78 */
80 /**
81 * Remote Sensor Source 14 is reserved
82 */
83
84 /**
85 * Use a sensor connected to
86 * a TalonFX and configured on
87 * the TalonFX
88 */
90};
91/**
92 * Class used to get string representation of a remote sensor source
93 */
95public:
96 /**
97 * Get string representation of specified remote sensor source
98 * @param value remote sensor source to get string of
99 * @return string representation of specified remote sensor source
100 */
101 static std::string toString(RemoteSensorSource value) {
102 switch(value) {
103 case RemoteSensorSource::RemoteSensorSource_Off : return "RemoteSensorSource::RemoteSensorSource_Off";
104 case RemoteSensorSource::RemoteSensorSource_TalonSRX_SelectedSensor : return "RemoteSensorSource::RemoteSensorSource_TalonSRX_SelectedSensor";
105 case RemoteSensorSource::RemoteSensorSource_Pigeon_Yaw : return "RemoteSensorSource::RemoteSensorSource_Pigeon_Yaw";
106 case RemoteSensorSource::RemoteSensorSource_Pigeon_Pitch : return "RemoteSensorSource::RemoteSensorSource_Pigeon_Pitch";
107 case RemoteSensorSource::RemoteSensorSource_Pigeon_Roll : return "RemoteSensorSource::RemoteSensorSource_Pigeon_Roll";
108 case RemoteSensorSource::RemoteSensorSource_CANifier_Quadrature : return "RemoteSensorSource::RemoteSensorSource_CANifier_Quadrature";
109 case RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput0 : return "RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput0";
110 case RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput1 : return "RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput1";
111 case RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput2 : return "RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput2";
112 case RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput3 : return "RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput3";
113 case RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Yaw : return "RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Yaw";
114 case RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Pitch : return "RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Pitch";
115 case RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Roll : return "RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Roll";
116 case RemoteSensorSource::RemoteSensorSource_CANCoder : return "RemoteSensorSource::RemoteSensorSource_CANCoder";
117 default : return "InvalidValue";
118 }
119 }
120};
121}
122}
123}
Class used to get string representation of a remote sensor source.
Definition: RemoteSensorSource.h:94
static std::string toString(RemoteSensorSource value)
Get string representation of specified remote sensor source.
Definition: RemoteSensorSource.h:101
RemoteSensorSource
Choose the remote sensor source for a motor controller.
Definition: RemoteSensorSource.h:13
@ RemoteSensorSource_CANifier_PWMInput0
Use a PWM sensor connected to CANifier's PWM0.
@ RemoteSensorSource_GadgeteerPigeon_Yaw
Use the yaw value of a pigeon connected to a talon over ribbon cable.
@ RemoteSensorSource_CANifier_PWMInput2
Use a PWM sensor connected to CANifier's PWM2.
@ RemoteSensorSource_Pigeon_Yaw
Use a CAN Pigeon's Yaw value.
@ RemoteSensorSource_CANifier_PWMInput1
Use a PWM sensor connected to CANifier's PWM1.
@ RemoteSensorSource_Pigeon_Roll
Use a CAN Pigeon's Roll value.
@ RemoteSensorSource_GadgeteerPigeon_Roll
Use the roll value of a pigeon connected to a talon over ribbon cable.
@ RemoteSensorSource_CANifier_Quadrature
Use a quadrature sensor connected to a CANifier.
@ RemoteSensorSource_GadgeteerPigeon_Pitch
Use the pitch value of a pigeon connected to a talon over ribbon cable.
@ RemoteSensorSource_TalonSRX_SelectedSensor
Use a sensor connected to a TalonSRX and configured on the TalonSRX.
@ RemoteSensorSource_TalonFX_SelectedSensor
Remote Sensor Source 14 is reserved.
@ RemoteSensorSource_Pigeon_Pitch
Use a CAN Pigeon's Pitch value.
@ RemoteSensorSource_CANifier_PWMInput3
Use a PWM sensor connected to CANifier's PWM3.
namespace ctre
Definition: paramEnum.h:5