本文整理匯總了Java中edu.wpi.first.wpilibj.smartdashboard.SmartDashboard.containsKey方法的典型用法代碼示例。如果您正苦於以下問題:Java SmartDashboard.containsKey方法的具體用法?Java SmartDashboard.containsKey怎麽用?Java SmartDashboard.containsKey使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類edu.wpi.first.wpilibj.smartdashboard.SmartDashboard
的用法示例。
在下文中一共展示了SmartDashboard.containsKey方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ShooterFeederCommand
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; //導入方法依賴的package包/類
/**
* Creates a new ShooterFeederCommand.
*
* @param desiredShooterRpm The rpm we need the shooter at.
* @param getFromDashboard Whether to get RPM from the dashboard
*/
public ShooterFeederCommand(double desiredShooterRpm, boolean getFromDashboard) {
this.getFromDashboard = getFromDashboard;
if (!SmartDashboard.containsKey("Shooter_Test_Rpm")) {
SmartDashboard.putNumber("Shooter_Test_Rpm", RobotMap.SHOOTING_RPM);
}
requires(Robot.feeder);
requires(Robot.shooter);
requires(Robot.stirrer);
this.desiredShooterRpm = desiredShooterRpm;
}