CTRE Phoenix C++ 5.33.1
SensorTimeBase.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2
3#pragma once
4
5#include <string>
6
7namespace ctre {
8 namespace phoenix {
9 namespace sensors {
10
11 /**
12 * Velocity Measurement Periods
13 *
14 * @deprecated This device's Phoenix 5 API is deprecated for removal in the
15 * 2025 season. Users should update to Phoenix 6 firmware and migrate to the
16 * Phoenix 6 API. A migration guide is available at
17 * https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
18 *
19 * If the Phoenix 5 API must be used for this device, the device must have 22.X
20 * firmware. This firmware is available in Tuner X after selecting Phoenix 5 in
21 * the firmware year dropdown.
22 */
24 /**
25 * Legacy Mode
26 */
28 /**
29 * Per-Second Velocities
30 */
32 /**
33 * Per-Minute Velocities
34 */
36 };
37 /**
38 * Class to handle routines specific to SensorTimeBase
39 *
40 * @deprecated This device's Phoenix 5 API is deprecated for removal in the
41 * 2025 season. Users should update to Phoenix 6 firmware and migrate to the
42 * Phoenix 6 API. A migration guide is available at
43 * https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
44 *
45 * If the Phoenix 5 API must be used for this device, the device must have 22.X
46 * firmware. This firmware is available in Tuner X after selecting Phoenix 5 in
47 * the firmware year dropdown.
48 */
49 class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
50 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
51 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
53 public:
54 /**
55 * String representation of specified SensorTimeBase
56 * @param value SensorTimeBase to convert to a string
57 * @return string representation of SensorTimeBase
58 */
59 static std::string toString(SensorTimeBase value) {
60 switch (value) {
61 case SensorTimeBase::Per100Ms_Legacy: return "Per 100Ms (legacy)";
62 case SensorTimeBase::PerSecond: return "Per Second";
63 case SensorTimeBase::PerMinute: return "Per Minute";
64 default: return "InvalidValue";
65 }
66 }
67 };
68 } // namespace motorcontrol
69 } // namespace phoenix
70} // namespace ctre
Class to handle routines specific to SensorTimeBase.
Definition: SensorTimeBase.h:52
static std::string toString(SensorTimeBase value)
String representation of specified SensorTimeBase.
Definition: SensorTimeBase.h:59
SensorTimeBase
Velocity Measurement Periods.
Definition: SensorTimeBase.h:23
@ PerMinute
Per-Minute Velocities.
Definition: SensorTimeBase.h:35
@ PerSecond
Per-Second Velocities.
Definition: SensorTimeBase.h:31
@ Per100Ms_Legacy
Legacy Mode.
Definition: SensorTimeBase.h:27
namespace ctre
Definition: paramEnum.h:5