<commit_before>#include "subsystems/OperatorControl.h"

OperatorControl::OperatorControl(int port) {
  operatorJoystick_ = new Joystick(port);
  constants_ = Constants::GetInstance();
}

OperatorControl::~OperatorControl() {
  delete operatorJoystick_;
}

bool OperatorControl::GetControlLoopsSwitch() {
  return (operatorJoystick_->GetX() > 0.0);
}

bool OperatorControl::GetBrakeSwitch() {
  return (operatorJoystick_->GetY() < 0.0);
}

Intake::IntakePositions OperatorControl::GetIntakePositionSwitch() {
  bool axis = (operatorJoystick_->GetRawAxis((int)constants_->intakeUpPort) < 0.0);
  bool button = operatorJoystick_->GetRawButton((int)constants_->intakeDownPort);
  if (axis) {
    return Intake::INTAKE_UP;<commit_msg>Fixed error in reading the control loops switch<commit_after>#include "subsystems/OperatorControl.h"

OperatorControl::OperatorControl(int port) {
  operatorJoystick_ = new Joystick(port);
  constants_ = Constants::GetInstance();
}

OperatorControl::~OperatorControl() {
  delete operatorJoystick_;
}

bool OperatorControl::GetControlLoopsSwitch() {
  return !(operatorJoystick_->GetX() < -0.75);
}

bool OperatorControl::GetBrakeSwitch() {
  return (operatorJoystick_->GetY() < 0.0);
}

Intake::IntakePositions OperatorControl::GetIntakePositionSwitch() {
  bool axis = (operatorJoystick_->GetRawAxis((int)constants_->intakeUpPort) < 0.0);
  bool button = operatorJoystick_->GetRawButton((int)constants_->intakeDownPort);
  if (axis) {
    return Intake::INTAKE_UP;
{'fraction_non_alphanumeric': 0.13377926421404682, 'fraction_numerical': 0.008695652173913044, 'mean_word_length': 7.174863387978142, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 16, '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': '954563', 'n_tokens_mistral': 485, 'n_tokens_neox': 464, 'n_words': 76}