Inverts the direction of the motor’s rotation. Only works in PercentVbus mode.
Has this been changed in a recent firmware update, or is the javadoc wrong? setInverted certainly has worked in velocity closed-loop mode for us (as well it should - having to call both reverseSensor() and reverseOutput() would be terrible design!).
Sorry for the late reply, but in our experience one of reverseSensor or reverseOutput doesn’t work (in PercentVBus mode at least) and we have to play around with the one that works and setInverted to get the motors and the encoders in phase.
Hope this helps
Greg
setInverted works in everything except Motion Profiling mode.
reverseOutput works in everything except percentVBus mode.
The result is that there is no single setting that will invert a motor in all possible control modes, which is most definitely a bug (or ill-designed feature).
Additionally, the system is actually overdetermined in non-MP closed-loop modes; you have three boolean flags (inverted, reverseSensor, reverseOutput) for two underlying booleans (sensor phase and motor direction), and so there are multiple equivalent configurations. This is also a bug, in my opinion.
I contacted CTRE about this some time ago, and was informed that the whole confusing mess is going to be gone in the next major firmware update, so it’s all moot. For now, I believe the best solution is to simply “taboo” the setInverted method (effectively forcing you to accept the “terrible design” mentioned in the OP), thus fixing the “overdetermined” problem, and if you want to invert a motor in VBus mode, do it manually in your own code. This is ugly, but the current API does not offer any non-ugly solution.