Quasics2017Code/Ralph/src/Commands/SwingTurnForAngle.cpp
// Make this return true when this Command no longer needs to run execute()
Make this return true when this Command no longer needs to run execute()
Make this return true when this Command no longer needs to run execute ()
bool SwingTurnForAngle::IsFinished() {
	Robot::gyro->ReadCurrentHeading();
	if (targetDegrees > 0) {	
		if (Robot::gyro->ReadCurrentHeading() >= targetDegrees) {
			return true;
		}else {
			return false;
		}
	} else {		
		if (Robot::gyro->ReadCurrentHeading() <= targetDegrees){
			return true;
		}else {
			return false;
		}
	}
}
bool SwingTurnForAngle :: IsFinished ( ) { Robot :: gyro -> ReadCurrentHeading ( ) ; if ( targetDegrees > 0 ) { if ( Robot :: gyro -> ReadCurrentHeading ( ) >= targetDegrees ) { return true ; } else { return false ; } } else { if ( Robot :: gyro -> ReadCurrentHeading ( ) <= targetDegrees ) { return true ; } else { return false ; } } }
Make this return true when this Command no longer needs to run execute()
Make this return true when this Command no longer needs to run execute ()
// We're turning to the right (to a positive heading) // We're turning to the left (to a negative heading)