while (IsOperatorControl()) { bool Button =joystick -> GetRawButton (3); if (Button) { Motor1->Set(1); } else if (!Button) { Motor1->Set(0); } }