Autonomous command performs the wrong solenoid command

Some backstory

Our team’s (6593) robot uses an arm, that uses solenoids to extend/retract, and grab/release objects.

To perform these actions, we use InstantCommand’s and bind them to buttons on a joystick. During our autonomous period, we used a SequentialCommand to raise the arm, extend the arm, and release the object.

However, the autonomous sequential command did not perform the arm extention, and arm releasing commands. We couldn’t figure out why it wasn’t performing those commands, but when we rewrote those InstantCommands into regular commands, it performed the arm extension and arm opening commands… sort of.

The problem

In our Autonomous command (sequential command) we call multiple commands, followed by an “ArmOpen” command (it opens the arm, releasing the object). However, when the auton command is run, instead of opening the arm, it extends it instead.

We have double checked that our code is correct and we have the correct sol channels. During teleop, our arm open/release, and extend/retract commands work exactly as they are supposed to. Each button is binded to the correct command and work perfectly, but for whatever reason, it refuses to work during autonomous.

Calling a different command to release the arm doesn’t work either, the arm just does nothing, only arm open/close commands work (which again, do not actually open or close the arm during auto, it just extends it out, or retracts).

Me and the other programmers are at a loss here.
ArmOpen command (releases game object)

AutoHomingPosition command (this ‘homes’ the robot)

AutoHumanStation command, this raises the arm up, in conjunction with our elevator

AutonomousScoring command, this is the sequential command, that calls all the other commands listed above during auto

Take a look at lines 168 to 177 in your RobotContainer. The comments say the commands are not working properly even in teleop. One comment states that ArmOpen extends instead, just like you are seeing in auto. Perhaps you think they are working in teleop because there are four buttons that together do all the right things, but in reality they are not mapped as designed.

Thanks for bringing that to my attention, those comments you saw in RobotContainer are outdated, and I forgot to remove them. All of the solenoid commands work as expected during teleop, but not auto. Every button is mapped correctly to their corresponding commands.