I know exactly the problem: make a boolean that triggers false when the arm action is initiated and set the PWMs to 127. So when the action is done, the boolean is turned true and you can drive again. The boolean has to be set to true again in the Arm function when the whole arm thing is done.
Code:
bool Drive = true;
{
if(Drive == false)
{
PWMSetNeutral();
Arm();
}
else
{
Drive();
}
Drive = Joystick->getRawButton(1);
}