CTRE Phoenix C++ 5.33.1
SensorInitializationStrategy.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 {
7 namespace phoenix {
8 namespace sensors {
9
10 /**
11 * Enum for how CANCoder should initialize its position register on boot.
12 *
13 * @deprecated This device's Phoenix 5 API is deprecated for removal in the
14 * 2025 season. Users should update to Phoenix 6 firmware and migrate to the
15 * Phoenix 6 API. A migration guide is available at
16 * https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
17 *
18 * If the Phoenix 5 API must be used for this device, the device must have 22.X
19 * firmware. This firmware is available in Tuner X after selecting Phoenix 5 in
20 * the firmware year dropdown.
21 */
23 /**
24 * On boot up, set position to zero.
25 */
27 /**
28 * On boot up, sync to the Absolute Position signal. The Absolute position signal will be signed according to the selected Absolute Sensor Range.
29 */
31 };
32
33 /**
34 * Class to handle routines specific to VelocityMeasPeriod
35 *
36 * @deprecated This device's Phoenix 5 API is deprecated for removal in the
37 * 2025 season. Users should update to Phoenix 6 firmware and migrate to the
38 * Phoenix 6 API. A migration guide is available at
39 * https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.
40 *
41 * If the Phoenix 5 API must be used for this device, the device must have 22.X
42 * firmware. This firmware is available in Tuner X after selecting Phoenix 5 in
43 * the firmware year dropdown.
44 */
45 class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
46 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
47 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
49 public:
50 /**
51 * String representation of specified SensorInitializationStrategy
52 * @param value CANCoderVelocityMeasPeriod to convert to a string
53 * @return string representation of SensorInitializationStrategy
54 */
55 static std::string toString(SensorInitializationStrategy value) {
56 switch (value) {
57 case BootToZero: return "On boot up, set position to zero.";
58 case BootToAbsolutePosition: return " On boot up, sync to the Absolute Position signal.";
59 default: return "InvalidValue";
60 }
61 }
62 };
63
64 } // namespace sensors
65 } // namespace phoenix
66} // namespace ctre
Class to handle routines specific to VelocityMeasPeriod.
Definition: SensorInitializationStrategy.h:48
static std::string toString(SensorInitializationStrategy value)
String representation of specified SensorInitializationStrategy.
Definition: SensorInitializationStrategy.h:55
SensorInitializationStrategy
Enum for how CANCoder should initialize its position register on boot.
Definition: SensorInitializationStrategy.h:22
@ BootToZero
On boot up, set position to zero.
Definition: SensorInitializationStrategy.h:26
@ BootToAbsolutePosition
On boot up, sync to the Absolute Position signal.
Definition: SensorInitializationStrategy.h:30
namespace ctre
Definition: paramEnum.h:5