<commit_before>#include "OI.h"
#include "Commands/ControlIntakeWheels.h"
#include "Subsystems/IntakeWheel.h"
#include "Misc/ToggleClass.h"

/// Default constructor of the class.
ControlIntakeWheels::ControlIntakeWheels()
{
	IntakeArmPosition = new Toggle<bool>(false,true);
	Requires(IntakeWheel::GetInstance());
}

/// Called just before this Command runs the first time.
void ControlIntakeWheels::Initialize()
{
	IntakeWheel::GetInstance()->SpinIntake(0);
}


void ControlIntakeWheels::Execute()
{
	OI* oi = OI::GetInstance();

	//In and out control for the intake bar
	if(oi->gamepad->GetRawButton(BTN_INTAKE))
	{
		IntakeWheel::GetInstance()->SpinIntake(Preferences::GetInstance()->GetDouble("Intake Speed",1));
	}else if(oi->gamepad->GetRawButton(BTN_OUTAKE)){
		IntakeWheel::GetInstance()->SpinIntake(-Preferences::GetInstance()->GetDouble("Intake Speed",1));
	}else{
		IntakeWheel::GetInstance()->SpinIntake(0);
	}
}

/// Make this return true when this Command no longer needs to run execute().
/// \return always false since this is the default command and should never finish.
bool ControlIntakeWheels::IsFinished()
{
	return false;
}

/// Called once after isFinished returns true
void ControlIntakeWheels::End()
{
	IntakeWheel::GetInstance()->SpinIntake(0);
}

/// Called when another command which requires one or more of the same
/// subsystems is scheduled to run
void ControlIntakeWheels::Interrupted()
{
	End();
}
<commit_msg>Added a second throttle specifically for intake wheels out.<commit_after>#include "OI.h"
#include "Commands/ControlIntakeWheels.h"
#include "Subsystems/IntakeWheel.h"
#include "Misc/ToggleClass.h"

/// Default constructor of the class.
ControlIntakeWheels::ControlIntakeWheels()
{
	IntakeArmPosition = new Toggle<bool>(false,true);
	Requires(IntakeWheel::GetInstance());
}

/// Called just before this Command runs the first time.
void ControlIntakeWheels::Initialize()
{
	IntakeWheel::GetInstance()->SpinIntake(0);
}


void ControlIntakeWheels::Execute()
{
	OI* oi = OI::GetInstance();

	//In and out control for the intake bar
	if(oi->gamepad->GetRawButton(BTN_INTAKE))
	{
		IntakeWheel::GetInstance()->SpinIntake(Preferences::GetInstance()->GetDouble("Intake Speed",1));
	}else if(oi->gamepad->GetRawButton(BTN_OUTAKE)){
		IntakeWheel::GetInstance()->SpinIntake(Preferences::GetInstance()->GetDouble("Intake Speed Out",-1));
	}else{
		IntakeWheel::GetInstance()->SpinIntake(0);
	}
}

/// Make this return true when this Command no longer needs to run execute().
/// \return always false since this is the default command and should never finish.
bool ControlIntakeWheels::IsFinished()
{
	return false;
}

/// Called once after isFinished returns true
void ControlIntakeWheels::End()
{
	IntakeWheel::GetInstance()->SpinIntake(0);
}

/// Called when another command which requires one or more of the same
/// subsystems is scheduled to run
void ControlIntakeWheels::Interrupted()
{
	End();
}

{'fraction_non_alphanumeric': 0.13862397820163488, 'fraction_numerical': 0.0034059945504087193, 'mean_word_length': 5.878220140515222, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5698486', 'n_tokens_mistral': 964, 'n_tokens_neox': 934, 'n_words': 231}