Galaxia5987 / robot-2022

Other
2 stars 1 forks source link

Feature/climber #61

Closed GaiaZano05 closed 2 years ago

GaiaZano05 commented 2 years ago

The code of the subsystem Climber.

motors: TalonFX * 2

Commands:

closes #52

katzuv commented 2 years ago

A few notes about the commands which somehow don't appear here:

https://github.com/Galaxia5987/robot-2022/blob/4fcd2a5891aa829a92e40b785f8393ab222d8bae/src/main/java/frc/robot/subsystems/climber/commands/JoystickClimb.java#L35 I don't think Timer.getFPGATimestamp() will give you the desired result. The documentation says this function returns "the time since the FPGA started". The roboRIO boots up before the match starts so you can't know what the FPGA timestamp will be when the match ends. Instead, I recommend using Timer.getMatchTime(). Read the docs carefully though, it doesn't necessarily return the value you expect. https://github.com/Galaxia5987/robot-2022/blob/4fcd2a5891aa829a92e40b785f8393ab222d8bae/src/main/java/frc/robot/subsystems/climber/commands/ClimberStop.java#L22 Why is this condition necessary? Nothing bad will happen if the command will run in simulation. https://github.com/Galaxia5987/robot-2022/blob/4fcd2a5891aa829a92e40b785f8393ab222d8bae/src/main/java/frc/robot/subsystems/climber/commands/ClimberStop.java#L23-L25 Why do you toggle the stopper in that case?