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


Java SmartDashboard.putBoolean方法代码示例

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


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

示例1: updateDashboard

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
/**
 * Updates the SmartDashboard with Operator data
 */
public void updateDashboard() {

    // Buttons
    SmartDashboard.putBoolean(Dashboard.OperatorButtonA, controller.buttonA.get());
    SmartDashboard.putBoolean(Dashboard.OperatorButtonB, controller.buttonB.get());
    SmartDashboard.putBoolean(Dashboard.OperatorButtonX, controller.buttonX.get());
    SmartDashboard.putBoolean(Dashboard.OperatorButtonY, controller.buttonY.get());
    SmartDashboard.putBoolean(Dashboard.OperatorButtonLeftBumper, controller.buttonLeftBumper.get());
    SmartDashboard.putBoolean(Dashboard.OperatorButtonRightBumper, controller.buttonRightBumper.get());

    // Axes
    SmartDashboard.putNumber(Dashboard.OperatorAxisLeftX, controller.axisLeftX.getAxisValue());
    SmartDashboard.putNumber(Dashboard.OperatorAxisLeftY, controller.axisLeftY.getAxisValue());
    SmartDashboard.putNumber(Dashboard.OperatorAxisRightX, controller.axisRightX.getAxisValue());
    SmartDashboard.putNumber(Dashboard.OperatorAxisRightY, controller.axisRightY.getAxisValue());
    SmartDashboard.putNumber(Dashboard.OperatorAxisLeftTrigger, controller.axisLeftTrigger.getAxisValue());
    SmartDashboard.putNumber(Dashboard.OperatorAxisRightTrigger, controller.axisRightTrigger.getAxisValue());

}
 
开发者ID:vyrotek,项目名称:frc-robot,代码行数:23,代码来源:Operator.java

示例2: sendDataToSmartDashboard

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
/**
 * Sends shooter data to smart dashboard.
 */
public void sendDataToSmartDashboard() {
  if (RobotMap.IS_ROADKILL) {
    return;
  }
  SmartDashboard.putNumber("Shooter_Master_Talon_Power",
      shooterMaster.getOutputCurrent() * shooterMaster.getOutputVoltage());
  SmartDashboard.putNumber("Shooter_Slave_Talon_Power",
      shooterSlave.getOutputCurrent() * shooterSlave.getOutputVoltage());
  SmartDashboard.putNumber("Shooter_RPM_Requested", requestedRpm);
  SmartDashboard.putNumber("Shooter_RPM_Real", getShooterRpm());
  SmartDashboard.putNumber("Shooter_PID_error", shooterMaster.getClosedLoopError());
  
  SmartDashboard.putBoolean("Shooter_Fault", shooterFault);
  SmartDashboard.putBoolean("Shooter_Master_Ok", shooterMaster.getFaultHardwareFailure() == 0);
  SmartDashboard.putBoolean("Shooter_Master_Temp_Ok",
      shooterMaster.getStickyFaultOverTemp() == 0);
  SmartDashboard.putBoolean("Shooter_Slave_Ok", shooterSlave.getFaultHardwareFailure() == 0);
  SmartDashboard.putBoolean("Shooter_Slave_Temp_Ok", shooterSlave.getStickyFaultOverTemp() == 0);
  
  SmartDashboard.putBoolean("Shooter_Master_Present", shooterMaster.isAlive());
  SmartDashboard.putBoolean("Shooter_Slave_Present", shooterSlave.isAlive());
}
 
开发者ID:ligerbots,项目名称:Steamworks2017Robot,代码行数:26,代码来源:Shooter.java

示例3: initialize

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
protected void initialize() {
	ignoreUp = false;
    ignoreDown = false;
	if(clawLift.getLimitTop()){
		ignoreUp = true;
		raise = false;
	}
	else if(clawLift.getLimitBottom()){
		ignoreDown = true;
		raise = true;
	}
	else{
		raise = false;
	}
	SmartDashboard.putBoolean("raise", raise);
	SmartDashboard.putBoolean("ignoreUp", ignoreUp);
	SmartDashboard.putBoolean("ignoreDown", ignoreDown);
	SmartDashboard.putBoolean("up", clawLift.getLimitTop());
	SmartDashboard.putBoolean("down", clawLift.getLimitBottom());
	
	
}
 
开发者ID:Team395,项目名称:El-Jefe-2017,代码行数:23,代码来源:ClawSet.java

示例4: execute

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
/**
     * Continues looping until isFinished returns true(non-Javadoc)
     * Go straight until you reach distance or time
     */
    public void execute() {
        SmartDashboard.putString("Mode", "STRAIGHT");
//        System.out.println("STRAIGHT");

        double speed = Constants.STRAIGHT_SPEED * direction;

//        double leftSpeed = speed - gyroPID.getOutput();
        double leftSpeed = speed;
        double rightSpeed = speed + gyroPID.getOutput();

        driveTrain.setLeftMotors(leftSpeed);
        driveTrain.setRightMotors(rightSpeed);

        // stop if traveled distance
        straightDone = Math.abs(driveTrain.getDistanceTraveled()) >= Math.abs(distance);
        SmartDashboard.putBoolean("EncoderStoppedStraight", straightDone);
        SmartDashboard.putBoolean("TimeStoppedStraight", isTimedOut());
    }
 
开发者ID:Team334,项目名称:R2017,代码行数:23,代码来源:Straight.java

示例5: robotPeriodic

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
public void robotPeriodic(){
	lights.set(1);
	SmartDashboard.putBoolean("Pressurized", !compressor.getPressureSwitchValue());
	SmartDashboard.putBoolean("PressureCharging", compressor.enabled());
	SmartDashboard.putBoolean("PressureControlled", compressor.getClosedLoopControl());
	SmartDashboard.putNumber("PressureCurrent", compressor.getCompressorCurrent());
}
 
开发者ID:FRC4131,项目名称:FIRSTSteamworks2017,代码行数:8,代码来源:Robot.java

示例6: end

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
/**
 * Stop rotating the winch
 */
@Override
protected void end() {
    Robot.winch.off();
    logger.info("Winch reset");
    SmartDashboard.putBoolean("Winch Ready", true);

}
 
开发者ID:mr-glt,项目名称:FRC-2017-Command,代码行数:11,代码来源:ResetWinch.java

示例7: sendDataToSmartDashboard

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
/**
 * Sends diagnostics to SmartDashboard.
 */
public void sendDataToSmartDashboard() {
  SmartDashboard.putBoolean("Feeder_Present", feederTalon != null && feederTalon.isAlive());
  if (feederTalon != null) {
    SmartDashboard.putNumber("Feeder_Power",
        feederTalon.getOutputCurrent() * feederTalon.getOutputVoltage());
    
    SmartDashboard.putBoolean("Feeder_Ok", feederTalon.getFaultHardwareFailure() == 0);
    SmartDashboard.putBoolean("Feeder_Temp_Ok", feederTalon.getStickyFaultOverTemp() == 0);
  }
}
 
开发者ID:ligerbots,项目名称:Steamworks2017Robot,代码行数:14,代码来源:Feeder.java

示例8: setLock

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
/**
 *
 * @param value sets the solenoid state
 */
public void setLock(boolean value){
    if(value){
        sol.set(DoubleSolenoid.Value.kForward);
    }else{
        sol.set(DoubleSolenoid.Value.kReverse);
    }
    SmartDashboard.putBoolean("Winch Cylinder", value);
}
 
开发者ID:mr-glt,项目名称:FRC-2017-Command,代码行数:13,代码来源:WinchPush.java

示例9: updateBallStatus

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
/**
 * @param robotHasBall
 * 
 *            if the armIR senses that the robot already has
 *            a ball, send that info to the SmartDashboard.
 *            This will also turn the Driver Station green.
 * 
 * @author Ryan McGee
 */
public static void updateBallStatus (boolean robotHasBall)
{
    if (robotHasBall == true)
        {
        SmartDashboard.putBoolean("Has Ball", true);
        }
    else
        {
        SmartDashboard.putBoolean("Has Ball", false);
        }
}
 
开发者ID:FIRST-Team-339,项目名称:2017,代码行数:21,代码来源:Guidance.java

示例10: sendSensorData

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
public void sendSensorData() {
		SmartDashboard.putNumber("Right Encoder", driveTrain.getRightDistance());
		SmartDashboard.putNumber("Left Encoder", driveTrain.getLeftDistance());
		SmartDashboard.putNumber("LeftEncVelocity", Robot.driveTrain.getLeftSpeedEnc());
		SmartDashboard.putNumber("RightEncVelocity", Robot.driveTrain.getRightSpeedEnc());
		SmartDashboard.putNumber("LeftSpeed", Robot.driveTrain.getLeftSpeed());
		SmartDashboard.putNumber("RightSpeed", Robot.driveTrain.getRightSpeed());
		SmartDashboard.putNumber("ShootFire Amount Turned", Robot.shoot.getShootFireDistance());
		SmartDashboard.putNumber("ShootFire EncVelocity", Robot.shoot.getShootFireSpeedEnc());
		SmartDashboard.putNumber("ShootFire EncPosition", Robot.shoot.getShootFireDistance());
		SmartDashboard.putNumber("Intake", Robot.oi.getIntake());
		SmartDashboard.putString("ShootFire Speed Control", Robot.shoot.getShootFireMode());
		SmartDashboard.putBoolean("ShootFire is PID?", Robot.shoot.isShootFirePID());
		SmartDashboard.putBoolean("getHighGear", Robot.gear.getHighGear());
		SmartDashboard.putBoolean("haltGear", Robot.gear.getHaltGear());
		SmartDashboard.putBoolean("Is HalfOne?", Robot.driveTrain.getHalfOne());
		SmartDashboard.putBoolean("Is HalfTwo?", Robot.driveTrain.getHalfTwo());
		SmartDashboard.putBoolean("Right Encoder Movement", Robot.driveTrain.encoderEnabledRight());
		SmartDashboard.putBoolean("Left Encoder Movement", Robot.driveTrain.encoderEnabledLeft());
		//pidf
		
		
		
		SmartDashboard.putNumber("GyroAngle", Robot.driveTrain.getGyroAngle());
		// SmartDashboard.putBoolean("PTO On", Robot.driveTrain.getPTO());
		SmartDashboard.putString("DriveTrain control mode", Robot.driveTrain.getDriveTrainControlMode());
		SmartDashboard.putBoolean("DriveTrain is PID?", Robot.driveTrain.isDriveTrainPID());
		SmartDashboard.putNumber("DriveTrain PID: LP", Robot.driveTrain.getLvalueP());
		SmartDashboard.putNumber("DriveTrain PID: LI", Robot.driveTrain.getLvalueI());
		SmartDashboard.putNumber("DriveTrain PID: LD", Robot.driveTrain.getLvalueD());
//		SmartDashboard.putNumber("DriveTrain PID: F", Robot.driveTrain.getValueF());
		
		
	}
 
开发者ID:2729StormRobotics,项目名称:StormRobotics2017,代码行数:35,代码来源:Robot.java

示例11: sendDataToSmartDashboard

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
@Override
public void sendDataToSmartDashboard() {
  if (compressor != null) {
    SmartDashboard.putBoolean("Compressor_Closed_Loop", isCompressorOn());
    SmartDashboard.putBoolean("Compressor_Pressure_Switch", compressor.getPressureSwitchValue());
  }
}
 
开发者ID:ligerbots,项目名称:Steamworks2017Robot,代码行数:8,代码来源:Pneumatics.java

示例12: displayData

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
public static void displayData() {
    SmartDashboard.putNumber("Area", area);
    SmartDashboard.putNumber("Offset", offset);
    SmartDashboard.putNumber("Angle", angle);
    SmartDashboard.putBoolean("FoundTarget", foundTarget);
    SmartDashboard.putBoolean("Vision Running", visionRunning());
}
 
开发者ID:Team334,项目名称:R2017,代码行数:8,代码来源:VisionData.java

示例13: initialize

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
@Override
protected void initialize() {
    logger.info("WinchToggle on");
    SmartDashboard.putBoolean("Winch Ready", false);
}
 
开发者ID:mr-glt,项目名称:FRC-2017-Command,代码行数:6,代码来源:Climb.java

示例14: execute

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
@Override
protected void execute() {
    Robot.winchPush.setLock(true);
    SmartDashboard.putBoolean("Winch Set", false);
}
 
开发者ID:mr-glt,项目名称:FRC-2017-Command,代码行数:6,代码来源:WinchToggle.java

示例15: isFinished

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
protected boolean isFinished() {
	 SmartDashboard.putBoolean("OnTargetRight", headingPID.onTarget());
    return headingPID.onTarget();
}
 
开发者ID:RobotsByTheC,项目名称:CMonster2017,代码行数:5,代码来源:TurnRight.java


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