team581 / offseason-2023-charged-up

Team 581's main robot code for the 2023 offseason
Other
1 stars 0 forks source link

Ensure motor config values are being written on boot #23

Open jonahsnider opened 1 year ago

jonahsnider commented 1 year ago

We can configure motor settings in Phoenix Tuner, or in code. When you configure it in Phoenix Tuner, factory resetting the motor or replacing it will cause your settings to be lost. If you configure motor settings in code, you ensure that any motor provided will have the correct motor settings applied (ex. inversions, coast/brake mode, PID values, etc.)

There are a few spots where we don't explicitly set the config values on the motors (ex. wrist is assumed to be in brake mode). We should go through the codebase and ensure that we aren't assuming anything about the motor configuration.

jonahsnider commented 1 year ago

As a temporary fix, I made this change https://github.com/team581/offseason-2023-charged-up/commit/cc4ace2a73a3fff1b2393d38ef234f2ca8cdf73f which partially resolves this issue

jonahsnider commented 1 year ago

This can be implemented during the Phoenix v6 migration