Quasics2017Code/Ralph/src/Commands/SwingTurnForAngle.cpp
// Called just before this Command runs the first time
Called just before this Command runs the first time
Called just before this Command runs the first time
void SwingTurnForAngle::Initialize() {
	Robot::gyro->Reset();
	if (targetDegrees != 0) {
		if (targetDegrees > 180) {
			Robot::driveTrain->SetLeftPower(power);
			Robot::driveTrain->SetRightPower(0);
		} else{
			Robot::driveTrain->SetLeftPower(0);
			Robot::driveTrain->SetRightPower(power);
		}
	}
}
void SwingTurnForAngle :: Initialize ( ) { Robot :: gyro -> Reset ( ) ; if ( targetDegrees != 0 ) { if ( targetDegrees > 180 ) { Robot :: driveTrain -> SetLeftPower ( power ) ; Robot :: driveTrain -> SetRightPower ( 0 ) ; } else { Robot :: driveTrain -> SetLeftPower ( 0 ) ; Robot :: driveTrain -> SetRightPower ( power ) ; } } }
Called just before this Command runs the first time
Called just before this Command runs the first time