Enabling Talon SRX Brake Mode Java


So my team is trying to use talons to drive the robot, and in previous years we were able to use the talon.setBrakeMode(true) to enable brake mode, and that method seems to have disappeared from the documentation for this year. The software reference manual seems to have not been updated since last year, as it still refers to this method.

Any ideas?

The new way of setting brake/coast mode is talon.setNeutralMode(). For brake mode, it would be talon.setNeutralMode(NeutralMode.Brake), and coast is talon.setNeutralMode(NeutralMode.Coast).
This year’s documentation is hosted on the Phoenic readthedocs site.

1 Like

A lot of methods have changed from last year to this year.

Check out the Migration Guide from CTRE

That migration guide is from last year (i.e. migrating from 2 years ago now to last year’s libraries).

Relatively little has changed this year in CTRE’s libraries.

Relatively little has changed this year in CTRE’s libraries.

I wouldn’t say that, considering the shift in talon control mentioned in my OP.

There was no setBrakeMode method last year either.

According to the SRM, and all software mentors on my team, there was. I don’t recall ever using it (because the webdash made it a tiny bit easier), but it was there.

Here is the BaseMotorController class from last year’s Phoenix libraries during the season:

There is no setBrakeMode method there.

Even looking at the 2017 docs, there’s no setBrakeMode method, but there was an enableBrakeMode it seems: https://www.ctr-electronics.com/downloads/api/archive_4.4.X/java/html/com/ctre/CANTalon.html#enableBrakeMode-boolean-

Looks like it was the setNeutralMode(NeutralMode.BLAH) method.