FRC-1799 / 2023-Competion-Bot-Code

This is the Code for the 2023 season robot
Other
0 stars 0 forks source link

Subclassed balance command #27

Closed bakedPotatoLord closed 1 year ago

bakedPotatoLord commented 1 year ago

refactors the code to simplify it and improve readability. The changes are as follows:

The class extends RunCommand instead of CommandBase, which simplifies the code by using a functional interface. The execute() method is replaced with a lambda function that drives the robot with a PID controller. This removes the need for an isFinished() method since the command is run continuously.

Overall, the changes simplify the code and make it easier to modify and maintain.