4H-ALARM / 2024-Hydra

Other
0 stars 2 forks source link

Use command template when creating new commands #4

Open ALARM-Robotics opened 9 months ago

ALARM-Robotics commented 9 months ago

When creating new commands we should use the right click on commands folder selection of the create new command. This automatically creates a skeleton command, filling in the methods that need to be overridden from the base class.

Most important is the "isFinished" method which in the base class always returns false. This means the command never exits and remains in the scheduler. For commands that set a motor for instance (e.g. turning to shooter on or off) it should return true directly as once set the motor speed is maintained until a new speed is set. For other commands that need to keep checking for completion the logic should be in the isFInished method to check sensors or time for completion