Calling Set(double value) for TalonFX

If I call Set() with only one parameter, does it call it for the last used control mode or does it always use ctre::phoenix::motorcontrol::ControlMode::PercentOutput? Thanks

WPI_TalonSRX has a single-param set that uses PercentOutput underneath.
This way it works with all WPI_ interfaces.

The API docs for WPI_TalonFX for that function indicate it will always use %-output, because it is re-implemented from WPI_Base motor controller. EDIT: ozrien sniped me :slight_smile:

https://www.ctr-electronics.com/downloads/api/cpp/html/classctre_1_1phoenix_1_1motorcontrol_1_1can_1_1_w_p_i___talon_f_x.html#a871382b6ef12007db64372e6378bf484

The API docs are linked in “Additional resources” on their Read the Docs, https://phoenix-documentation.readthedocs.io/en/latest/ch23_AddResource.html

which you can get to from the Technical Resources tab on the Falcon/TalonFX page

1 Like