I disagree because calling the routine isn’t necessarily an error condition.
It is harmless.
This has nothing to due with sensor phase. Sensor phase is the relationship between the selected sensor’s direction and motor output. In the FX, the selected sensor (when integ is selected) is always in phase.
The test procedure is to select sensor phase, then drive positive motor output and confirm positive selected sensor velocity. This is what we document. This is what our examples reference. This has not changed. If you do this in FX, then you will find the test passes regardless of what bool you pass because we ensure they are in phase.
I suspect you didn’t setup your motor inverts correctly, meaning you want positive sensor velocity when the robot moves forward. Sensor phase has never been used to solve this situation. Use SetInverted to make positive-motor-output (and sensor velocity) occur when your mechanism moves forward/upwards.
This changes nothing. You still have to set your motor inverts so that forward is positive.
Your Talon SRXes, FXes, and Victor SPXes should be green when the robot drives forward.
If not, then the inverts are wrong.
I agree. They are being developed and will be merged soon. See FX branch below. FX examples will likely be in a sub-folder since they are essentially forks of the more generic examples.
Some references below.
Note that sensor phase only ensure sensor and motor output match (which they always do on FX). Then you call SetInverted to decide what direction you want positive sensor/motor-output to be.
Similar procedure here.
Test procedure below for how to align the motor and sensor phase. Again if this procedure was followed, it would passed.
I’m not against enhancing the docs/examples. This was on our schedule this week anyway @Jacob_C.
But I think some users treat “sensor phase” as “sensor direction”, which would be just arbitrarily flipping the sensor output. Remember there are 3 properties to track
- moving the robot forward/reverse
- motor output positive or negative
- sensor positive or negative
Sensor phase only addressed 2 <-> 3.
SetInverted addresses 1 <->[2,3].
Also note on all CTRE MCs, changing the SetInverted() input does not require changing setSensorPhase(). That’s the difference between sensor phase and sensor direction.