<commit_before>package team2869.bethpage.robotics.aerialassist;

/**
 * The RobotMap is a mapping from the ports sensors and actuators are wired into
 * to a variable name. This provides flexibility changing wiring and also makes 
 * checking the wiring easier.
 */
public class RobotMap {
    // Joysticks: This is the mapping of the joystick ports in the computer.
    public static final int MECANUM_STICK_PORT = 1,
                            ROTATE_STICK_PORT = 2;
    
    // Motors: This is the mapping of motors ports marked PWM on the DIO board
    public static final int FRONT_LEFT_PORT = 2,
                            FRONT_RIGHT_PORT = 1,
                            REAR_LEFT_PORT = 4,
                            REAR_RIGHT_PORT = 3;
    
    public static final int WIND_LEFT_PORT = 5,
                            WIND_RIGHT_PORT = 6;
    
    public static final int RELAY_PORT = 1;
    
    // Sensors: This is the mapping of the analog ports on the analog module
    // to the relevant sensors.
    public static final int ULTRASONIC_RANGEFINDER = 1,
                            LIMIT_SWITCH = 1;
    
    // Buttons: This is the mapping of the buttons on the main joystick.
    public static final int SPIN_BUTTON = 2,
                            STOP_BUTTON = 3,
                            HALF_BUTTON = 4;
    
    public static final int TURN_RIGHT_BUTTON = 5,
                            TURN_LEFT_BUTTON = 6,
                            TURN_BACK_BUTTON = 7;
    
    public static final int INVERTED_DRIVE_BUTTON = 8;
    
    public static final int AUTOMATEWIND_BUTTON = 9;
    public static final int STARTWIND_BUTTON = 10;
    public static final int OPERATORWIND_BUTTON = 11;
    public static final int SHOOTBALL_BUTTON = 12;
    
    // Constants: This is the mapping of all required constants.
    public static final double VOLT_DISTANCE_SLOPE = .0096560282;
    public static final double VOLT_DISTANCE_INTERCEPT = -.0015728398;
    
    public static final double DISTANCE_CLICK_QUADRATIC = .5;
    public static final double DISTANCE_CLICK_SLOPE = .5;
    public static final double DISTANCE_CLICK_INTERCEPT = .5;
    
    public static final double INCHES_CM_CONVERSION = 2.54;
    
    public static final double AUTONOMOUS_DISTANCE = 72;
    public static final double AUTONOMOUS_X_SPEED = 0.1;
    public static final double AUTONOMOUS_Y_SPEED = 0.5;
    public static final double AUTONOMOUS_WAIT_TIME = 2;
    
    public static final double MAX_SHOOT_DISTANCE = 192;
    public static final double MIN_SHOOT_DISTANCE = 48;
    
    public static final int MAX_CLICKS = 12;
    public static final double [] MAX_CLICK_INTERVAL = {0.5,0.6,0.7,0.8,0.9,1};
    
    public static final double SHOOT_TIME = 3;
    public static final double RESET_TIME = 0.5;
    
    public static final double STARTWIND_TIMEOUT_TIME = 5;
    public static final double OPERATORWIND_TIMEOUT_TIME = 5;
    
    // Image constants: All constants used in image processing.
    
    public static final int Y_IMAGE_RES = 480;
    public static final double VIEW_ANGLE = 49;
    public static final int RECTANGULARITY_LIMIT = 40;
    public static final int ASPECT_RATIO_LIMIT = 55;
    public static final int TAPE_WIDTH_LIMIT = 40;
    public static final int VERTICAL_SCORE_LIMIT = 50;
    public static final int LR_SCORE_LIMIT = 50;
    public static final int AREA_MINIMUM = 150;
    public static final int MAX_PARTICLES = 8;
                            
}<commit_msg>Added a print method to RobotMap.<commit_after>package team2869.bethpage.robotics.aerialassist;

/**
 * The RobotMap is a mapping from the ports sensors and actuators are wired into
 * to a variable name. This provides flexibility changing wiring and also makes 
 * checking the wiring easier.
 */
public class RobotMap {
    // Joysticks: This is the mapping of the joystick ports in the computer.
    public static final int MECANUM_STICK_PORT = 1,
                            ROTATE_STICK_PORT = 2;
    
    // Motors: This is the mapping of motors ports marked PWM on the DIO board
    public static final int FRONT_LEFT_PORT = 2,
                            FRONT_RIGHT_PORT = 1,
                            REAR_LEFT_PORT = 4,
                            REAR_RIGHT_PORT = 3;
    
    public static final int WIND_LEFT_PORT = 5,
                            WIND_RIGHT_PORT = 6;
    
    public static final int RELAY_PORT = 1;
    
    // Sensors: This is the mapping of the analog ports on the analog module
    // to the relevant sensors.
    public static final int ULTRASONIC_RANGEFINDER = 1,
                            LIMIT_SWITCH = 1;
    
    // Buttons: This is the mapping of the buttons on the main joystick.
    public static final int SPIN_BUTTON = 2,
                            STOP_BUTTON = 3,
                            HALF_BUTTON = 4;
    
    public static final int TURN_RIGHT_BUTTON = 5,
                            TURN_LEFT_BUTTON = 6,
                            TURN_BACK_BUTTON = 7;
    
    public static final int INVERTED_DRIVE_BUTTON = 8;
    
    public static final int AUTOMATEWIND_BUTTON = 9;
    public static final int STARTWIND_BUTTON = 10;
    public static final int OPERATORWIND_BUTTON = 11;
    public static final int SHOOTBALL_BUTTON = 12;
    
    // Constants: This is the mapping of all required constants.
    public static final double VOLT_DISTANCE_SLOPE = .0096560282;
    public static final double VOLT_DISTANCE_INTERCEPT = -.0015728398;
    
    public static final double DISTANCE_CLICK_QUADRATIC = .5;
    public static final double DISTANCE_CLICK_SLOPE = .5;
    public static final double DISTANCE_CLICK_INTERCEPT = .5;
    
    public static final double INCHES_CM_CONVERSION = 2.54;
    
    public static final double AUTONOMOUS_DISTANCE = 72;
    public static final double AUTONOMOUS_X_SPEED = 0.1;
    public static final double AUTONOMOUS_Y_SPEED = 0.5;
    public static final double AUTONOMOUS_WAIT_TIME = 2;
    
    public static final double MAX_SHOOT_DISTANCE = 192;
    public static final double MIN_SHOOT_DISTANCE = 48;
    
    public static final int MAX_CLICKS = 12;
    public static final double [] MAX_CLICK_INTERVAL = {0.5,0.6,0.7,0.8,0.9,1};
    
    public static final double SHOOT_TIME = 3;
    public static final double RESET_TIME = 0.5;
    
    public static final double STARTWIND_TIMEOUT_TIME = 5;
    public static final double OPERATORWIND_TIMEOUT_TIME = 5;
    
    // Image constants: All constants used in image processing.
    
    public static final int Y_IMAGE_RES = 480;
    public static final double VIEW_ANGLE = 49;
    public static final int RECTANGULARITY_LIMIT = 40;
    public static final int ASPECT_RATIO_LIMIT = 55;
    public static final int TAPE_WIDTH_LIMIT = 40;
    public static final int VERTICAL_SCORE_LIMIT = 50;
    public static final int LR_SCORE_LIMIT = 50;
    public static final int AREA_MINIMUM = 150;
    public static final int MAX_PARTICLES = 8;
                            
    private static String DIVIDER="\n--------------------------\n\n";

    /**
     * Produces a String representation of all the constants associated with the drive train.
     * TODO: Move Drive train constants to this class instead of the constructor calls for PCJ.
     * @return A String formatted with one value per line, in the format:<pre>
     * x=5
     * y=10
     * q=32.4
     * </pre>
     */
    public static String printDriveValues() {
       //StringBuffer sb = new StringBuffer(1024);
       return "No Drive train constants are here. They are all stored in the PowerControlJaguar objects.";
    }
    
    public static String printAutonomous() {
       StringBuffer sb = new StringBuffer(1024);
       sb.append("AUTONOMOUS_DISTANCE = ").append(AUTONOMOUS_DISTANCE).append("\n");
       sb.append("AUTONOMOUS_X_SPEED = ").append(AUTONOMOUS_X_SPEED).append("\n");
       sb.append("AUTONOMOUS_Y_SPEED = ").append(AUTONOMOUS_Y_SPEED).append("\n");
       sb.append("AUTONOMOUS_WAIT_TIME = ").append(AUTONOMOUS_WAIT_TIME).append("\n");
       return sb.toString();       
    }
    
    public static String printShooter() {
       StringBuffer sb = new StringBuffer(1024);
       sb.append("MAX_SHOOT_DISTANCE = ").append(MAX_SHOOT_DISTANCE).append("\n");
       sb.append("MIN_SHOOT_DISTANCE = ").append(MIN_SHOOT_DISTANCE).append("\n");
       sb.append("MAX_CLICKS = ").append(MAX_CLICKS).append("\n");
       //should we print double [] MAX_CLICK_INTERVAL ?
       sb.append("SHOOT_TIME = ").append(SHOOT_TIME).append("\n");
       sb.append("RESET_TIME = ").append(RESET_TIME).append("\n");
       sb.append("STARTWIND_TIMEOUT_TIME = ").append(STARTWIND_TIMEOUT_TIME).append("\n");
       sb.append("OPERATORWIND_TIMEOUT_TIME = ").append(OPERATORWIND_TIMEOUT_TIME).append("\n");
       return sb.toString();
    }
    
    public static String printAll() {
       return DIVIDER + printDriveValues() + printShooter() + DIVIDER;
    }
}
{'fraction_non_alphanumeric': 0.06967670011148272, 'fraction_numerical': 0.02519509476031215, 'mean_word_length': 2.4490580545943867, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5009342', 'n_tokens_mistral': 2895, 'n_tokens_neox': 2667, 'n_words': 854}