Quasics2017Code/Nike/src/Commands/BaseCommands/Autonomous/PointTurnForAngleRaymond.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 PointTurnForAngle::Execute() {
	if (targetDegrees - fabs(Robot::driveBase->ReadCurrentHeading()) < 45){
		if (isAntiClockwise){
			Robot::driveBase->SetLeftPower(-.1);
			Robot::driveBase->SetRightPower(.1);
		} else {
			Robot::driveBase->SetLeftPower(.1);
			Robot::driveBase->SetRightPower(-.1);
		}
	}
	SmartDashboard::PutNumber("Current Angle", Robot::driveBase->ReadCurrentHeading());
}
void PointTurnForAngle :: Execute ( ) { if ( targetDegrees - fabs ( Robot :: driveBase -> ReadCurrentHeading ( ) ) < 45 ) { if ( isAntiClockwise ) { Robot :: driveBase -> SetLeftPower ( -.1 ) ; Robot :: driveBase -> SetRightPower ( .1 ) ; } else { Robot :: driveBase -> SetLeftPower ( .1 ) ; Robot :: driveBase -> SetRightPower ( -.1 ) ; } } SmartDashboard :: PutNumber ( " " , Robot :: driveBase -> ReadCurrentHeading ( ) ) ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run