CTRE Phoenix C++ 5.33.1
SensorTerm.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
4namespace ctre {
5namespace phoenix {
6namespace motorcontrol {
7
8/**
9 * Choose the sensor term for a motor controller
10 */
11enum class SensorTerm {
12 /**
13 * Choose Sum0 for a term
14 */
16 /**
17 * Choose Sum1 for a term
18 */
20 /**
21 * Choose Diff0 for a term
22 */
24 /**
25 * Choose Diff1 for a term
26 */
28};
29
30/**
31 * Class to handle routines specific to SensorTerm
32 */
34public:
35 /**
36 * Gets the string representation of specified SensorTerm value
37 * @param value SensorTerm to get string representation of
38 * @return string representation of specified SensorTerm
39 */
40 static std::string toString(SensorTerm value) {
41 switch(value) {
42 case SensorTerm::SensorTerm_Sum0 : return "SensorTerm::SensorTerm_Sum0";
43 case SensorTerm::SensorTerm_Sum1 : return "SensorTerm::SensorTerm_Sum1";
44 case SensorTerm::SensorTerm_Diff0 : return "SensorTerm::SensorTerm_Diff0";
45 case SensorTerm::SensorTerm_Diff1 : return "SensorTerm::SensorTerm_Diff1";
46 default : return "InvalidValue";
47 }
48 }
49};
50
51}
52}
53}
Class to handle routines specific to SensorTerm.
Definition: SensorTerm.h:33
static std::string toString(SensorTerm value)
Gets the string representation of specified SensorTerm value.
Definition: SensorTerm.h:40
SensorTerm
Choose the sensor term for a motor controller.
Definition: SensorTerm.h:11
@ SensorTerm_Sum1
Choose Sum1 for a term.
@ SensorTerm_Sum0
Choose Sum0 for a term.
@ SensorTerm_Diff1
Choose Diff1 for a term.
@ SensorTerm_Diff0
Choose Diff0 for a term.
namespace ctre
Definition: paramEnum.h:5