本文整理汇总了Java中edu.wpi.first.wpilibj.smartdashboard.SmartDashboard.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java SmartDashboard.getBoolean方法的具体用法?Java SmartDashboard.getBoolean怎么用?Java SmartDashboard.getBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.smartdashboard.SmartDashboard
的用法示例。
在下文中一共展示了SmartDashboard.getBoolean方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readTestingEnvironment
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
/**
* grabs values from testing environment
*/
public void readTestingEnvironment() {
RobotConstants.isInverted = SmartDashboard.getBoolean("isInverted", false);
RobotConstants.isTrigger = SmartDashboard.getBoolean("isTrigger", false);
RobotConstants.AUTO_SPEED = SmartDashboard.getNumber("AUTO_SPEED", 0);
RobotConstants.AUTO_SPEED = SmartDashboard.getNumber("INCHES_TO_ENCODER", 0);
RobotConstants.AUTO_DRIVE_TOLERANCE = SmartDashboard.getNumber("AUTO_DRIVE_TOLERANCE", 0);
RobotConstants.AUTO_DRIVE_RHOOK_D1 = SmartDashboard.getNumber("AUTO_DRIVE_RHOOK_D1", 0);
RobotConstants.AUTO_DRIVE_RHOOK_D2 = SmartDashboard.getNumber("AUTO_DRIVE_RHOOK_D2", 0);
RobotConstants.AUTO_DRIVE_LHOOK_D1 = SmartDashboard.getNumber("AUTO_DRIVE_LHOOK_D1", 0);
RobotConstants.AUTO_DRIVE_LHOOK_D2 = SmartDashboard.getNumber("AUTO_DRIVE_LHOOK_D2", 0);
RobotConstants.AUTO_DRIVE_MHOOK_D1 = SmartDashboard.getNumber("AUTO_DRIVE_MHOOK_D1", 0);
RobotConstants.AUTO_DRIVE_P = SmartDashboard.getNumber("AUTO_DRIVE_P", 0);
RobotConstants.AUTO_DRIVE_I = SmartDashboard.getNumber("AUTO_DRIVE_I", 0);
RobotConstants.AUTO_DRIVE_D = SmartDashboard.getNumber("AUTO_DRIVE_D", 0);
RobotConstants.AUTO_TURN_TOLERANCE = (int) SmartDashboard.getNumber("AUTO_TURN_TOLERANCE", 0);
RobotConstants.AUTO_TURN_RHOOK_SETPOINT = (int) SmartDashboard.getNumber("AUTO_TURN_RHOOK_SETPOINT", 0);
RobotConstants.AUTO_TURN_LHOOK_SETPOINT = (int) SmartDashboard.getNumber("AUTO_TURN_LHOOK_SETPOINT", 0);
RobotConstants.AUTO_TURN_P = SmartDashboard.getNumber("AUTO_TURN_P", 0);
RobotConstants.AUTO_TURN_I = SmartDashboard.getNumber("AUTO_TURN_I", 0);
RobotConstants.AUTO_TURN_D = SmartDashboard.getNumber("AUTO_TURN_D", 0);
RobotConstants.FLYWHEEL_SPEED = SmartDashboard.getNumber("FLYWHEEL_SPEED", 0);
RobotConstants.VISION_TOLERANCE = (int) SmartDashboard.getNumber("VISION_TOLERANCE", 0);
RobotConstants.VISION_X_SETPOINT = (int) SmartDashboard.getNumber("VISION_X_SETPOINT", 0);
RobotConstants.VISION_Y_SETPOINT = (int) SmartDashboard.getNumber("VISION_Y_SETPOINT", 0);
RobotConstants.VISION_P = SmartDashboard.getNumber("VISION_P", 0);
RobotConstants.VISION_I = SmartDashboard.getNumber("VISION_I", 0);
RobotConstants.VISION_D = SmartDashboard.getNumber("VISION_D", 0);
RobotConstants.GEAR_TOLERANCE = SmartDashboard.getNumber("GEAR_TOLERANCE", 0);
RobotConstants.GEAR_INIT_SETPOINT = SmartDashboard.getNumber("GEAR_INIT_SETPOINT", 0);
RobotConstants.GEAR_FINAL_SETPOINT = SmartDashboard.getNumber("GEAR_FINAL_SETPOINT", 0);
RobotConstants.GEAR_P = SmartDashboard.getNumber("GEAR_P", 0);
RobotConstants.GEAR_I = SmartDashboard.getNumber("GEAR_I", 0);
RobotConstants.GEAR_D = SmartDashboard.getNumber("GEAR_D", 0);
}
示例2: getBoolean
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //导入方法依赖的package包/类
public static boolean getBoolean(String key, boolean defaultValue) {
return SmartDashboard.getBoolean(key, defaultValue);
}