Team997Coders / pyswerve_2024

0 stars 0 forks source link

High/Low speed toggle #43

Closed jamesra closed 6 months ago

jamesra commented 7 months ago

A switch to make the robot go faster or slower to increase controlability

jamesra commented 7 months ago

Here is a link to documentation for triggers. There are a few ways to do this. One way:

  1. Edit PhysicalConfig to replace max_drive_speed with a low speed and high speed setting
  2. Edit SwerveDrive to have a top speed property.
  3. Create a command that sets the SwerveDrive top speed property
  4. Bind commands to the switch to run the command once when a state transition (switch flip) occurs.

Fancier ways:

  1. Use a knob, leave Physical config alone, and scale the swerve drive's top speed property based on knob position.

I think the second is cooler, but will take more time. I'd argue whatever you can finish faster is better right now.