CTRE Phoenix C++ 5.35.1
Loading...
Searching...
No Matches
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 * Class used to get string representation of a remote sensor source
86 */
88public:
89 /**
90 * Get string representation of specified remote sensor source
91 * @param value remote sensor source to get string of
92 * @return string representation of specified remote sensor source
93 */
94 static std::string toString(RemoteSensorSource value) {
95 switch(value) {
96 case RemoteSensorSource::RemoteSensorSource_Off : return "RemoteSensorSource::RemoteSensorSource_Off";
97 case RemoteSensorSource::RemoteSensorSource_TalonSRX_SelectedSensor : return "RemoteSensorSource::RemoteSensorSource_TalonSRX_SelectedSensor";
98 case RemoteSensorSource::RemoteSensorSource_Pigeon_Yaw : return "RemoteSensorSource::RemoteSensorSource_Pigeon_Yaw";
99 case RemoteSensorSource::RemoteSensorSource_Pigeon_Pitch : return "RemoteSensorSource::RemoteSensorSource_Pigeon_Pitch";
100 case RemoteSensorSource::RemoteSensorSource_Pigeon_Roll : return "RemoteSensorSource::RemoteSensorSource_Pigeon_Roll";
101 case RemoteSensorSource::RemoteSensorSource_CANifier_Quadrature : return "RemoteSensorSource::RemoteSensorSource_CANifier_Quadrature";
102 case RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput0 : return "RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput0";
103 case RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput1 : return "RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput1";
104 case RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput2 : return "RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput2";
105 case RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput3 : return "RemoteSensorSource::RemoteSensorSource_CANifier_PWMInput3";
106 case RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Yaw : return "RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Yaw";
107 case RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Pitch : return "RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Pitch";
108 case RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Roll : return "RemoteSensorSource::RemoteSensorSource_GadgeteerPigeon_Roll";
109 case RemoteSensorSource::RemoteSensorSource_CANCoder : return "RemoteSensorSource::RemoteSensorSource_CANCoder";
110 default : return "InvalidValue";
111 }
112 }
113};
114}
115}
116}
Class used to get string representation of a remote sensor source.
Definition RemoteSensorSource.h:87
static std::string toString(RemoteSensorSource value)
Get string representation of specified remote sensor source.
Definition RemoteSensorSource.h:94
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_Pigeon_Pitch
Use a CAN Pigeon's Pitch value.
@ RemoteSensorSource_CANifier_PWMInput3
Use a PWM sensor connected to CANifier's PWM3.
WPI Compliant CANcoder class.
Definition CANCoderStatusFrame.h:4