|
pass a value to a command.
I have a command that spins the robot x degrees from current gyro heading. I can use a smartdashboard.getnumber when I'm in teleop. I would like to use this command not referencing the smartdashboard in autonomous passing unique x degrees at different steps. When I add a double to one of the the addsequential(new command(90)) it asked me to add a parameter to the command. I said yes and use this not the smartdashboard.get. I then add a value to each ...(new command(#)). After hours of test and debugging I found the each of the commands reacts as the last ...(new command(#)).
I hope the rambling makes sense. I can try and post some sample code when I'm back to the development pc.
|