本文整理汇总了Java中edu.wpi.first.wpilibj.Preferences.containsKey方法的典型用法代码示例。如果您正苦于以下问题:Java Preferences.containsKey方法的具体用法?Java Preferences.containsKey怎么用?Java Preferences.containsKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.Preferences
的用法示例。
在下文中一共展示了Preferences.containsKey方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: holdElbowPosition
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static int holdElbowPosition() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("holdElbowPosition")) {
prefs.putInt("holdElbowPosition", 3589);
}
return prefs.getInt("holdElbowPosition", 3589);
}
示例2: holdWristPosition
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static int holdWristPosition() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("holdWristPosition")) {
prefs.putInt("holdWristPosition", 2027);
}
return prefs.getInt("holdWristPosition", 2027);
}
示例3: latchReadyPosition
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double latchReadyPosition() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("latchReadyPostion")) {
prefs.putDouble("latchReadyPostion", 0.32);
}
return prefs.getDouble("latchReadyPostion", 0.32);
}
示例4: latchShootPosition
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double latchShootPosition() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("latchShootPosition")) {
prefs.putDouble("latchShootPosition", 1.0);
}
return prefs.getDouble("latchShootPosition", 1.0);
}
示例5: latchLockPosition
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double latchLockPosition() { //position to lower server after latch to ensure it doesn't launch prematurely
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("latchLockPosition")) {
prefs.putDouble("latchLockPosition", 0.01);
}
return prefs.getDouble("latchLockPosition", 0.01);
}
示例6: winchPower
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double winchPower() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("winchPower")) {
prefs.putDouble("winchPower", 1.0);
}
return prefs.getDouble("winchPower", 1.0);
}
示例7: winchWoundDistance
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double winchWoundDistance() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("winchWoundDistance")) {
prefs.putDouble("winchWoundDistance", 1);
}
return prefs.getDouble("winchWoundDistance", 1);
}
示例8: winchUnwoundDistance
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double winchUnwoundDistance() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("winchUnwoundDistance")) {
prefs.putDouble("winchUnwoundDistance", 4.6);
}
return prefs.getDouble("winchUnwoundDistance", 4.6);
}
示例9: pickupWheelsPower
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double pickupWheelsPower() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("pickupWheelsPower")) {
prefs.putDouble("pickupWheelsPower", -12);
}
return prefs.getDouble("pickupWheelsPower", -12);
}
示例10: pixelsPerEncoderChange
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double pixelsPerEncoderChange() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("pixelsPerEncoderChange")) {
prefs.putDouble("pixelsPerEncoderChange", 0.735);
}
return prefs.getDouble("pixelsPerEncoderChange", 0.735);
}
示例11: manipulatorWristRestPosition
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static int manipulatorWristRestPosition() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("manipulatorWristRestPosition")) {
prefs.putInt("manipulatorWristRestPosition", 2100);
}
return prefs.getInt("manipulatorWristRestPosition", 2100);
}
示例12: manipulatorElbowRestPosition
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static int manipulatorElbowRestPosition() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("manipulatorElbowRestPosition")) {
prefs.putInt("manipulatorElbowRestPosition", 1900);
}
return prefs.getInt("manipulatorElbowRestPosition", 1900);
}
示例13: pixToTurnMax
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public static double pixToTurnMax() {
Preferences prefs = Preferences.getInstance();
if (!prefs.containsKey("pixToTurnMax")) {
prefs.putDouble("pixToTurnMax", 1.0);
}
return prefs.getDouble("pixToTurnMax", 1.0);
}
示例14: getPreferencesDouble
import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
/**
* Retrieve numbers from the preferences table. If the specified key is in
* the preferences table, then the preference value is returned. Otherwise,
* return the backup value, and also start a new entry in the preferences
* table.
*/
public static double getPreferencesDouble(String key, double backup) {
Preferences preferences = Preferences.getInstance();
if (!preferences.containsKey(key)) {
preferences.putDouble(key, backup);
}
return preferences.getDouble(key, backup);
}