frc3512 / Robot-2020

The source code for the 2020 FRC robot.
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Set drivetrain CANSparkMaxes to coast mode when robot is disabled #156

Closed calcmogul closed 3 years ago

calcmogul commented 3 years ago

This will make the robot easier to push for positioning. We can set them back to brake mode when the robot's enabled since the controllers assume/require that.

It should only set coast mode after being in disabled for some timeout so the robot stops immediately when disabled.

KyleQ1 commented 3 years ago

You can use this function to set coast or brake mode of the CanSparkMax. https://www.revrobotics.com/content/sw/max/sw-docs/cpp/classrev_1_1_c_a_n_spark_max.html#a27ea5da86e91e6ba2157df1aa54a51d9