<commit_before>package org.inceptus.OI;

import edu.wpi.first.wpilibj.can.CANTimeoutException;
import org.inceptus.chassis.Drive;
import org.inceptus.chassis.LowerConveyor;
import org.inceptus.chassis.Ramp;
import org.inceptus.debug.Debug;


/**
 *
 * @author innoying
 */
public class OI {
    //Joysticks
    private InJoystick mainJoy;
    private InJoystick otherJoy;
    
    public boolean init(){
        //Init the joysticks
        mainJoy = new InJoystick(1);
        otherJoy = new InJoystick(2);
        
        //Return Success
        return true;
    }
    
    public boolean driveWithJoy(Drive drive){
        
        //Drive
        drive.driveWithValues(
                mainJoy.getScaledX(), 
                mainJoy.getScaledY(), 
                mainJoy.getScaledTwist()
        );
        
        //Return Success
        return true;
        
    }

    public void moveRamp(Ramp ramp) {
        
        //If the ramp button is pressed
        if(mainJoy.getRawButton(5)){
            ramp.moveDown();
        }else{
            ramp.moveUp();
        }
    }
    
    
    public void moveLowerConveyor(LowerConveyor lowerConveyor){
        
        //Try catch for errors
        try {
            //If the ramp button is pressed
            if(mainJoy.getRawButton(4)){
                lowerConveyor.moveDown();
            }else if(mainJoy.getRawButton(3)){
                lowerConveyor.moveUp();
            }else{
                lowerConveyor.stop();
            }
        } catch (CANTimeoutException ex) { //Catch CANTimeout Error
            
            //Print Error
            Debug.fatal(ex, "CAN Timeout in lowerConveyor");

        } catch (Exception ex){ //Catch all for errors

            //Print Error
            Debug.fatal(ex, "Unknown error in lowerConveyor");

        }
    }
}<commit_msg>Updated OI<commit_after>package org.inceptus.OI;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.can.CANTimeoutException;
import org.inceptus.camera.TargetFinder;
import org.inceptus.chassis.Drive;
import org.inceptus.chassis.LowerConveyor;
import org.inceptus.chassis.Ramp;
import org.inceptus.debug.Debug;


/**
 *
 * @author innoying
 */
public class OI {
    //Joysticks
    private InJoystick mainJoy;
    private Joystick otherJoy;
    
    public boolean init(){
        //Init the joysticks
        mainJoy = new InJoystick(1);
        otherJoy = new Joystick(2);
        
        //Return Success
        return true;
    }
    
    public boolean driveWithJoy(Drive drive){
        
        //Drive
        drive.driveWithValues(
                mainJoy.getScaledX(), 
                mainJoy.getScaledY(), 
                mainJoy.getScaledTwist()
        );
        
        //Return Success
        return true;
        
    }

    public void moveRamp(Ramp ramp) {
        
        //If the ramp button is pressed
        if(mainJoy.getRawButton(5)){
            ramp.moveDown();
        }else{
            ramp.moveUp();
        }
    }
    
    public void updateCamera(TargetFinder targetFinder){
        //If the process image button is pressed
        if(otherJoy.getRawButton(10)){
            //Get a new image
            targetFinder.processImage();
        }
    }
    
    
    public void moveLowerConveyor(LowerConveyor lowerConveyor){
        
        //Try catch for errors
        try {
            //If the conveyor button is pressed
            if(mainJoy.getRawButton(4)){
                lowerConveyor.moveDown();
            }else if(mainJoy.getRawButton(3)){
                lowerConveyor.moveUp();
            }else{
                lowerConveyor.stop();
            }
        } catch (CANTimeoutException ex) { //Catch CANTimeout Error
            
            //Print Error
            Debug.fatal(ex, "CAN Timeout in " + this.getClass().getName());

        } catch (Exception ex){ //Catch all for errors

            //Print Error
            Debug.fatal(ex, "Unknown error in " + this.getClass().getName());

        }
    }
}
{'fraction_non_alphanumeric': 0.09667823500247893, 'fraction_numerical': 0.002974714923153198, 'mean_word_length': 1.6150356448476992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '940679', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1161, 'n_words': 254}