Quasics2016Code/SimpleRobot/src/Commands/TwoPersonIntake.cpp
// Called repeatedly when this Command is scheduled to run

Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
void TwoPersonIntake::Execute() {
	bool isMoving = false;
	if (Robot::oi->getIntakeStick()->GetRawButton(1)
			&& !Robot::oi->getIntakeStick()->GetRawButton(3)) {
		Robot::intake->SetPower(Intake::kOutput);
		isMoving = true;
	} else if (!Robot::oi->getIntakeStick()->GetRawButton(1)
			&& Robot::oi->getIntakeStick()->GetRawButton(3)) {
		Robot::intake->SetPower(Intake::kIntake);
		isMoving = true;
	} else {
		Robot::intake->StopIntake();
		isMoving = false;
	}
		Robot::intake->PistonControl(Robot::oi->getIntakeStick()->GetRawButton(2));
}
void TwoPersonIntake :: Execute ( ) { bool isMoving = false ; if ( Robot :: oi -> getIntakeStick ( ) -> GetRawButton ( 1 ) && ! Robot :: oi -> getIntakeStick ( ) -> GetRawButton ( 3 ) ) { Robot :: intake -> SetPower ( Intake :: kOutput ) ; isMoving = true ; } else if ( ! Robot :: oi -> getIntakeStick ( ) -> GetRawButton ( 1 ) && Robot :: oi -> getIntakeStick ( ) -> GetRawButton ( 3 ) ) { Robot :: intake -> SetPower ( Intake :: kIntake ) ; isMoving = true ; } else { Robot :: intake -> StopIntake ( ) ; isMoving = false ; } Robot :: intake -> PistonControl ( Robot :: oi -> getIntakeStick ( ) -> GetRawButton ( 2 ) ) ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run