Class LegacySwerveDrivetrain.OdometryThread
java.lang.Object
com.ctre.phoenix6.mechanisms.swerve.LegacySwerveDrivetrain.OdometryThread
- Enclosing class:
- LegacySwerveDrivetrain
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected doubleprotected intprotected intprotected doubleprotected final LinearFilterprotected final BaseStatusSignal[]protected booleanprotected final Threadprotected final MedianFilterprotected static final intprotected intprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidrun()voidsetThreadPriority(int priority) Sets the DAQ thread priority to a real time priority under the specified priority levelvoidstart()Starts the odometry thread.voidstop()Stops the odometry thread.voidstop(long millis) Stops the odometry thread with a timeout.
-
Field Details
-
START_THREAD_PRIORITY
- See Also:
-
m_thread
-
m_running
-
m_allSignals
-
peakRemover
-
lowPass
-
lastTime
-
currentTime
-
averageLoopTime
-
SuccessfulDaqs
-
FailedDaqs
-
lastThreadPriority
-
threadPriorityToSet
-
-
Constructor Details
-
OdometryThread
public OdometryThread()
-
-
Method Details
-
start
Starts the odometry thread. -
stop
Stops the odometry thread. -
stop
Stops the odometry thread with a timeout.- Parameters:
millis- The time to wait in milliseconds
-
run
-
odometryIsValid
-
setThreadPriority
Sets the DAQ thread priority to a real time priority under the specified priority level- Parameters:
priority- Priority level to set the DAQ thread to. This is a value between 0 and 99, with 99 indicating higher priority and 0 indicating lower priority.
-