configureButtonBindings runs once in the RobotContainer constructor. So you can’t put logic in there that needs to execute at runtime. The code that you have will always run turnComand when mechButton2 is pressed, since state will always be 0 at robot startup. There’s a few options.
If it’s as simple as running two different commands, you could use a ConditionalCommand.
If you want to select between a few different commands, you could use a SelectCommand.
Or you could put your logic in the initialize method of a command, and put the logic based on each state in the execute method.
For the first two options, the state should be contained in the turret subsystem and passed to the command with a lambda, so that the current state is captured when the command is scheduled. For the third option, the state could be contained in the command, as long as you’re only making one instance of it or the state is declared static.
As a general “rule”, we try to avoid things that make the drivers remember state. Rather then have the driver press a button several times to get something to move to the right place, have multiple buttons that the driver can press to go to the right position. It makes for less things to remember during the match while there’s a lot going on. We do occasionally break the “rule” but only if the state of the robot is obvious by looking at the robot from an orientation (ie a very large gripper that is either open or closed).