Quasics2017Code/Ralph/src/Commands/ClimberTeleop.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 ClimberTeleop::Execute() {
	if (!Robot::oi->getAuxStick()->GetRawButton(ClimberButton) && lastButton) {
		if (Robot::climber->GetPower() == 0) {
			Robot::climber->TurnOn(-1);
		} else {
			Robot::climber->TurnOn(0);
		}
	}
	lastButton = Robot::oi->getAuxStick()->GetRawButton(ClimberButton);
}
void ClimberTeleop :: Execute ( ) { if ( ! Robot :: oi -> getAuxStick ( ) -> GetRawButton ( ClimberButton ) && lastButton ) { if ( Robot :: climber -> GetPower ( ) == 0 ) { Robot :: climber -> TurnOn ( -1 ) ; } else { Robot :: climber -> TurnOn ( 0 ) ; } } lastButton = Robot :: oi -> getAuxStick ( ) -> GetRawButton ( ClimberButton ) ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run