CTRE Phoenix C++ 5.33.1
MotionProfileStatus.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
6
7namespace ctre {
8namespace phoenix {
9namespace motion {
10
11/**
12 * Motion Profile Status
13 * This is simply a data transer object.
14 */
16 /**
17 * The available empty slots in the trajectory buffer.
18 *
19 * The robot API holds a "top buffer" of trajectory points, so your applicaion
20 * can dump several points at once. The API will then stream them into the Talon's
21 * low-level buffer, allowing the Talon to act on them.
22 */
24 /**
25 * The number of points in the top trajectory buffer.
26 */
28 /**
29 * The number of points in the low level Talon/Victor buffer.
30 */
32 /**
33 * Set if isUnderrun ever gets set.
34 * Can be manually cleared by ClearMotionProfileHasUnderrun() or automatically cleared by StartMotionProfile().
35 * @see clearMotionProfileHasUnderrun()
36 */
38 /**
39 * This is set if Talon/Victor needs to shift a point from its buffer into
40 * the active trajectory point however the buffer is empty. This gets cleared
41 * automatically when is resolved.
42 */
44 /**
45 * True if the active trajectory point is not empty, false otherwise.
46 * The members in activePoint are only valid if this signal is set.
47 */
49
50 /**
51 * True if the active trajectory point is the last point of the profile
52 */
53 bool isLast;
54
55 /**
56 * The selected PID[0] profile slot of current profile
57 */
59
60 /**
61 * The selected auxiliary PID[1] profile slot of current profile
62 */
64
65 /**
66 * The current output mode of the motion profile executer (disabled, enabled, or hold).
67 * When changing the set() value in MP mode, it's important to check this signal to
68 * confirm the change takes effect before interacting with the top buffer.
69 */
71
72 /** The applied duration of the active trajectory point */
74};
75
76} // namespace motion
77} // namespace phoenix
78} // namespace ctre
79
SetValueMotionProfile
Definition: SetValueMotionProfile.h:8
namespace ctre
Definition: paramEnum.h:5
Motion Profile Status This is simply a data transer object.
Definition: MotionProfileStatus.h:15
int profileSlotSelect1
The selected auxiliary PID[1] profile slot of current profile.
Definition: MotionProfileStatus.h:63
size_t topBufferCnt
The number of points in the top trajectory buffer.
Definition: MotionProfileStatus.h:27
ctre::phoenix::motion::SetValueMotionProfile outputEnable
The current output mode of the motion profile executer (disabled, enabled, or hold).
Definition: MotionProfileStatus.h:70
size_t topBufferRem
The available empty slots in the trajectory buffer.
Definition: MotionProfileStatus.h:23
bool isLast
True if the active trajectory point is the last point of the profile.
Definition: MotionProfileStatus.h:53
int timeDurMs
The applied duration of the active trajectory point.
Definition: MotionProfileStatus.h:73
int btmBufferCnt
The number of points in the low level Talon/Victor buffer.
Definition: MotionProfileStatus.h:31
int profileSlotSelect0
The selected PID[0] profile slot of current profile.
Definition: MotionProfileStatus.h:58
bool activePointValid
True if the active trajectory point is not empty, false otherwise.
Definition: MotionProfileStatus.h:48
bool isUnderrun
This is set if Talon/Victor needs to shift a point from its buffer into the active trajectory point h...
Definition: MotionProfileStatus.h:43
bool hasUnderrun
Set if isUnderrun ever gets set.
Definition: MotionProfileStatus.h:37