當前位置: 首頁>>代碼示例>>Java>>正文


Java DoubleConfigFileParameter.getValue方法代碼示例

本文整理匯總了Java中com.wildstangs.config.DoubleConfigFileParameter.getValue方法的典型用法代碼示例。如果您正苦於以下問題:Java DoubleConfigFileParameter.getValue方法的具體用法?Java DoubleConfigFileParameter.getValue怎麽用?Java DoubleConfigFileParameter.getValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.wildstangs.config.DoubleConfigFileParameter的用法示例。


在下文中一共展示了DoubleConfigFileParameter.getValue方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: defineSteps

import com.wildstangs.config.DoubleConfigFileParameter; //導入方法依賴的package包/類
public void defineSteps()
{
    firstAngle = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstRelativeAngle", 45);
    secondAngle = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondRelativeAngle", 45);
    firstDriveDistance = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstDriveDistance", -100);
    firstDriveVelocity = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstDriveVelocity", 0.0);
    secondDriveDistance = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondDriveDistance", -30);
    secondDriveVelocity = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondDriveVelocity", 0.0);
    
    programSteps[0] = new WsAutonomousStepStartDriveUsingMotionProfile(firstDriveDistance.getValue(), firstDriveVelocity.getValue());
    programSteps[1] = new WsAutonomousStepWaitForDriveMotionProfile();
    programSteps[2] = new WsAutonomousStepStopDriveUsingMotionProfile(); 
    programSteps[3] = new WsAutonomousStepQuickTurn(firstAngle.getValue());
    programSteps[4] = new WsAutonomousStepStartDriveUsingMotionProfile(secondDriveDistance.getValue(), secondDriveVelocity.getValue());
    programSteps[5] = new WsAutonomousStepWaitForDriveMotionProfile();
    programSteps[6] = new WsAutonomousStepStopDriveUsingMotionProfile();
    programSteps[7] = new WsAutonomousStepQuickTurn(secondAngle.getValue());
}
 
開發者ID:wildstang111,項目名稱:2013_drivebase_proto,代碼行數:25,代碼來源:WsAutonomousProgramDrivePatterns.java

示例2: defineSteps

import com.wildstangs.config.DoubleConfigFileParameter; //導入方法依賴的package包/類
public void defineSteps() {
        distance = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".distance", 10.0);
        heading = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".heading", 0.0);
        programSteps[0] = new WsAutonomousStepStartDriveUsingMotionProfileAndHeading(distance.getValue(), 0.0, heading.getValue());
        programSteps[1] = new WsAutonomousStepWaitForDriveMotionProfile(); 
        programSteps[2] = new WsAutonomousStepStopDriveUsingMotionProfile();

//        programSteps[3] = new WsAutonomousStepEnableDriveDistancePid();
//        programSteps[4] = new WsAutonomousStepSetDriveDistancePidSetpoint(distance.getValue());
//        programSteps[5] = new WsAutonomousStepWaitForDriveDistancePid();
//        programSteps[6] = new WsAutonomousStepStartDriveUsingMotionProfile(distance.getValue(), 0.0);
//        programSteps[7] = new WsAutonomousStepWaitForDriveMotionProfile(); 
//        programSteps[8] = new WsAutonomousStepStopDriveUsingMotionProfile();
    }
 
開發者ID:wildstang111,項目名稱:2013_drivebase_proto,代碼行數:15,代碼來源:WsAutonomousProgramDriveDistanceMotionProfile.java

示例3: WsCompressor

import com.wildstangs.config.DoubleConfigFileParameter; //導入方法依賴的package包/類
public WsCompressor(String name, int pressureSwitchSlot, int pressureSwitchChannel, int compresssorRelaySlot, int compressorRelayChannel)
{
    super(name);
    compressor = new Compressor(pressureSwitchSlot, pressureSwitchChannel, compresssorRelaySlot, compressorRelayChannel);
    compressor.start();
    
    LOW_VOLTAGE_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), "LowVoltage", 0.5);
    HIGH_VOLTAGE_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), "HighVoltage", 4.0);
    MAX_PSI_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), "MaxPSI", 115);
    
    lowVoltage = LOW_VOLTAGE_CONFIG.getValue();
    highVoltage = HIGH_VOLTAGE_CONFIG.getValue();
    maxPSI = MAX_PSI_CONFIG.getValue();
}
 
開發者ID:wildstang111,項目名稱:2014_software,代碼行數:15,代碼來源:WsCompressor.java

示例4: Arm

import com.wildstangs.config.DoubleConfigFileParameter; //導入方法依賴的package包/類
public Arm(int victorAngleIndex, int armRollerVictorIndex, int potIndex, boolean front)
{
    this.VICTOR_ANGLE_INDEX = victorAngleIndex;
    this.ARM_ROLLER_VICTOR_INDEX = armRollerVictorIndex;
    this.POT_INDEX = potIndex;
    
    HARD_TOP_VOLTAGE_VALUE_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), (front ? "Front" : "Back") + ".HardTopVoltageValue", 4.8);
    HARD_BOTTOM_VOLTAGE_VALUE_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), (front ? "Front" : "Back") + ".HardBottomVoltageValue", 0.2);
    
    TOP_VOLTAGE_VALUE_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), (front ? "Front" : "Back") + ".TopVoltageValue", 5.1);
    BOTTOM_VOLTAGE_VALUE_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), (front ? "Front" : "Back") + ".BottomVoltageValue", 0.0);
    ROLLER_FORWARD_SPEED_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), (front ? "Front" : "Back") + ".RollerForwardSpeed", 0.5);
    ROLLER_REVERSE_SPEED_CONFIG = new DoubleConfigFileParameter(this.getClass().getName(), (front ? "Front" : "Back") + ".RollerReverseSpeed", -0.5);
    HIGH_BOUND_CONFIG = new IntegerConfigFileParameter(this.getClass().getName(), (front ? "Front" : "Back") + ".HighAngle", 359);
    LOW_BOUND_CONFIG = new IntegerConfigFileParameter(this.getClass().getName(), (front ? "Front" : "Back") + ".LowAngle", -20);
    
    rollerForwardSpeed = ROLLER_FORWARD_SPEED_CONFIG.getValue();
    rollerReverseSpeed = ROLLER_REVERSE_SPEED_CONFIG.getValue();
    topVoltage = TOP_VOLTAGE_VALUE_CONFIG.getValue();
    bottomVoltage = BOTTOM_VOLTAGE_VALUE_CONFIG.getValue();
    hardTopVoltage = HARD_TOP_VOLTAGE_VALUE_CONFIG.getValue();
    hardBottomVoltage = HARD_BOTTOM_VOLTAGE_VALUE_CONFIG.getValue();
    renewVoltagesOnConfigChange = RENEW_VOLTAGES_ON_CONFIG_CHANGE_CONFIG.getValue();
    
    this.front = front;
    this.pidInput = new ArmPotPidInput(potIndex, topVoltage, bottomVoltage);
    this.pid = new PidController(this.pidInput, new ArmVictorPidOutput(victorAngleIndex), front ? "FrontArmPid" : "BackArmPid");
    this.pid.disable();
    
    
}
 
開發者ID:wildstang111,項目名稱:2014_software,代碼行數:32,代碼來源:Arm.java


注:本文中的com.wildstangs.config.DoubleConfigFileParameter.getValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。