001package com.ctre.phoenix.motion; 002 003/** 004 * Motion Profile Status This is simply a data transer object. 005 */ 006public class MotionProfileStatus { 007 /** 008 * The available empty slots in the trajectory buffer. 009 * 010 * The robot API holds a "top buffer" of trajectory points, so your 011 * applicaion can dump several points at once. The API will then stream them 012 * into the Talon's low-level buffer, allowing the Talon to act on them. 013 */ 014 public int topBufferRem; 015 /** 016 * The number of points in the top trajectory buffer. 017 */ 018 public int topBufferCnt; 019 /** 020 * The number of points in the low level Talon/Victor buffer. 021 */ 022 public int btmBufferCnt; 023 /** 024 * Set if isUnderrun ever gets set. Only is cleared by 025 * clearMotionProfileHasUnderrun() to ensure robot logic can react or 026 * instrument it. 027 * 028 * @see com.ctre.phoenix.motorcontrol.can.BaseMotorController#clearMotionProfileHasUnderrun(int) 029 */ 030 public boolean hasUnderrun; 031 /** 032 * This is set if Talon/Victor needs to shift a point from its buffer into the 033 * active trajectory point however the buffer is empty. This gets cleared 034 * automatically when is resolved. 035 */ 036 public boolean isUnderrun; 037 /** 038 * True if the active trajectory point is not empty, false otherwise. The 039 * members in activePoint are only valid if this signal is set. 040 */ 041 public boolean activePointValid; 042 043 /** 044 * True if the active trajectory point is the last point of the profile 045 */ 046 public boolean isLast; 047 048 /** 049 * The selected PID[0] profile slot of current profile 050 */ 051 public int profileSlotSelect; 052 /** 053 * The current output mode of the motion profile executer (disabled, 054 * enabled, or hold). When changing the set() value in MP mode, it's 055 * important to check this signal to confirm the change takes effect before 056 * interacting with the top buffer. 057 */ 058 public SetValueMotionProfile outputEnable; 059 060 /** 061 * The duration in ms of current trajectory point 062 */ 063 public int timeDurMs; 064 065 /** 066 * The selected auxiliary PID[1] profile slot of current profile 067 */ 068 public int profileSlotSelect1; 069}