<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 *
 * @author Nathan
 */
public class ControlBox {
	/*
	 /           #1       #2     #3

	 #4            B1            B2

	 #5

	 #6            B1            B2

	 #7

	 #8            B1            B2

	 */

	public static DriverStation driverStation;

	public static void initialize() {
		driverStation = DriverStation.getInstance();
	}

	public static boolean getDigitalIn(int channel) {
		return driverStation.getDigitalIn(channel);
	}

	public static double getAnalogIn(int channel) {
		return driverStation.getAnalogIn(channel);
	}
	public static void update() {
		for (int i = 1; i <= 14; i++) {
			SmartDashboard.putBoolean("Switch " + i,driverStation.getDigitalIn(i));
		}
	}
}<commit_msg>Updated MagicBox to refer to switches<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 *
 * @author Nathan
 */
public class ControlBox {
	/*
	 .	#9	#8	#7

	 #10I	#3I		#4I

	 #11I

	 #12I	#5I		#6I

	 #13I

	 #14I	#1I		#2I
	 */

	public static DriverStation driverStation;

	public static void initialize() {
		driverStation = DriverStation.getInstance();
	}

	public static boolean getDigitalIn(int channel) {
		return driverStation.getDigitalIn(channel);
	}

	public static double getAnalogIn(int channel) {
		return driverStation.getAnalogIn(channel);
	}

	public static void update() {
		for (int i = 1; i <= 14; i++) {
			SmartDashboard.putBoolean("Switch " + i, driverStation.getDigitalIn(i));
		}
	}

	public static boolean getYellowButtonUpLeft() {
		return !getDigitalIn(3);
	}

	public static boolean getYellowButtonUpRight() {
		return !getDigitalIn(4);
	}

	public static boolean getYellowButtonDownLeft() {
		return !getDigitalIn(5);
	}

	public static boolean getYellowButtonDownRight() {
		return !getDigitalIn(6);
	}

	public static boolean getBlackButtonLeft() {
		return !getDigitalIn(1);
	}

	public static boolean getBlackButtonRight() {
		return !getDigitalIn(2);
	}

	/**
	 *
	 * @param which numbered from top to bottom (1-5)
	 * @return
	 */
	public static boolean getLeftSwitch(int which) {
		return !getDigitalIn(9 + which);
	}

	/**
	 *
	 * @param which from left to right (1-3)
	 * @return
	 */
	public static boolean getTopSwitch(int which) {
		return getDigitalIn(10 - which);
	}
}
{'fraction_non_alphanumeric': 0.11268129416139828, 'fraction_numerical': 0.019338043882484196, 'mean_word_length': 3.28343949044586, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6887193', 'n_tokens_mistral': 979, 'n_tokens_neox': 879, 'n_words': 229}