Flywheels: Check to see if motor configs are applied properly#204
Flywheels: Check to see if motor configs are applied properly#204
Conversation
…f this has failed. If it has, try to apply it at least 5 times with a slightly extend timeout of 30 miliseconds before giving up and continuing on with its' business.
There was a problem hiding this comment.
Code Review
This pull request refactors the TalonFX motor configuration in the Flywheels subsystem by introducing a new applyConfig helper method. This method implements a retry mechanism with a timeout for applying configurations, logging successful applications and reporting critical errors if all attempts fail. Feedback suggests that the MAX_APPLY_CONFIG_ATTEMPTS and MAX_APPLY_CONFIG_TIMEOUT constants should be static final, with MAX_APPLY_CONFIG_ATTEMPTS being an int. Additionally, the applyConfig method should be made private for better encapsulation, and its logging messages should be more specific, including the motor ID. The error message for failed configurations should also utilize the MAX_APPLY_CONFIG_ATTEMPTS constant instead of a hardcoded value.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a more robust motor configuration process by implementing a retry mechanism with logging and error reporting in the Flywheels subsystem. The feedback focuses on aligning the configuration timeout with the pull request description, ensuring constants and variables follow standard Java naming conventions, and correcting minor typos and string formatting in the log messages.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request enhances the Flywheels subsystem by implementing a more robust configuration application process for TalonFX motor controllers. It introduces a retry mechanism for applying configurations, complete with logging for successful applications and critical error reporting for failures. The reviewer suggests making the newly added configuration constants static to optimize memory usage.
Description: When applying motor configuations, we now check to see if this has failed. If it has, try to apply it at least 5 times with a default of 10 miliseconds before giving up and continuing on with its' business.
Maybe another pr for all other subsystems later.