当前位置: 首页>>代码示例>>Java>>正文


Java DriverStationLCD.Line方法代码示例

本文整理汇总了Java中edu.wpi.first.wpilibj.DriverStationLCD.Line方法的典型用法代码示例。如果您正苦于以下问题:Java DriverStationLCD.Line方法的具体用法?Java DriverStationLCD.Line怎么用?Java DriverStationLCD.Line使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.wpi.first.wpilibj.DriverStationLCD的用法示例。


在下文中一共展示了DriverStationLCD.Line方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: display

import edu.wpi.first.wpilibj.DriverStationLCD; //导入方法依赖的package包/类
/**
 *
 * @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();
}
 
开发者ID:Spartronics4915,项目名称:2014-Aerial-Assist,代码行数:36,代码来源:SendUserMessages.java

示例2: printMessage

import edu.wpi.first.wpilibj.DriverStationLCD; //导入方法依赖的package包/类
/**
 * 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);
}
 
开发者ID:SaintsRobotics,项目名称:Treecoil-2014,代码行数:13,代码来源:DriverStationComm.java

示例3: MessageDisplay

import edu.wpi.first.wpilibj.DriverStationLCD; //导入方法依赖的package包/类
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;
}
 
开发者ID:TaylorRobotics,项目名称:TitanRobot2014,代码行数:11,代码来源:MessageDisplay.java

示例4: printMessage

import edu.wpi.first.wpilibj.DriverStationLCD; //导入方法依赖的package包/类
/**
 * 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();
}
 
开发者ID:SaintsRobotics,项目名称:FRC-2014-test,代码行数:18,代码来源:DriverStationComm.java

示例5: println

import edu.wpi.first.wpilibj.DriverStationLCD; //导入方法依赖的package包/类
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);
}
 
开发者ID:Beachbotics1876,项目名称:MecanumTest,代码行数:16,代码来源:DSFace.java

示例6: printMessage

import edu.wpi.first.wpilibj.DriverStationLCD; //导入方法依赖的package包/类
/**
 * 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();
}
 
开发者ID:SaintsRobotics,项目名称:Woodchuck-2013,代码行数:13,代码来源:DriverStationComm.java


注:本文中的edu.wpi.first.wpilibj.DriverStationLCD.Line方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。