• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Line类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: log

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
public static void log(String[] text) {
    for (int i = 0; i < text.length; i++) {
        if (text[i] == null || text[i].trim().equals("")) {
            continue;
        }
        Line line = lines[i % 6];
        int pos = 1;
        String out = text[i].trim();
        /*if (text.length > 6) {
            pos = i < 6 ? 1 : DriverStationLCD.kLineLength / 2;
            out = out.substring(0, (DriverStationLCD.kLineLength / 2) - 1); // Constrain
        }*/

        ds.println(line, pos, out);
    }

    update();
}
 
开发者ID:OASTEM,项目名称:2014CataBot,代码行数:19,代码来源:Debug.java


示例2: teleopPeriodic

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
 * This function is called periodically during operator control
 */
public void teleopPeriodic() {
    display.println(Line.kUser1, 1, "Lauch: " + launchercontroller.launcherswitch() + "      ");
    display.updateLCD();
    Scheduler.getInstance().run();
    if (alliance == 0) {
        arduino.setPattern("1");
        pattern = 1;
    } else if (alliance == 1){
        arduino.setPattern("2");
        pattern = 2;
    } else {
        arduino.setPattern("0");
        pattern = 0;
    }
}
 
开发者ID:CarmelRobotics,项目名称:aeronautical-facilitation,代码行数:19,代码来源:AeronauticalFacilitation.java


示例3: disabledPeriodic

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
public void disabledPeriodic() {
    display.println(Line.kUser1, 1, "Lauch: " + launchercontroller.launcherswitch() + "      ");
    display.updateLCD();
    digital1 = driverStation.getDigitalIn(1);
    digital2 = driverStation.getDigitalIn(2);
    digital3 = driverStation.getDigitalIn(3);
    alliance = driverStation.getAlliance().value;
    if (digital1 == true && digital2 == false && digital3 == false) {
        arduino.setPattern("4");
        pattern = 1;
    } else if (digital2 == true && digital1 == false && digital3 == false) {
        arduino.setPattern("5");
        pattern = 5;
    } else if (digital3 == true && digital1 == false && digital2 == false) {
        arduino.setPattern("6");
        pattern = 6;
    } else {
        arduino.setPattern("0");
        pattern = 0;
    }
    
}
 
开发者ID:CarmelRobotics,项目名称:aeronautical-facilitation,代码行数:23,代码来源:AeronauticalFacilitation.java


示例4: teleopPeriodic

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
 * This method is called periodically during operator control.
 * <p/>
 * This method is called approximately 200 times a second.
 */
public void teleopPeriodic() {
    
    System.out.println("DIO 6: " + !RobotMap.armsExtendedFore.get() + ", DIO 7: " + !RobotMap.armsExtendedAft.get() + ", DIO 9: " + !RobotMap.armsHome.get());
    
    display.updateLCD();
    
    RobotMap.debug = DriverStation.getInstance().getDigitalIn(1);
    RobotMap.debugTable = DriverStation.getInstance().getDigitalIn(2);
    
    Scheduler.getInstance().run();
        
    display.println(Line.kUser1, 1, "Aspect Ratio: " + RobotMap.Top.aspect);
    display.println(Line.kUser2, 1, "CenX: " + RobotMap.Top.cenX);
    display.println(Line.kUser3, 1, "CenY: " + RobotMap.Top.cenY);
    display.println(Line.kUser4, 1, "Distance (in): " + RobotMap.Top.getRange());
    //display.println(Line.kUser5, 1, "Distance (ft): " + RobotMap.Top.getRange()/12);
    display.println(Line.kUser5, 1, "shoot RPM: " + RobotMap.shootEncoder.getRate()*60);
    display.println(Line.kUser6, 1, "shoot encoder: " + (((double)RobotMap.shootEncoder.get())/360));
    this.debugToTable("Encoder getrate", RobotMap.shootEncoder.getRate());
    this.debugToTable("Encoder get", RobotMap.shootEncoder.get());
    
    display.updateLCD();
}
 
开发者ID:jdrusso,项目名称:ScraperBike2013,代码行数:29,代码来源:ScraperBike.java


示例5: autonomous

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
 * This function is called once each time the robot enters autonomous mode.
 */
public void autonomous() 
{
    reset();
    getWatchdog().setEnabled(false);
    
    m_LCD.println(Line.kUser6, LCDCol, "Driving");
    autoLoop(-.5, -.6, 1.75f);
    m_LCD.println(Line.kUser6, LCDCol, "Firing 1");
    m_Shooter.Fire();
    autoLoop(0, 0, 3.0f);
    m_LCD.println(Line.kUser6, LCDCol, "Firing 2");
    m_Shooter.Fire();
    autoLoop(0, 0, 3.0f);
    m_LCD.println(Line.kUser6, LCDCol, "Firing 3");
    m_Shooter.Fire();
    autoLoop(0, 0, 3.0f);
    m_LCD.println(Line.kUser6, LCDCol, "Turning Off");
    m_Shooter.TurnOff();
    autoLoop(0, 0, 0.25f);
    m_LCD.println(Line.kUser6, LCDCol, "           ");

}
 
开发者ID:arthurlt,项目名称:2484-tesla-2013,代码行数:26,代码来源:Robot_Tesla_2013.java


示例6: autonomousInit

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
 *
 */
public void autonomousInit() {
    // schedule the autonomous command (example)
    // 
    autonomousCommand.start();
    //System.out.println("Entering Autonomous....");
    display.println(Line.kUser1, 1, "Autonomous");
    display.updateLCD();

}
 
开发者ID:CarmelRobotics,项目名称:aeronautical-facilitation,代码行数:13,代码来源:AeronauticalFacilitation.java


示例7: shiftLowGear

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
 *
 */
public void shiftLowGear() {
    GShiftSolUp.set(!RobotMap.DriveTrainLowGearSolenoidValue);
    GShiftSolDown.set(RobotMap.DriveTrainLowGearSolenoidValue);
    GShiftSolUp.set(false);
    GShiftSolDown.set(true);
    display.println(Line.kUser1, 1, "Into Low Gear ");
    display.updateLCD();
}
 
开发者ID:CarmelRobotics,项目名称:aeronautical-facilitation,代码行数:12,代码来源:DriveTrain.java


示例8: shiftHighGear

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
 *
 */
public void shiftHighGear() {
    GShiftSolUp.set(!RobotMap.DriveTrainLowGearSolenoidValue);
    GShiftSolDown.set(RobotMap.DriveTrainLowGearSolenoidValue);
    GShiftSolUp.set(true);
    GShiftSolDown.set(false);

    display.println(Line.kUser1, 1, "Into High Gear ");
    display.updateLCD();
}
 
开发者ID:CarmelRobotics,项目名称:aeronautical-facilitation,代码行数:13,代码来源:DriveTrain.java


示例9: robotInit

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
 * 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
    //status = new String();
    nt = NetworkTable.getTable("ST");
    debugTable = NetworkTable.getTable("Debug");
    nt.putString("Status", "Initializing");
    nt.putBoolean("AutoAlign", false);
    pusher =  new Pusher();
    DriveTrain = new DriveTrain(); // must be before Arms constructor
    arms = new Arms();
    VerticalAxis = new VerticalTurretAxis();   
    shooterController = new Shooter();
    display = DriverStationLCD.getInstance();
    OI.initialize();
    display.updateLCD();
    display.println(Line.kUser1, 1, "Initializing...                      ");
    display.println(Line.kUser2, 1, "                                     ");
    display.println(Line.kUser3, 1, "                                     ");
    display.println(Line.kUser4, 1, "                                     ");
    display.println(Line.kUser5, 1, "                                     ");
    display.println(Line.kUser6, 1, "                                     ");
    display.updateLCD();
    compressor = new Compressor(RobotMap.pressureSwitch, RobotMap.compressorRelay);
    compressor.start();
    RobotMap.shootEncoder.start();
    nt.putString("Status", "Initialized");
    tp = new TargetParser();
    
    updateSolenoids = new UpdateSolenoidModule();
    updateSolenoids.start();
    
    //shooterElevationPID = new ShooterElevationPID(RobotMap.shooterElevationKp, RobotMap.shooterElevationKi, RobotMap.shooterElevationKd);
    //shooterElevationPID.start();
    
    RobotMap.shootEncoder.setDistancePerPulse((1.0/360.0));
    
}
 
开发者ID:jdrusso,项目名称:ScraperBike2013,代码行数:42,代码来源:ScraperBike.java


示例10: reset

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
 *  Call this to reset the robot.
 */
public void reset()
{
    //Pistons
    //if (m_ArmPistonOut) //If Arm is out..
    //{
    //    m_ArmSolIn.set(true); //pull it back in
    //    m_ArmSolOut.set(false);
    //}
    
    //Variables
    m_TrigRightWasDown  = false;
    //m_ArmPistonOut      = false;
    //m_XButWasDown       = false;
    //m_ArmPistonBringIn  = false;
    //m_BackButWasDown    = false;
    //m_XBackButWasDown   = false;
    
    m_YButWasDown       = false;

    m_FrisbeeMotorSpin  = false;
    //m_SetSpin           = 0;
    m_BButWasDown       = false;
    m_FrisbeeFired      = false;
    m_ShotsFired        = 0;
    
    //Strings
    //m_LCD.println(Line.kUser1, LCDCol, ArmPosBegin);
    //m_LCD.println(Line.kUser2, LCDCol, ArmDirBegin);
    m_LCD.println(Line.kUser4, LCDCol, FrisbeeBegin);
    m_LCD.println(Line.kUser5, LCDCol, ShotsBegin);
    m_LCD.println(Line.kUser6, LCDCol, "                   ");
    
    m_LCD.updateLCD();
}
 
开发者ID:arthurlt,项目名称:2484-tesla-2013,代码行数:38,代码来源:Robot_Tesla_2013.java


示例11: frisbee

import edu.wpi.first.wpilibj.DriverStationLCD.Line; //导入依赖的package包/类
/**
     *  Call this to use the Frisbee shooter.
     */
    public void frisbee()
    {     
        if (m_BButPressed)
        {
            if (m_FrisbeeMotorSpin)
            {
                m_FrisbeeMotorSpin = false;
                m_Shooter.TurnOff();
                //m_SetSpin = 0; //Stopping spin
            }
            else
            {
                m_FrisbeeMotorSpin = true;
                //m_Shooter.TurnOn();
                //m_SetSpin = 1; //Spinning full power
            }
        //m_FrisbeeMotor.set(m_SetSpin*-1); //Seting spin
        }
        
        if (m_Shooter.GetState() < Shooter.SHOOTER_ON)
        {
            m_LCD.println(Line.kUser4, LCDCol, NoSpinString);
        }
        else 
        {
            m_LCD.println(Line.kUser4, LCDCol, SpunUpString);
        }
        
        if (m_TrigRightPressed)
        {
            m_Shooter.Fire();
            m_ShotsFired++;
            m_LCD.println(Line.kUser5, LCDCol, m_ShotsFired + ShotsString);
//            if (!m_FrisbeeFired)
//            {
//                m_FrisbeeFired = true;
//                m_FrisbeeSolIn.set(true);
//                m_FrisbeeSolOut.set(false); //Pushing frisbee into firing motor
//                m_ShotsFired++;
//                m_LCD.println(Line.kUser5, LCDCol, m_ShotsFired + ShotsString);
//            }
//            else
//            {
//                m_FrisbeeFired = false;
//                m_FrisbeeSolIn.set(false);
//                m_FrisbeeSolOut.set(true); //Grabbing another frisbee
//            }
        }
    }
 
开发者ID:arthurlt,项目名称:2484-tesla-2013,代码行数:53,代码来源:Robot_Tesla_2013.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ScannerSubscription类代码示例发布时间:2022-05-23
下一篇:
Java Commit类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap