本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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());
}
示例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());
}
}
示例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());
}
示例13: initialize
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
@Override
protected void initialize() {
logger.info("WinchToggle on");
SmartDashboard.putBoolean("Winch Ready", false);
}
示例14: execute
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
@Override
protected void execute() {
Robot.winchPush.setLock(true);
SmartDashboard.putBoolean("Winch Set", false);
}
示例15: isFinished
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
protected boolean isFinished() {
SmartDashboard.putBoolean("OnTargetRight", headingPID.onTarget());
return headingPID.onTarget();
}