Java 类edu.wpi.first.wpilibj.DriverStationLCD 实例源码

项目:Robot-Base    文件:BasicRobot.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new AutonomousGroup();

    // Initialize all subsystems
    CommandBase.init();

    // Ouput program info to system log.
    System.out.println("+---------------------------------------------+");
    System.out.println("| Team "+teamNo+" - Software Version: "+versionNo+" |");
    System.out.println("+---------------------------------------------+");

    // Output program info to driver station.
    DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser1, 1, "Team: "+teamNo+" - Software Version: "+versionNo);
    DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser2, 2, "Robot initialized.");
    DriverStationLCD.getInstance().updateLCD();
}
项目:aeronautical-facilitation    文件:DriveTrain.java   
/**
 *
 */
public DriveTrain() {
    super("DriveTrain");

    FLeftMotor = new Victor(RobotMap.FLeftMotorPWM);
    FRightMotor = new Victor(RobotMap.FRightMotorPWM);
    BLeftMotor = new Victor(RobotMap.BLeftMotorPWM);
    BRightMotor = new Victor(RobotMap.BRightMotorPWM);
    //MLeftMotor = new Victor(RobotMap.MLeftMotorPWM);
    //MRightMotor = new Victor(RobotMap.MRightMotorPWM);
    drive = new RobotDrive(FLeftMotor, BLeftMotor, FRightMotor, BRightMotor);
    //drive.setInvertedMotor(RobotDrive.MotorType.kFrontRight, true);
    //drive.setInvertedMotor(RobotDrive.MotorType.kRearLeft, true);

    GShiftSolDown = new Solenoid(RobotMap.DriveTrainLowGearSolenoid);
    GShiftSolUp = new Solenoid(RobotMap.DriveTrainHighGearSolenoid);
    display = DriverStationLCD.getInstance();
}
项目:2014_Main_Robot    文件:Robot.java   
/**
 * This method is run when the robot is first powered on.
 */
public void robotInit() {
    //initialize compressor
    compressor = new Compressor(RobotMap.pressureSwitch.getInt(), RobotMap.compressorRelay.getInt());

    // Initialize all subsystems
    CommandBase.init();

    //Initialize auto mode chooser
    autoSelectInit();

    //create thread to write dashboard variables
    printer = new ConsolePrinter(200);
    printer.startThread();

    //init message box on driverstation
    lcd = DriverStationLCD.getInstance();

    //Console Message so we know robot finished loading
    System.out.println("****Robot Done Loading****");
}
项目:2014_Main_Robot    文件:Robot.java   
/**
 * This method is run repeatedly while the robot is disabled.
 */
public void disabledPeriodic() {
    //get auto selection from dashboard and write it to lcd
    autonomousCommand = (AutoCommandGroup) autoChooser.getSelected();
    lcd.println(DriverStationLCD.Line.kUser2, 1, autonomousCommand.getName());
    lcd.updateLCD();

    //Kill all active commands
    Scheduler.getInstance().removeAll();
    Scheduler.getInstance().disable();

    //Check to see if the gyro is drifting, if it is re-initialize it.
    gyroReinit();

    //set arduino lights
    setArduinoAutonomousStatuses();
}
项目:FRC623Robot2014    文件:Robot623.java   
public static void printToDash(int line, String str) {
    DriverStationLCD dsLCD = DriverStationLCD.getInstance();
    dsLCD.clear();
    switch (line) {
        case 1:
            dsLCD.println(DriverStationLCD.Line.kUser1, 1, str);
            break;
        case 2:
            dsLCD.println(DriverStationLCD.Line.kUser2, 1, str);
            break;
        case 3:
            dsLCD.println(DriverStationLCD.Line.kUser3, 1, str);
            break;
        case 4:
            dsLCD.println(DriverStationLCD.Line.kUser4, 1, str);
            break;
        case 5:
            dsLCD.println(DriverStationLCD.Line.kUser5, 1, str);
            break;
        case 6:
            dsLCD.println(DriverStationLCD.Line.kUser6, 1, str);
            break;
    }
    dsLCD.updateLCD();
}
项目:FRC623Robot2013-2    文件:Robot.java   
private void printToDash(int line, String str) {
    DriverStationLCD dsLCD = DriverStationLCD.getInstance();
    switch (line) {
        case 1:
            dsLCD.println(DriverStationLCD.Line.kUser1, 1, str);
            break;
        case 2:
            dsLCD.println(DriverStationLCD.Line.kUser2, 1, str);
            break;
        case 3:
            dsLCD.println(DriverStationLCD.Line.kUser3, 1, str);
            break;
        case 4:
            dsLCD.println(DriverStationLCD.Line.kUser4, 1, str);
            break;
        case 5:
            dsLCD.println(DriverStationLCD.Line.kUser5, 1, str);
            break;
        case 6:
            dsLCD.println(DriverStationLCD.Line.kUser6, 1, str);
            break;
    }
    dsLCD.updateLCD();
}
项目:2013ultimate-ascent    文件:GRTLogger.java   
private static void dsPrintln(String data) {
    dsBuffer.addElement(data);
    dsBuffer.removeElementAt(0);

    dash.println(DriverStationLCD.Line.kUser1, 1,
            (String) dsBuffer.elementAt(5));
    dash.println(DriverStationLCD.Line.kUser6, 1,
            (String) dsBuffer.elementAt(4));
    dash.println(DriverStationLCD.Line.kUser5, 1,
            (String) dsBuffer.elementAt(3));
    dash.println(DriverStationLCD.Line.kUser4, 1,
            (String) dsBuffer.elementAt(2));
    dash.println(DriverStationLCD.Line.kUser3, 1,
            (String) dsBuffer.elementAt(1));
    dash.println(DriverStationLCD.Line.kUser2, 1,
            (String) dsBuffer.elementAt(0));

    dash.updateLCD();
}
项目:Woodchuck-2013    文件:JoystickControl.java   
public ControlMode getControlMode()
{
    if (controlMode.value == ControlMode.arcadeDrive.value)
    {
        DriverStationComm.printMessage(DriverStationLCD.Line.kUser1, 1, "Control mode: Arcade 2 Joystick");
    }
    else if (controlMode.value == ControlMode.tankDrive.value)    
    {
        DriverStationComm.printMessage(DriverStationLCD.Line.kUser1, 1, "Control mode: Tank");
    }
    else
    {
        DriverStationComm.printMessage(DriverStationLCD.Line.kUser1, 1, "Control mode: Arcade 1 Joystick");
    }

    return controlMode;
}
项目:293-2013    文件:OI.java   
/**
 * Very messy method. Shouldn't be that hard to figure out though. Read
 * through it carefully. :P
 */
public static void controlAutoAim() {
    if (toggleFeed == false) {
        if (autoAimButton.get() == true) {
            Angle.setAngle(Vision.calculateAngle());
            AutoCenter.lineUpTarget();
        } else if (autoAngleButton.get() == true) {
            Angle.setAngle(2.00);
        } //Angle Control code below is for testing, calibrating, and manual shooting if problems arise.    
        else if (raiseAngleButton.get() == true) {
            Angle.angleUp();
        } else if (lowerAngleButton.get() == true) {
            Angle.angleDown();
            LCD.println(DriverStationLCD.Line.kUser4, 1, "lowering angleeee");
        } else {
            Angle.angleStop();
        }
    } else { //If toggleFeed is now true and climbButton is not pressed, go to feeder angle
        Angle.setAngle(feederAngle); //Feeder Angle (Approximately)
    }
}
项目:293-2013    文件:AutoCenter.java   
/**
 * This code might require a bit of operator control. If the robot is moving
 * too fast, it will over shoot and start oscillating. Operator must know
 * when to let go of the button. Following should be self-explanatory. Join
 * the build team if you do not understand.
 */
public static void lineUpTarget() {
    if (Vision.centerOfGravity() < largeMaxLeftBound) {
        DriveTrain.rotateDrive(largeTurningRightSpeed);
        LCD.println(DriverStationLCD.Line.kUser1, 1, "...Turning Left...");
    } else if (Vision.centerOfGravity() > largeMaxRightBound) {
        DriveTrain.rotateDrive(largeTurningLeftSpeed);
        LCD.println(DriverStationLCD.Line.kUser1, 1, "...Turning Right...");
    } else {
        if (Vision.centerOfGravity() < smallMaxLeftBound) { //Space between the last dot is to check that the loop is working correctly. 
            DriveTrain.rotateDrive(smallTurningRightSpeed);
            LCD.println(DriverStationLCD.Line.kUser1, 1, "...Turning Left.. .");
        } else if (Vision.centerOfGravity() > smallMaxRightBound) {
            DriveTrain.rotateDrive(smallTurningLeftSpeed);
            LCD.println(DriverStationLCD.Line.kUser1, 1, "...Turning Right.. .");
        } else {
            DriveTrain.tankDrive(0, 0);
            LCD.println(DriverStationLCD.Line.kUser1, 1, "<Centered on Target>");
        }
    }
}
项目:grtframeworkv7    文件:GRTLogger.java   
private static void dsPrintln(String data) {
    dsBuffer.addElement(data);
    dsBuffer.removeElementAt(0);

    dash.println(DriverStationLCD.Line.kUser1, 1,
            (String) dsBuffer.elementAt(5));
    dash.println(DriverStationLCD.Line.kUser6, 1,
            (String) dsBuffer.elementAt(4));
    dash.println(DriverStationLCD.Line.kUser5, 1,
            (String) dsBuffer.elementAt(3));
    dash.println(DriverStationLCD.Line.kUser4, 1,
            (String) dsBuffer.elementAt(2));
    dash.println(DriverStationLCD.Line.kUser3, 1,
            (String) dsBuffer.elementAt(1));
    dash.println(DriverStationLCD.Line.kUser2, 1,
            (String) dsBuffer.elementAt(0));

    dash.updateLCD();
}
项目:2014-mermaid    文件:DSOutput.java   
/**
 * Display a line of text without scrolling. Max 21 characters / line.
 * <p/>
 * @param ln Which line to print in
 * @param msg What message to display
 */
public void sayNOCLEAR(int ln, String msg) {
    if (msg == null) {
        msg = "null message passed";
    }
    // DriverStationLCD.kLineLength=21
    // Add 21 spaces to clear the rest of the line
    msg += "                     ";
    // If the given message is too long, truncate it
    if (msg.length() > 21) {
        msg = msg.substring(0, 21);
    }

    switch (ln) {
        case (1):
            output.println(DriverStationLCD.Line.kUser1, 1, msg);
            break;
        case (2):
            output.println(DriverStationLCD.Line.kUser2, 1, msg);
            break;
        case (3):
            output.println(DriverStationLCD.Line.kUser3, 1, msg);
            break;
        case (4):
            output.println(DriverStationLCD.Line.kUser4, 1, msg);
            break;
        case (5):
            output.println(DriverStationLCD.Line.kUser5, 1, msg);
            break;
        case (6):
            output.println(DriverStationLCD.Line.kUser6, 1, msg);
            break;
    }

    // Show the message
    output.updateLCD();
}
项目:Robot-Base    文件:BasicRobot.java   
public void autonomousInit() {
    // schedule the autonomous command (example)
    //autonomousCommand.start();

    // Ouput status info to driver station.
    DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser3, 2, "Started Autonomous.");
}
项目:Robot-Base    文件:BasicRobot.java   
public void teleopInit() {
// This makes sure that the autonomous stops running when
       // teleop starts running. If you want the autonomous to 
       // continue until interrupted by another command, remove
       // this line or comment it out.
       autonomousCommand.cancel();

       // Output status info to driver station.
       DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser3, 2, "Started Tele-op.");
   }
项目:Robot-Base    文件:BasicRobot.java   
/**
 * This function is called periodically during test mode
 */
public void testPeriodic() {
    LiveWindow.run();

    // Output status info to driver station.
    DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser3, 2, "Started Test Mode.");
}
项目:2014CataBot    文件:Debug.java   
/**
 * Log to Driver Station LCD.
 *
 * @param ln The line number from 1 to 6.
 * @param col The column - either 1 or 2.
 * @param text The line to send.
 */
public static void log(int ln, int col, String text) {
    Line line = lines[ln - 1];
    int pos = col == 1 ? 1 : (DriverStationLCD.kLineLength / 2);

    text = text.trim();//.substring(0, (DriverStationLCD.kLineLength / 2) - 1); // Constrain

    clearLine(ln);
    ds.println(line, pos, text);
    update();
}
项目:2014CataBot    文件:Debug.java   
public static void clearLine(int line) {
    String pad = "";

    for (int i = 0; i < DriverStationLCD.kLineLength; i++) {
        pad += " ";
    }

    ds.println(lines[line - 1], 1, pad);

    update();
}
项目:2014CataBot    文件:Debug.java   
public static void clear() {
    String pad = "";

    for (int i = 0; i < DriverStationLCD.kLineLength; i++) {
        pad += " ";
    }

    for (int i = 0; i < 6; i++) {
        ds.println(lines[i], 1, pad);
    }

    update();
}
项目:2014-Aerial-Assist    文件:SendUserMessages.java   
/**
 *
 * @param line which line to print the message on
 * @param msg the message to be sent
 */
public static void display(int line, String msg) {
    DriverStationLCD.Line l;
    switch (line) {
        case 1:
            /* kMain6 is depreciated - use kUser1 for top of the screen */
            l = DriverStationLCD.Line.kUser1;
            break;
        case 2:
            l = DriverStationLCD.Line.kUser2;
            break;
        case 3:
            l = DriverStationLCD.Line.kUser3;
            break;
        case 4:
            l = DriverStationLCD.Line.kUser4;
            break;
        case 5:
            l = DriverStationLCD.Line.kUser5;
            break;
        case 6:
            l = DriverStationLCD.Line.kUser6;
            break;
        default:
            l = DriverStationLCD.Line.kUser2;
            break;
    }

    DriverStationLCD.getInstance().println(l, 1, msg);
    DriverStationLCD.getInstance().updateLCD();
}
项目:aeronautical-facilitation    文件:Pass.java   
/**
 *
 */
public Pass() {
    super("Pass");
    launcher = AeronauticalFacilitation.getLauncher();
    requires(launcher);
    display = DriverStationLCD.getInstance();
    // Use requires() here to declare subsystem dependencies
    // eg. requires(chassis);
}
项目:aeronautical-facilitation    文件:Pass.java   
protected void initialize() {
    counter++;
    delayTimer = RobotMap.ShooterDelayTimer;
    delayTimer.start();
    display.println(DriverStationLCD.Line.kUser2, 1, "Pass command " + counter + "                    ");
    display.updateLCD();

}
项目:aeronautical-facilitation    文件:Launch.java   
/**
 *
 */
public Launch() {
    super("Launch");
    launcher = AeronauticalFacilitation.getLauncher();
    requires(launcher);

    display = DriverStationLCD.getInstance();
    //TODO: add roller = here
    //TODO: add requires(roller) here
    // Use requires() here to declare subsystem dependencies
    // eg. requires(chassis);
}
项目:aeronautical-facilitation    文件:Launch.java   
protected void initialize() {
    counter++;
    delayTimer = RobotMap.ShooterDelayTimer;
    delayTimer.start();
    //TODO: use roller subsystem to lower the roller.
    display.println(DriverStationLCD.Line.kUser2, 1, "lauch command " + counter + "                  ");
    display.updateLCD();
}
项目:aeronautical-facilitation    文件:AeronauticalFacilitation.java   
/**
 *
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    DriveTrain = new DriveTrain();
    launchercontroller = new Launcher();
    rollerSubsystem = new Roller();
    display = DriverStationLCD.getInstance();
    compressor = new Compressor(RobotMap.PressureSwitchDigitalInput, RobotMap.CompressorRelay);
    compressor.start();

    DriveTrain.shiftHighGear();

    OI.initialize();


    autonomousCommand = new Autonomous();

    arduino = new ArduinoConnection();
    arduino.setPattern("4");
    pattern = 0;
    driverStation = DriverStation.getInstance();
    alliance = driverStation.getAlliance().value;
    digital1 = driverStation.getDigitalIn(1);
    digital2 = driverStation.getDigitalIn(2);
    digital3 = driverStation.getDigitalIn(3);
    // Initialize all subsystems.
    // Subsystems: a self-contained system within a larger system. 
    CommandBase.init();
}
项目:Treecoil-2014    文件:DriverStationComm.java   
/**
 * Print a boolean message to the User Messages box.
 * @param line
 * @param startingColumn
 * @param booleanMessage
 */
public static void printMessage(DriverStationLCD.Line line,
        int startingColumn,
        boolean booleanMessage) {
    String message = (booleanMessage ? "True" : "False");
    printMessage(line, startingColumn, message);
}
项目:Treecoil-2014    文件:DriverStationComm.java   
/**
 * Print a message to the User Messages box.
 * @param line
 * @param startingColumn
 * @param message
 */
public static void printMessage(DriverStationLCD.Line line,
        int startingColumn,
        String message) {
    String shortenedMessage = shortenMessage(message);
    LCD.println(line, startingColumn, shortenedMessage);
    LCD.updateLCD();
}
项目:Treecoil-2014    文件:DriverStationComm.java   
/**
 * Shorten the message for the LCD.
 * @param message
 * @return
 */
private static String shortenMessage(String message) {
    if (message.length() > DriverStationLCD.kLineLength) {
        return message.substring(0, DriverStationLCD.kLineLength);
    }
    else {
        return message;
    }
}
项目:Treecoil-2014    文件:Robot.java   
/**
 * This function is called periodically during autonomous.
 */
public void autonomousPeriodic() {
    autonomousRoutine();
    printUltrasonic();

    DriverStationComm.printMessage(DriverStationLCD.Line.kUser5, 1,
            "Auton Cycle: " + autonCycles);
    autonCycles++;
}
项目:Treecoil-2014    文件:JoystickControl.java   
public void act() {
    arcadeThrottleValue = driveJoystick.getRawAxis(
            ARCADE_MOVE_JOYSTICK_AXIS.value);
    arcadeTurnValue = driveJoystick.getRawAxis(
            ARCADE_ROTATE_JOYSTICK_AXIS.value);
    pickupValue = operatorJoystick.getRawAxis(TRIGGER_AXIS.value);

    slowButton = driveJoystick.getRawButton(SLOW_MODE_BUTTON.value);
    curveTurnValues();
    deadZone();

    if (slowButton) {
        //slowDriveValues();
        DriverStationComm.printMessage(DriverStationLCD.Line.kUser1, 4,
                "Slow Mode: ON");
    }
    else {
        DriverStationComm.printMessage(DriverStationLCD.Line.kUser1, 4,
                "Slow Mode: OFF");
    }

    winchButton = operatorJoystick.getRawButton(
            SHOOT_WITH_RESET_BUTTON.value);
    winchMomentButton = operatorJoystick.getRawButton(
            SHOOT_WITHOUT_RESET_BUTTON.value);
    winchStopButton = operatorJoystick.getRawButton(STOP_SHOOT_BUTTON.value);
    driverWinchButton = driveJoystick.getRawButton(
            DRIVER_SHOOT_WITH_RESET_BUTTON.value);

    pickupUpButton = operatorJoystick.getRawButton(PICKUP_UP_BUTTON.value);
    pickupDownButton = operatorJoystick.getRawButton(
            PICKUP_DOWN_BUTTON.value);
}
项目:Felix-2014    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    System.out.println("[INFO] ****** ROBOT IS READY FOR USE ******");
    // Tell programmer(s)/Console reader that the Robot is initialized
    // and will now call console.init(); and then run the loop when the
    // VM initialization is complete.
    console.init();
    // clears LCD Driver Station.
    LCD = DriverStationLCD.getInstance();
    LCD.clear();

}
项目:CMonster2014    文件:FunCommand.java   
/**
 * Calculates Pi :), and prints out debugging data to the SmartDashboard.
 */
protected void execute() {
    // Calculate Pi!!!! (http://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80)
    // This method is really slow
    pi4 += (piPositive ? 1.0 : -1.0) / piIndex;
    piPositive = !piPositive;
    piIndex += 2.0;
    pi = pi4 * 4.0;
    // Print out Pi to the DS LCD (not the SmartDashboard) because it can 
    // display more digits
    DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser1, 1, "Pi: " + pi);
    DriverStationLCD.getInstance().updateLCD();
    // Pi
    // Report misc values
    SmartDashboard.putNumber("Gyro Rate", RobotMap.driveSubsystemSteeringGyro.getRate());
    SmartDashboard.putNumber("Gyro Angle", RobotMap.driveSubsystemSteeringGyro.getAngle());
    ADXL345_I2C.AllAxes accel = RobotMap.driveSubsystemAccelerometer.getAccelerations();
    SmartDashboard.putNumber("X Acceleration", accel.XAxis);
    SmartDashboard.putNumber("Y Acceleration", accel.YAxis);
    String targetState;
    switch (TargetTrackingCommunication.getState().value) {
        case TargetTrackingCommunication.State.HOT_VALUE:
            targetState = "Hot";
            break;
        case TargetTrackingCommunication.State.NOT_HOT_VALUE:
            targetState = "Not hot";
            break;
        default:
        case TargetTrackingCommunication.State.UNKNOWN_VALUE:
            targetState = "Unknown";
            break;
    }
    SmartDashboard.putString("Goal State", targetState);

    SmartDashboard.putNumber("Encoder Distance", RobotMap.driveSubsystemRearRightEncoder.getDistance());
    SmartDashboard.putNumber("Temperature", RobotMap.driveSubsystemSteeringGyroTemp.getTemp());

    Robot.ledSubsystem.updatePattern();
}
项目:TitanRobot2014    文件:MessageDisplay.java   
public MessageDisplay() {
    driverStationLCD = DriverStationLCD.getInstance();
    displayLines = new DriverStationLCD.Line[6];
    displayLines[0] = DriverStationLCD.Line.kUser1;
    displayLines[1] = DriverStationLCD.Line.kUser2;
    displayLines[2] = DriverStationLCD.Line.kUser3;
    displayLines[3] = DriverStationLCD.Line.kUser4;
    displayLines[4] = DriverStationLCD.Line.kUser5;
    displayLines[5] = DriverStationLCD.Line.kUser6;
}
项目:FRC-2014-test    文件:DriverStationComm.java   
/**
 * Print a message to the "User messages" box in the driver station.
 * @param message the message to be printed
 * @param line the line number
 * @param startingColumn the column to start printing to
 */
public static void printMessage(String message, DriverStationLCD.Line line,
        int startingColumn) {
    if (message.length() > DriverStationLCD.kLineLength) {
        message = shortenMessage(message);
    } else {
        message = padMessage(message);
    }

    driverStationLCD.println(line, startingColumn, message);
    driverStationLCD.updateLCD();
}
项目:649code2014    文件:Display.java   
/**
 * Clears the LCD display.
 */
public static void clear() {
    display.println(DriverStationLCD.Line.kUser1, 1, PADDING);
    display.println(DriverStationLCD.Line.kUser2, 1, PADDING);
    display.println(DriverStationLCD.Line.kUser3, 1, PADDING);
    display.println(DriverStationLCD.Line.kUser4, 1, PADDING);
    display.println(DriverStationLCD.Line.kUser5, 1, PADDING);
    display.println(DriverStationLCD.Line.kUser6, 1, PADDING);
    for (int i = 0; i < 6; i++) {
        printed[i] = false;
    }
    queueCount = 0;

}
项目:649code2014    文件:Display.java   
/**
 * Prints text to a specific line on the LCD display
 *
 * @param line Line number from [1,6].
 * @param text String to print out. If it's longer than
 * {@link #MAX_LINE_LENGTH} characters, it will be truncated and a marker
 * ({@link #TRUNCATE_MARKER}) will be added on to the end.
 */
public static void println(int line, String text) {
    if (line < 1 || line > 6) {
        return;
    }
    //truncate the text if it's longer than the maximum length and add a marker to indicate that it was truncated
    if (text.length() > MAX_LINE_LENGTH) {
        text = text.substring(0, MAX_LINE_LENGTH - TRUNCATE_MARKER.length()) + TRUNCATE_MARKER;
    }
    switch (line) {
        case 1:
            display.println(DriverStationLCD.Line.kUser1, 1, text);
            break;
        case 2:
            display.println(DriverStationLCD.Line.kUser2, 1, text);
            break;
        case 3:
            display.println(DriverStationLCD.Line.kUser3, 1, text);
            break;
        case 4:
            display.println(DriverStationLCD.Line.kUser4, 1, text);
            break;
        case 5:
            display.println(DriverStationLCD.Line.kUser5, 1, text);
            break;
        case 6:
            display.println(DriverStationLCD.Line.kUser6, 1, text);
            break;
    }
}
项目:FRCTesting    文件:Debug.java   
/**
 * Log to Driver Station LCD.
 *
 * @param ln The line number from 1 to 6.
 * @param col The column - either 1 or 2.
 * @param text The line to send.
 */
public static void log(int ln, int col, String text) {
    Line line = lines[ln - 1];
    int pos = col == 1 ? 1 : (DriverStationLCD.kLineLength / 2);

    text = text.trim();//.substring(0, (DriverStationLCD.kLineLength / 2) - 1); // Constrain

    clearLine(ln);
    ds.println(line, pos, text);
    update();
}
项目:FRCTesting    文件:Debug.java   
public static void clearLine(int line) {
    String pad = "";

    for (int i = 0; i < DriverStationLCD.kLineLength; i++) {
        pad += " ";
    }

    ds.println(lines[line - 1], 1, pad);

    update();
}
项目:FRCTesting    文件:Debug.java   
public static void clear() {
    String pad = "";

    for (int i = 0; i < DriverStationLCD.kLineLength; i++) {
        pad += " ";
    }

    for (int i = 0; i < 6; i++) {
        ds.println(lines[i], 1, pad);
    }

    update();
}
项目:MecanumTest    文件:DSFace.java   
public void println (int i, int startingColumn, String msg) {
    DriverStationLCD.Line l;

    switch(i) {
        case 1: l = DriverStationLCD.Line.kUser1; break;
        case 2: l = DriverStationLCD.Line.kUser2; break;
        case 3: l = DriverStationLCD.Line.kUser3; break;
        case 4: l = DriverStationLCD.Line.kUser4; break;
        case 5: l = DriverStationLCD.Line.kUser5; break;
        case 6: l = DriverStationLCD.Line.kUser6; break;
        default: l = DriverStationLCD.Line.kUser1; break;
    };

    DriverStationLCD.getInstance().println(l, startingColumn, msg);
}
项目:ReboundRumbleJava    文件:RobotTemplate.java   
public RobotTemplate() {
    // initialize all the objects
    ingest = new VictorPair(5,6);
    elevator = new Victor(1);

    shooter = new VictorPair(2,4);

    robotDrive = new Drive(8, 7, 10, 9);
    xbox = new JStick(1);
    joystick = new JStick(2);
    compressor = new Compressor(4, 3);
    compressor.start();

    driveGearA = new Solenoid(1);
    driveGearB = new Solenoid(2);
    driveGearA.set(true);
    driveGearB.set(false);
    selectedGear = 1;

    leftEnc = new Encoder(6, 7, true,CounterBase.EncodingType.k2X);
    leftEnc.setDistancePerPulse(0.103672558);

    rightEnc = new Encoder(9, 10, false);
    rightEnc.setDistancePerPulse(0.103672558);

    lcd = DriverStationLCD.getInstance();
}