Java Code Examples for edu.wpi.first.wpilibj.smartdashboard.SmartDashboard#putBoolean()
The following examples show how to use
edu.wpi.first.wpilibj.smartdashboard.SmartDashboard#putBoolean() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Vacuum.java From FRC-2019-Public with MIT License | 6 votes |
@Override public void outputTelemetry() { SmartDashboard.putBoolean("Vacuum: Low sensor", getLowerPressureSensor()); SmartDashboard.putBoolean("Vacuum: High sensor", getHigherPressureSensor()); String state = "default"; if (mPeriodicIO.thresholdState == ThresholdState.ABOVE) { state = "Above"; } else if (mPeriodicIO.thresholdState == ThresholdState.BETWEEN) { state = "Between"; } else if (mPeriodicIO.thresholdState == ThresholdState.BELOW) { state = "Below"; } SmartDashboard.putString("Vacuum: Threshold state", state); if (mCSVWriter != null) { mCSVWriter.write(); } }
Example 2
Source File: Elevator.java From FRC-2018-Public with MIT License | 6 votes |
@Override public void outputTelemetry() { SmartDashboard.putNumber("Elevator Output %", mPeriodicIO.output_percent); SmartDashboard.putNumber("Elevator RPM", getRPM()); SmartDashboard.putNumber("Elevator Current", mMaster.getOutputCurrent()); // SmartDashboard.putNumber("Elevator Error", mMaster.getClosedLoopError(0) / kEncoderTicksPerInch); SmartDashboard.putNumber("Elevator Height", getInchesOffGround()); SmartDashboard.putBoolean("Elevator Limit", mPeriodicIO.limit_switch); SmartDashboard.putNumber("Elevator Sensor Height", mPeriodicIO.position_ticks); SmartDashboard.putNumber("Elevator Last Expected Trajectory", mPeriodicIO.demand); SmartDashboard.putNumber("Elevator Current Trajectory Point", mPeriodicIO.active_trajectory_position); SmartDashboard.putNumber("Elevator Traj Vel", mPeriodicIO.active_trajectory_velocity); SmartDashboard.putNumber("Elevator Traj Accel", mPeriodicIO.active_trajectory_accel_g); SmartDashboard.putBoolean("Elevator Has Sent Trajectory", hasFinishedTrajectory()); }
Example 3
Source File: Wrist.java From FRC-2018-Public with MIT License | 6 votes |
@Override public synchronized void outputTelemetry() { SmartDashboard.putNumber("Wrist Angle", getAngle()); SmartDashboard.putNumber("Wrist Position", getPosition()); SmartDashboard.putNumber("Wrist Ticks", mPeriodicIO.position_ticks); SmartDashboard.putNumber("Wrist periodic demand", mPeriodicIO.demand); SmartDashboard.putBoolean("LIMR", mPeriodicIO.limit_switch); SmartDashboard.putNumber("Wrist RPM", getRPM()); SmartDashboard.putNumber("Wrist Power %", mPeriodicIO.output_percent); SmartDashboard.putBoolean("Wrist Limit Switch", mPeriodicIO.limit_switch); SmartDashboard.putNumber("Wrist Last Expected Trajectory", getSetpoint()); SmartDashboard.putNumber("Wrist Current Trajectory Point", mPeriodicIO.active_trajectory_position); SmartDashboard.putNumber("Wrist Traj Vel", mPeriodicIO.active_trajectory_velocity); SmartDashboard.putNumber("Wrist Traj Accel", mPeriodicIO.active_trajectory_acceleration_rad_per_s2); SmartDashboard.putBoolean("Wrist Has Sent Trajectory", hasFinishedTrajectory()); SmartDashboard.putNumber("Wrist feedforward", mPeriodicIO.feedforward); if (mCSVWriter != null) { mCSVWriter.write(); } }
Example 4
Source File: ManualCommandDrive.java From PowerUp-2018 with GNU General Public License v3.0 | 6 votes |
protected void execute() { SmartDashboard.putNumber("Tilt Angle", Robot.SUB_DRIVE.getYAngle()); SmartDashboard.putBoolean("Docked", Robot.SUB_DRIVE.docking); SmartDashboard.putBoolean("Reversed", Robot.SUB_DRIVE.reversing); SmartDashboard.putNumber("Right Encoder Inches", Robot.SUB_DRIVE.pid.getRightInches()); SmartDashboard.putNumber("Left Encoder Inches", Robot.SUB_DRIVE.pid.getLeftInches()); switch (Robot.SUB_DRIVE.drivetrain) { case ROCKET_LEAGUE: Robot.SUB_DRIVE.driveRLTank(OI.DRIVER, Util.getAndSetDouble("Rocket Ramp", .75), Util.getAndSetDouble("Drive Inhibitor", 1)); break; case FORZA: Robot.SUB_DRIVE.driveForza(OI.DRIVER, Util.getAndSetDouble("Forza Ramp", .75), Util.getAndSetDouble("Radius", 1), Util.getAndSetDouble("Drive Inhibitor", 1)); break; } }
Example 5
Source File: ServoMotorSubsystem.java From FRC-2019-Public with MIT License | 5 votes |
@Override public void outputTelemetry() { SmartDashboard.putNumber(mConstants.kName + ": Position (units)", mPeriodicIO.position_units); SmartDashboard.putBoolean(mConstants.kName + ": Homing Location", atHomingLocation()); // synchronized (this) { // if (mCSVWriter != null) { // mCSVWriter.write(); // } // } }
Example 6
Source File: CheesyVision2.java From FRC-2018-Public with MIT License | 5 votes |
@Override public void outputTelemetry() { SmartDashboard.putBoolean("Connected to CheesyVision2", isConnected()); SmartDashboard.putNumber("Desired Height (0 cubes)", getDesiredHeight(false, 0, true)); SmartDashboard.putNumber("Desired Height (1 cube)", getDesiredHeight(false, 1, true)); SmartDashboard.putNumber("Desired Height (2 cubes)", getDesiredHeight(false, 2, true)); }
Example 7
Source File: CarriageCanifier.java From FRC-2019-Public with MIT License | 4 votes |
@Override public synchronized void outputTelemetry() { SmartDashboard.putBoolean("HasBall:", mPeriodicInputs.has_ball_); SmartDashboard.putBoolean("LowPressureSensor:", mPeriodicInputs.low_pressure_channel_); SmartDashboard.putBoolean("HighPressureSensor:", mPeriodicInputs.high_pressure_channel_); }
Example 8
Source File: Limelight.java From FRC-2019-Public with MIT License | 4 votes |
@Override public synchronized void outputTelemetry() { SmartDashboard.putBoolean(mConstants.kName + ": Has Target", mSeesTarget); SmartDashboard.putNumber(mConstants.kName + ": Pipeline Latency (ms)", mPeriodicIO.latency); }
Example 9
Source File: Intake.java From FRC-2018-Public with MIT License | 4 votes |
@Override public void outputTelemetry() { SmartDashboard.putBoolean("LeftBanner", getLeftBannerSensor()); SmartDashboard.putBoolean("RightBanner", getRightBannerSensor()); }
Example 10
Source File: OI.java From PowerUp-2018 with GNU General Public License v3.0 | 4 votes |
/** assigns what every SmartDash and controller button does */ public OI() { /// manipulator wheels Button spinIn = new JoystickButton(OPERATOR, Xbox.RB); spinIn.whileHeld(new ButtonCommandEat()); Button spinOut = new JoystickButton(OPERATOR, Xbox.LB); spinOut.whileHeld(new ButtonCommandSpit()); /// manipulator clamp Button toggleClamp = new JoystickButton(OPERATOR, Xbox.A); toggleClamp.toggleWhenActive(new ToggleCommandClamp()); /// candy cane Button toggleHook = new JoystickButton(OPERATOR, Xbox.B); toggleHook.toggleWhenActive(new ToggleCommandHook()); /// drop the mast Button dropIt = new JoystickButton(OPERATOR, Xbox.X); dropIt.toggleWhenPressed(new ButtonCommandHitTheDeck()); /// Reversing mode Button toggleReverse = new JoystickButton(DRIVER, Xbox.Y); toggleReverse.toggleWhenPressed(new ToggleCommandReverse()); /// Docking mode Button toggleDock = new JoystickButton(DRIVER, Xbox.X); toggleDock.toggleWhenPressed(new ToggleCommandDock()); /// To Compress, or Not To Compress. It is now an option. SmartDashboard.putData("Disable Compressor", new ToggleCommandKillCompressor()); /// PID SmartDashboard.putData("Kill PID", new ToggleCommandKillPID()); SmartDashboard.putNumber("Right Encoder Position", 0); SmartDashboard.putNumber("Left Encoder Position", 0); /// limit switch displays SmartDashboard.putBoolean("Lower Screw", true); SmartDashboard.putBoolean("Upper Screw", false); SmartDashboard.putBoolean("Lower Pinion", true); SmartDashboard.putBoolean("Upper Pinion", false); SmartDashboard.putNumber("Left inches", 0); SmartDashboard.putNumber("Right inches", 0); DriverStation.reportWarning("OI IS INSTANTIATED", false); /// Cyborg command testers SmartDashboard.putData("Drive Direct", new CyborgCommandDriveDirect(Util.getAndSetDouble("Drive Direct Power", 0))); SmartDashboard.putData("Drive Distance", new CyborgCommandDriveDistance(Util.getAndSetDouble("Drive Distance Inches", 0))); SmartDashboard.putData("Drive Until Error", new CyborgCommandDriveUntilError()); SmartDashboard.putData("Rotate Degree", new CyborgCommandRotateDegrees(Util.getAndSetDouble("Rotate Degrees", 0))); SmartDashboard.putData("Spit", new CyborgCommandSpit((long)Util.getAndSetDouble("Spit Time", 500))); SmartDashboard.putData("Raise to Position: Pinion Up", new CyborgCommandGrow(Mast.PINION_UP)); SmartDashboard.putData("Raise to Position: Pinion Down", new CyborgCommandGrow(Mast.PINION_DOWN)); SmartDashboard.putData("Raise to Position: Screw Up", new CyborgCommandGrow(Mast.SCREW_UP)); SmartDashboard.putData("Raise to Position: Screw Down", new CyborgCommandGrow(Mast.SCREW_DOWN)); }
Example 11
Source File: SubsystemMast.java From PowerUp-2018 with GNU General Public License v3.0 | 4 votes |
public void publishSwitches() { SmartDashboard.putBoolean("Lower Screw", !lowerScrewLimit.get()); SmartDashboard.putBoolean("Upper Screw", !upperScrewLimit.get()); SmartDashboard.putBoolean("Lower Pinion", !lowerPinionLimit.get()); SmartDashboard.putBoolean("Upper Pinion", !upperPinionLimit.get()); }