It’s hard to really tell what’s going on and what needs to happen based off of your post, but I’ll try to give some suggestions.
You may already be doing this, but I highly suggest that you use WPILib’s built in drive classes. You’ll probably want to use DifferentialDrive, so long as you have a normal non-holonomic chassis.
That being said, since you already use the arcadeDrive method, you may already be using this, though I’m not sure that your understanding of the parameters is correct.
From your post, it looks like you are trying to create two separate commands, one for spinning and one for driving straight. If this is correct, is there a reason for this? It typically makes the most sense to use one command for all driver controlled driving, unless you never foresee wanting to drive forward and turn at the same time. The Screensteps has some information on this if you need help.
For spinning: where did the drive method come from? Did you write it? What is its second parameter and why did you set it to 1? If you were to use the arcadeDrive method from DifferentialDrive, you could easily spin using MainDrive.arcadeDrive(0, 0.5); where 0.5 is your turning speed.
For driving straight: it sounds like your goal here is to move a short distance then stop, like in a line-cross auto routine. As far as I can tell without your full code, this will keep the robot driving at full speed forever, until a new command is started. If you are using the arcadeDrive method from DifferentialDrive, the parameters are values from -1 to 1, and they set the motors at that speed. It seems like you are using 10 as a distance setting, while DifferentialDrive will regard this as a speed setting. If you want to drive for just a short distance, you’ll need to use a timer and check each loop if you have been driving longer than some time, then stop the motors.
If you are trying to write a line-crossing auto routine, check out 1619’s project line cross. There is already a simple line-crossing auto routine written for iterative programming, and I’m sure that a command based routine will be added sometime.
I’m not sure if I understood your question correctly or if my answer makes any sense, but please ask for clarification if needed. Also, it is a lot easier for us to help you if you post code with your question, including the implementation of methods like drive and arcadeDrive, unless they are from WPI.