Quasics2017Code/Nike/src/Commands/BaseCommands/Teleop/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(LeftTriggerX) && previousButton) {
		if (isOn) {
			Robot::climberSystem->TurnOff();
			isOn = false;
		} else {
			Robot::climberSystem->Climb();
			isOn = true;
		}
	}
	previousButton = Robot::oi->getAuxStick()->GetRawButton(LeftTriggerX);
}
void ClimberTeleop :: Execute ( ) { if ( ! Robot :: oi -> getAuxStick ( ) -> GetRawButton ( LeftTriggerX ) && previousButton ) { if ( isOn ) { Robot :: climberSystem -> TurnOff ( ) ; isOn = false ; } else { Robot :: climberSystem -> Climb ( ) ; isOn = true ; } } previousButton = Robot :: oi -> getAuxStick ( ) -> GetRawButton ( LeftTriggerX ) ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run