本文整理匯總了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);
}