Quick Question
In phoenix 5 we used to the call .GetActiveTrajectoryPosition() on a Falcon and compare it to the motion magic setpoint (we would save the setpoint into a member variable when we stared the motion magic move) so that we could determine if the motion magic profile setpoint had finished moving (ie the profile had finished)
We used code like this in the isFinished method of a command
We can see a .getMotionMagicIsRunning() method, but not sure if this could be used as the control mode is still motion magic even after the profile finished.
Also we couldn’t work out what to compare this to. We tried ctre::phoenix6::signals::MotionMagicIsRunningValue::Enabled
but that doesn’t work.
The API migration guide refers to ClosedLooopReference being the equivalent of activeTrajectory but if you search the phoenix C++ API for ClosedLoppReference nothing comes up.
So still looking for the solution.
It is so frustrating trying to migrate from Phoenix 5 to Phoenix 6. I really wish there was a one to one guide for migrating between the two that had every command that was used in Phoenix 5.
One step closer.
You need to search for GetClosedLoopReference not CloseLoopReference
This returns a
ClosedLoopReference Status Signal object
Now just need to work out how to make a ClosedLoopReference Status Signal object' that has a setpoint of m_TurretSetPointPosition` so that we can compare the two.