FRCTeam3255 / 2024_Offbot_Code

Other
2 stars 0 forks source link

Combine all PrepTargetState logic into the beginning of tryState #64

Open ACat701 opened 2 months ago

ACat701 commented 2 months ago

It's really annoying to add more target states right now! All of the logic for them is repetitive and it makes it hard to create new target states. Implement the logic for the following:

public Command tryState(RobotState desiredState, StateMachine subStateMachine, Elevator subElevator, Intake subIntake,
      Transfer subTransfer, Shooter subShooter) {

    // TODO: Write this functionality in a later pr
    if (isGivenStateTargetState(desiredState)) {
      // functionality is always the same for a target state
      // if its amp then do something else
    }
TaylerUva commented 2 months ago

@ACat701 @Alenguye582 is this complete per the latest PR?

Alenguye582 commented 2 months ago

@ACat701 @Alenguye582 is this complete per the latest PR?

I don't think it is, @ACat701 can you confirm?

ACat701 commented 2 months ago

Its not complete. The idea here is to combine all of the cases that are target states in the giant switch case into one if statement, which hasn't happened