当前位置: 首页>>代码示例>>Java>>正文


Java Preferences.getDouble方法代码示例

本文整理汇总了Java中edu.wpi.first.wpilibj.Preferences.getDouble方法的典型用法代码示例。如果您正苦于以下问题:Java Preferences.getDouble方法的具体用法?Java Preferences.getDouble怎么用?Java Preferences.getDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.wpi.first.wpilibj.Preferences的用法示例。


在下文中一共展示了Preferences.getDouble方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例2: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例3: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例4: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例5: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例6: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例7: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例8: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例9: 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);
}
 
开发者ID:Woodland4678,项目名称:Cybercavs2016Code,代码行数:8,代码来源:Robot.java

示例10: 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);
}
 
开发者ID:firebears-frc,项目名称:FB2016,代码行数:14,代码来源:RobotMap.java

示例11: DashboardPID

import edu.wpi.first.wpilibj.Preferences; //导入方法依赖的package包/类
public DashboardPID( String PIDName, PIDController pidController ) {
    m_pidController = pidController;
    pName = PIDName+"P";
    iName = PIDName+"I";
    dName = PIDName+"D";
    Preferences prefs = Preferences.getInstance();
    double p = prefs.getDouble(pName, pidController.getP());
    double i = prefs.getDouble(iName, pidController.getI());
    double d = prefs.getDouble(dName, pidController.getD());
    SmartDashboard.putNumber(pName, p);
    SmartDashboard.putNumber(iName, i);
    SmartDashboard.putNumber(dName, d);
    pidController.setPID(p, i, d);        
}
 
开发者ID:Tmm2471,项目名称:Swerve,代码行数:15,代码来源:DashboardPID.java


注:本文中的edu.wpi.first.wpilibj.Preferences.getDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。