• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DoubleConfigFileParameter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.wildstangs.config.DoubleConfigFileParameter的典型用法代码示例。如果您正苦于以下问题:Java DoubleConfigFileParameter类的具体用法?Java DoubleConfigFileParameter怎么用?Java DoubleConfigFileParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DoubleConfigFileParameter类属于com.wildstangs.config包,在下文中一共展示了DoubleConfigFileParameter类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: defineConfigValues

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
private void defineConfigValues() {
    StartDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".StartDrive", 60.5);
    AngleTurn = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".AngleTurn", 90);
    SecondDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondDrive", 60.5);
    ThirdDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".ThirdDrive", 60.5);
    FourthDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FourthDrive", 60.5);
    FifthDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FifthDrive", 60.5);
    FirstEnterWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstEnterWheelSetPoint", 2800);
    FirstExitWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstExitWheelSetPoint", 3550);
    FirstShooterAngle = new AutonomousBooleanStartPositionConfigFileParameter("FirstShooterAngle", false);
    SecondEnterWheelSetPoint = new AutonomousIntegerConfigFileParameter("FrontPyramid.EnterWheelSetPoint", 2100);
    SecondExitWheelSetPoint = new AutonomousIntegerConfigFileParameter("FrontPyramid.ExitWheelSetPoint", 2750);
    SecondShooterAngle = new AutonomousBooleanConfigFileParameter("FrontPyramid.ShooterAngle", true);
    ThirdFrisbeeDelay = new AutonomousIntegerConfigFileParameter("ThirdFrisbeeDelay", 700);
    AccumulatorDelay = new AutonomousIntegerConfigFileParameter("LowerAccumulatorDelay", 300);
    startPreset = new WsShooter.Preset(FirstEnterWheelSetPoint.getValue(),
            FirstExitWheelSetPoint.getValue(),
            FirstShooterAngle.getValue()
            ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
    secondShooterPreset = new WsShooter.Preset(SecondEnterWheelSetPoint.getValue(),
            SecondExitWheelSetPoint.getValue(),
            SecondShooterAngle.getValue()
            ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:25,代码来源:WsAutonomousProgramShootSevenManualFinger.java


示例2: defineConfigValues

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
private void defineConfigValues() {
    TwistAngle = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".TwistAngle", 30);
    FirstDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstDrive", 60.5);
    SecondDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondDrive", 60.5);
    ThirdDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".ThirdDrive", 60.5);

    FirstEnterWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstEnterWheelSetPoint", 2800);
    FirstExitWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstExitWheelSetPoint", 3550);
    FirstShooterAngle = new AutonomousBooleanStartPositionConfigFileParameter("FirstShooterAngle", false);
    SecondEnterWheelSetPoint = new AutonomousIntegerConfigFileParameter("FrontPyramid.EnterWheelSetPoint", 2100);
    SecondExitWheelSetPoint = new AutonomousIntegerConfigFileParameter("FrontPyramid.ExitWheelSetPoint", 2750);
    SecondShooterAngle = new AutonomousBooleanConfigFileParameter("FrontPyramid.ShooterAngle", true);
    ThirdFrisbeeDelay = new AutonomousIntegerConfigFileParameter("ThirdFrisbeeDelay", 700);
    FunnelatorLoadDelay = new AutonomousIntegerConfigFileParameter("FunnelatorLoadDelay", 300);

    
    firstShooterPreset = new WsShooter.Preset(FirstEnterWheelSetPoint.getValue(),
            FirstExitWheelSetPoint.getValue(),
            FirstShooterAngle.getValue()
            ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
    secondShooterPreset = new WsShooter.Preset(SecondEnterWheelSetPoint.getValue(),
            SecondExitWheelSetPoint.getValue(),
            SecondShooterAngle.getValue()
            ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:26,代码来源:WsAutonomousProgramShootFiveTwist.java


示例3: defineConfigValues

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
private void defineConfigValues() {
    FirstDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstDrive", 60.5);
    SecondDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondDrive", 60.5);
    ThirdDrive = new DoubleConfigFileParameter(this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".ThirdDrive", 60.5);

    FirstEnterWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstEnterWheelSetPoint", 2800);
    FirstExitWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstExitWheelSetPoint", 3550);
    FirstShooterAngle = new AutonomousBooleanStartPositionConfigFileParameter("FirstShooterAngle", false);
    SecondEnterWheelSetPoint = new AutonomousIntegerConfigFileParameter("FrontPyramid.EnterWheelSetPoint", 2100);
    SecondExitWheelSetPoint = new AutonomousIntegerConfigFileParameter("FrontPyramid.ExitWheelSetPoint", 2750);
    SecondShooterAngle = new AutonomousBooleanConfigFileParameter("FrontPyramid.ShooterAngle", true);
    ThirdFrisbeeDelay = new AutonomousIntegerConfigFileParameter("ThirdFrisbeeDelay", 700);
    FunnelatorLoadDelay = new AutonomousIntegerConfigFileParameter("FunnelatorLoadDelay", 300);

    firstShooterPreset = new WsShooter.Preset(FirstEnterWheelSetPoint.getValue(),
            FirstExitWheelSetPoint.getValue(),
            FirstShooterAngle.getValue()
            ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
    secondShooterPreset = new WsShooter.Preset(SecondEnterWheelSetPoint.getValue(),
            SecondExitWheelSetPoint.getValue(),
            SecondShooterAngle.getValue()
            ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:24,代码来源:WsAutonomousProgramShootFiveAndGrab.java


示例4: 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


示例5: defineSteps

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
public void defineSteps() {
    firstAngle = new DoubleConfigFileParameter(
            this.getClass().getName(), AutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstRelativeAngle", 45);
    secondAngle = new DoubleConfigFileParameter(
            this.getClass().getName(), AutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondRelativeAngle", 45);
    firstDriveDistance = new DoubleConfigFileParameter(
            this.getClass().getName(), AutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstDriveDistance", -100);
    firstDriveVelocity = new DoubleConfigFileParameter(
            this.getClass().getName(), AutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstDriveVelocity", 0.0);
    secondDriveDistance = new DoubleConfigFileParameter(
            this.getClass().getName(), AutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondDriveDistance", -30);
    secondDriveVelocity = new DoubleConfigFileParameter(
            this.getClass().getName(), AutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondDriveVelocity", 0.0);

    addStep(new AutonomousStepStartDriveUsingMotionProfile(firstDriveDistance.getValue(), firstDriveVelocity.getValue()));
    addStep(new AutonomousStepWaitForDriveMotionProfile());
    addStep(new AutonomousStepStopDriveUsingMotionProfile());
    addStep(new AutonomousStepQuickTurn(firstAngle.getValue()));
    addStep(new AutonomousStepStartDriveUsingMotionProfile(secondDriveDistance.getValue(), secondDriveVelocity.getValue()));
    addStep(new AutonomousStepWaitForDriveMotionProfile());
    addStep(new AutonomousStepStopDriveUsingMotionProfile());
    addStep(new AutonomousStepQuickTurn(secondAngle.getValue()));
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:24,代码来源:AutonomousProgramDrivePatterns.java


示例6: defineConfigValues

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
private void defineConfigValues() {

        FirstEnterWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstEnterWheelSetPoint", 2800);
        FirstExitWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstExitWheelSetPoint", 3550);
        FirstShooterAngle = new AutonomousBooleanStartPositionConfigFileParameter("FirstShooterAngle", false);
        SecondEnterWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstEnterWheelSetPoint", 2500);
        SecondExitWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstExitWheelSetPoint", 3250);
        SecondShooterAngle = new AutonomousBooleanStartPositionConfigFileParameter("FirstShooterAngle", false);
        ThirdFrisbeeDelay = new AutonomousIntegerConfigFileParameter("ThirdFrisbeeDelay", 700);

        firstShooterPreset = new WsShooter.Preset(FirstEnterWheelSetPoint.getValue(),
                FirstExitWheelSetPoint.getValue(),
                FirstShooterAngle.getValue()
                ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
        secondShooterPreset = new WsShooter.Preset(SecondEnterWheelSetPoint.getValue(),
                SecondExitWheelSetPoint.getValue(),
                SecondShooterAngle.getValue()
                ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
        //Middle Line drive
        turnToFrisbeesAngle = new DoubleConfigFileParameter(
               this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".TurnToFrisbeesAngle", -45);
        turnToShootAngle = new DoubleConfigFileParameter(
               this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".TurnToShootAngle", -45);
        firstFrisbeeDriveDistance = new DoubleConfigFileParameter(
               this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstFrisbeeDriveDistance", -80);
        firstFrisbeeDriveHeading = new DoubleConfigFileParameter(
               this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstFrisbeeDriveHeading", 0.5);
        secondFrisbeeDriveDistance = new DoubleConfigFileParameter(
               this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondFrisbeeDriveDistance", 20);
        firstBackToShootDriveDistance = new DoubleConfigFileParameter(
               this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstBackToShootDriveDistance", -80);
        firstBackToShootDriveHeading = new DoubleConfigFileParameter(
               this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstBackToShootDriveHeading", 0.5);
        secondBackToShootDriveDistance = new DoubleConfigFileParameter(
               this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondBackToShootDriveDistance", 29);
    }
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:37,代码来源:WsAutonomousProgramShootFiveFromMiddleLine.java


示例7: defineConfigValues

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
private void defineConfigValues() {
    FirstDrive = new AutonomousDoubleConfigFileParameter("ShootFive.FirstDrive", 50);
    SecondDrive = new AutonomousDoubleConfigFileParameter("ShootFive.SecondDrive", -50);
    FirstEnterWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstEnterWheelSetPoint", 2800);
    FirstExitWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstExitWheelSetPoint", 3550);
    FirstShooterAngle = new AutonomousBooleanStartPositionConfigFileParameter("FirstShooterAngle", false);
    SecondEnterWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstEnterWheelSetPoint", 2800);
    SecondExitWheelSetPoint = new AutonomousIntegerStartPositionConfigFileParameter("FirstExitWheelSetPoint", 3550);
    SecondShooterAngle = new AutonomousBooleanStartPositionConfigFileParameter("FirstShooterAngle", false);
    ThirdFrisbeeDelay = new AutonomousIntegerConfigFileParameter("ThirdFrisbeeDelay", 700);
 
    firstShooterPreset = new WsShooter.Preset(FirstEnterWheelSetPoint.getValue(),
            FirstExitWheelSetPoint.getValue(),
            FirstShooterAngle.getValue()
            ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
    secondShooterPreset = new WsShooter.Preset(SecondEnterWheelSetPoint.getValue(),
            SecondExitWheelSetPoint.getValue(),
            SecondShooterAngle.getValue()
            ? DoubleSolenoid.Value.kForward : DoubleSolenoid.Value.kReverse);
    //Feeder station drive
    firstFeederAngle = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstFeederRelativeAngle", 90);
    secondFeederAngle = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondFeederRelativeAngle", 90);
    firstFeederDriveDistance = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstFeederDriveDistance", -80);
    firstFeederDriveVelocity = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".FirstFeederDriveVelocity", 0.0);
    secondFeederDriveDistance = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondFeederDriveDistance", 120);
    secondFeederDriveVelocity = new DoubleConfigFileParameter(
           this.getClass().getName(), WsAutonomousManager.getInstance().getStartPosition().toConfigString() + ".SecondFeederDriveVelocity", 0.0);
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:34,代码来源:WsAutonomousProgramShootFiveUnprotectedFeederStation.java


示例8: 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


示例9: defineSteps

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
public void defineSteps() {
        distance = new DoubleConfigFileParameter(this.getClass().getName(), AutonomousManager.getInstance().getStartPosition().toConfigString() + ".distance", 10.0);
        heading = new DoubleConfigFileParameter(this.getClass().getName(), AutonomousManager.getInstance().getStartPosition().toConfigString() + ".heading", 0.0);
        addStep(new AutonomousStepSetShifter(DoubleSolenoid.Value.kReverse));
        addStep(new AutonomousStepStartDriveUsingMotionProfileAndHeading(distance.getValue(), 0.0, heading.getValue()));
        addStep(new AutonomousStepWaitForDriveMotionProfile()); 
        addStep(new AutonomousStepStopDriveUsingMotionProfile());

//        programSteps[3] = new AutonomousStepEnableDriveDistancePid();
//        programSteps[4] = new AutonomousStepSetDriveDistancePidSetpoint(distance.getValue());
//        programSteps[5] = new AutonomousStepWaitForDriveDistancePid();
//        programSteps[6] = new AutonomousStepStartDriveUsingMotionProfile(distance.getValue(), 0.0);
//        programSteps[7] = new AutonomousStepWaitForDriveMotionProfile(); 
//        programSteps[8] = new AutonomousStepStopDriveUsingMotionProfile();
    }
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:16,代码来源:AutonomousProgramDriveDistanceMotionProfile.java


示例10: 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


示例11: 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


示例12: WsAutonomousProgramDriveDistance

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
public WsAutonomousProgramDriveDistance() {
    super(3);
    distance = new DoubleConfigFileParameter(this.getClass().getName(), "distance", 10.0);
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:5,代码来源:WsAutonomousProgramDriveDistance.java


示例13: WsAutonomousProgramDriveHeading

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
public WsAutonomousProgramDriveHeading() {
    super(3);
    angle = new DoubleConfigFileParameter(this.getClass().getName(), "angle", 30);
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:5,代码来源:WsAutonomousProgramDriveHeading.java


示例14: WsPidController

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
public WsPidController(IPidInput source,
        IPidOutput output,
        String pidControllerName) {
    p = 1.0;
    i = 0.0;
    d = 0.0;
    currentError = 0.0;
    previousError = 0.0;
    setPoint = 0.0;
    errorSum = 0.0;
    errorIncrement = 1.0;
    errorEpsilon = 1.0;
    staticEpsilon = 0.0;
    maxIntegral = 1.0;
    integralErrorThresh = -1.0;
    differentiatorBandLimit = 1.0;
    maxOutput = 1.0;
    minOutput = -1.0;
    maxInput = 1000.0;
    minInput = -1.0;
    currentState = WsPidStateType.WS_PID_INITIALIZE_STATE;
    minOnTargetTime = 0.2;
    allowStaticEpsilon = false;
    stabilizationTimer = new WsTimer();
    pidSource = source;
    pidOutput = output;
    controllerName = pidControllerName;

    p_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "p", 0.0);
    i_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "i", 0.0);
    d_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "d", 0.0);
    errorIncrement_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "errorIncrement", 0.0);
    errorEpsilon_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "errorEpsilon", 0.0);
    staticEpsilon_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "staticEpsilon", 0.0);
    maxIntegral_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "maxIntegral", 0.0);
    integralErrorThresh_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "integralErrorThresh", 0.0);
    differentiatorBandLimit_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "differentiatorBandLimit", 0.0);
    maxOutput_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "maxOutput", 0.0);
    minOutput_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "minOutput", 0.0);
    maxInput_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "maxInput", 0.0);
    minInput_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "minInput", 0.0);
    minOnTargetTime_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "minOnTargetTime", 0.0);

    this.setErrorIncrementPercentage(errorIncrement);
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:46,代码来源:WsPidController.java


示例15: WsDriveBase

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
public WsDriveBase(String name) {
    super(name);

    WHEEL_DIAMETER_config = new DoubleConfigFileParameter(this.getClass().getName(), "wheel_diameter", 6);
    TICKS_PER_ROTATION_config = new DoubleConfigFileParameter(this.getClass().getName(), "ticks_per_rotation", 360.0);
    THROTTLE_LOW_GEAR_ACCEL_FACTOR_config = new DoubleConfigFileParameter(this.getClass().getName(), "throttle_low_gear_accel_factor", 0.250);
    HEADING_LOW_GEAR_ACCEL_FACTOR_config = new DoubleConfigFileParameter(this.getClass().getName(), "heading_low_gear_accel_factor", 0.500);
    THROTTLE_HIGH_GEAR_ACCEL_FACTOR_config = new DoubleConfigFileParameter(this.getClass().getName(), "throttle_high_gear_accel_factor", 0.125);
    HEADING_HIGH_GEAR_ACCEL_FACTOR_config = new DoubleConfigFileParameter(this.getClass().getName(), "heading_high_gear_accel_factor", 0.250);
    MAX_HIGH_GEAR_PERCENT_config = new DoubleConfigFileParameter(this.getClass().getName(), "max_high_gear_percent", 0.80);
    ENCODER_GEAR_RATIO_config = new DoubleConfigFileParameter(this.getClass().getName(), "encoder_gear_ratio", 7.5);
    DEADBAND_config = new DoubleConfigFileParameter(this.getClass().getName(), "deadband", 0.05);
    SLOW_TURN_FORWARD_SPEED_config = new DoubleConfigFileParameter(this.getClass().getName(), "slow_turn_forward_speed", 0.16);
    SLOW_TURN_BACKWARD_SPEED_config = new DoubleConfigFileParameter(this.getClass().getName(), "slow_turn_backward_speed", -0.19);
    FEED_FORWARD_VELOCITY_CONSTANT_config = new DoubleConfigFileParameter(this.getClass().getName(), "feed_forward_velocity_constant", 1.00);
    FEED_FORWARD_ACCELERATION_CONSTANT_config = new DoubleConfigFileParameter(this.getClass().getName(), "feed_forward_acceleration_constant", 0.00018);
    MAX_ACCELERATION_DRIVE_PROFILE_config = new DoubleConfigFileParameter(this.getClass().getName(), "max_acceleration_drive_profile", 600.0);
    MAX_SPEED_INCHES_LOWGEAR_config = new DoubleConfigFileParameter(this.getClass().getName(), "max_speed_inches_lowgear", 90.0);
    DECELERATION_VELOCITY_THRESHOLD_config = new DoubleConfigFileParameter(this.getClass().getName(), "deceleration_velocity_threshold", 48.0);
    DECELERATION_MOTOR_SPEED_config = new DoubleConfigFileParameter(this.getClass().getName(), "deceleration_motor_speed", 0.3);
    STOPPING_DISTANCE_AT_MAX_SPEED_LOWGEAR_config = new DoubleConfigFileParameter(this.getClass().getName(), "stopping_distance_at_max_speed_lowgear", 10.0);
    DRIVE_OFFSET_config = new AutonomousDoubleConfigFileParameter("DriveOffset", 1.00);
    USE_LEFT_SIDE_FOR_OFFSET_config = new AutonomousBooleanConfigFileParameter("UseLeftDriveForOffset", true);
    QUICK_TURN_CAP_config = new DoubleConfigFileParameter(this.getClass().getName(), "quick_turn_cap", 10.0);
    QUICK_TURN_ANTITURBO_config = new DoubleConfigFileParameter(this.getClass().getName(), "quick_turn_antiturbo", 10.0);

    //Anti-Turbo button
    registerForJoystickButtonNotification(WsJoystickButtonEnum.DRIVER_BUTTON_8);
    //Turbo button
    registerForJoystickButtonNotification(WsJoystickButtonEnum.DRIVER_BUTTON_7);
    //Shifter Button
    registerForJoystickButtonNotification(WsJoystickButtonEnum.DRIVER_BUTTON_6);
    //Left/right slow turn buttons
    registerForJoystickButtonNotification(WsJoystickButtonEnum.DRIVER_BUTTON_1);
    registerForJoystickButtonNotification(WsJoystickButtonEnum.DRIVER_BUTTON_3);

    //Initialize the drive base encoders
    leftDriveEncoder = new Encoder(2, 3, true, EncodingType.k4X);
    leftDriveEncoder.reset();
    leftDriveEncoder.start();
    rightDriveEncoder = new Encoder(4, 5, false, EncodingType.k4X);
    rightDriveEncoder.reset();
    rightDriveEncoder.start();

    //Initialize the gyro
    //@TODO: Get the correct port
    driveHeadingGyro = new Gyro(1);

    //Initialize the PIDs
    driveDistancePidInput = new WsDriveBaseDistancePidInput();
    driveDistancePidOutput = new WsDriveBaseDistancePidOutput();
    driveDistancePid = new WsPidController(driveDistancePidInput, driveDistancePidOutput, "WsDriveBaseDistancePid");

    driveHeadingPidInput = new WsDriveBaseHeadingPidInput();
    driveHeadingPidOutput = new WsDriveBaseHeadingPidOutput();
    driveHeadingPid = new WsPidController(driveHeadingPidInput, driveHeadingPidOutput, "WsDriveBaseHeadingPid");

    driveSpeedPidInput = new WsDriveBaseSpeedPidInput();
    driveSpeedPidOutput = new WsDriveBaseSpeedPidOutput();
    driveSpeedPid = new WsSpeedPidController(driveSpeedPidInput, driveSpeedPidOutput, "WsDriveBaseSpeedPid");
    continuousAccelerationFilter = new ContinuousAccelFilter(0, 0, 0);
    init();
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:64,代码来源:WsDriveBase.java


示例16: PidController

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
public PidController(IPidInput source,
        IPidOutput output,
        String pidControllerName) {
    p = 1.0;
    i = 0.0;
    d = 0.0;
    currentError = 0.0;
    previousError = 0.0;
    setPoint = 0.0;
    errorSum = 0.0;
    errorIncrement = 1.0;
    errorEpsilon = 1.0;
    staticEpsilon = 0.0;
    maxIntegral = 1.0;
    integralErrorThresh = -1.0;
    differentiatorBandLimit = 1.0;
    maxOutput = 1.0;
    minOutput = -1.0;
    maxInput = 1000.0;
    minInput = -1.0;
    currentState = PidStateType.PID_INITIALIZE_STATE;
    minOnTargetTime = 0.2;
    allowStaticEpsilon = false;
    stabilizationTimer = new WsTimer();
    pidSource = source;
    pidOutput = output;
    controllerName = pidControllerName;

    p_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "p", 0.0);
    i_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "i", 0.0);
    d_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "d", 0.0);
    errorIncrement_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "errorIncrement", 0.0);
    errorEpsilon_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "errorEpsilon", 0.0);
    staticEpsilon_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "staticEpsilon", 0.0);
    maxIntegral_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "maxIntegral", 0.0);
    integralErrorThresh_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "integralErrorThresh", 0.0);
    differentiatorBandLimit_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "differentiatorBandLimit", 0.0);
    maxOutput_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "maxOutput", 0.0);
    minOutput_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "minOutput", 0.0);
    maxInput_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "maxInput", 0.0);
    minInput_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "minInput", 0.0);
    minOnTargetTime_config = new DoubleConfigFileParameter(this.getClass().getName() + "." + pidControllerName, "minOnTargetTime", 0.0);

    this.setErrorIncrementPercentage(errorIncrement);
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:46,代码来源:PidController.java


示例17: DriveBase

import com.wildstangs.config.DoubleConfigFileParameter; //导入依赖的package包/类
public DriveBase(String name) {
    super(name);

    WHEEL_DIAMETER_config = new DoubleConfigFileParameter(this.getClass().getName(), "wheel_diameter", 6);
    TICKS_PER_ROTATION_config = new DoubleConfigFileParameter(this.getClass().getName(), "ticks_per_rotation", 360.0);
    THROTTLE_LOW_GEAR_ACCEL_FACTOR_config = new DoubleConfigFileParameter(this.getClass().getName(), "throttle_low_gear_accel_factor", 0.250);
    HEADING_LOW_GEAR_ACCEL_FACTOR_config = new DoubleConfigFileParameter(this.getClass().getName(), "heading_low_gear_accel_factor", 0.500);
    THROTTLE_HIGH_GEAR_ACCEL_FACTOR_config = new DoubleConfigFileParameter(this.getClass().getName(), "throttle_high_gear_accel_factor", 0.125);
    HEADING_HIGH_GEAR_ACCEL_FACTOR_config = new DoubleConfigFileParameter(this.getClass().getName(), "heading_high_gear_accel_factor", 0.250);
    MAX_HIGH_GEAR_PERCENT_config = new DoubleConfigFileParameter(this.getClass().getName(), "max_high_gear_percent", 0.80);
    ENCODER_GEAR_RATIO_config = new DoubleConfigFileParameter(this.getClass().getName(), "encoder_gear_ratio", 7.5);
    DEADBAND_config = new DoubleConfigFileParameter(this.getClass().getName(), "deadband", 0.05);
    SLOW_TURN_FORWARD_SPEED_config = new DoubleConfigFileParameter(this.getClass().getName(), "slow_turn_forward_speed", 0.16);
    SLOW_TURN_BACKWARD_SPEED_config = new DoubleConfigFileParameter(this.getClass().getName(), "slow_turn_backward_speed", -0.19);
    FEED_FORWARD_VELOCITY_CONSTANT_config = new DoubleConfigFileParameter(this.getClass().getName(), "feed_forward_velocity_constant", 1.00);
    FEED_FORWARD_ACCELERATION_CONSTANT_config = new DoubleConfigFileParameter(this.getClass().getName(), "feed_forward_acceleration_constant", 0.00018);
    MAX_ACCELERATION_DRIVE_PROFILE_config = new DoubleConfigFileParameter(this.getClass().getName(), "max_acceleration_drive_profile", 600.0);
    MAX_SPEED_INCHES_LOWGEAR_config = new DoubleConfigFileParameter(this.getClass().getName(), "max_speed_inches_lowgear", 90.0);
    DECELERATION_VELOCITY_THRESHOLD_config = new DoubleConfigFileParameter(this.getClass().getName(), "deceleration_velocity_threshold", 48.0);
    DECELERATION_MOTOR_SPEED_config = new DoubleConfigFileParameter(this.getClass().getName(), "deceleration_motor_speed", 0.3);
    STOPPING_DISTANCE_AT_MAX_SPEED_LOWGEAR_config = new DoubleConfigFileParameter(this.getClass().getName(), "stopping_distance_at_max_speed_lowgear", 10.0);
    DRIVE_OFFSET_config = new AutonomousDoubleConfigFileParameter("DriveOffset", 1.00);
    USE_LEFT_SIDE_FOR_OFFSET_config = new AutonomousBooleanConfigFileParameter("UseLeftDriveForOffset", true);
    QUICK_TURN_CAP_config = new DoubleConfigFileParameter(this.getClass().getName(), "quick_turn_cap", 10.0);
    QUICK_TURN_ANTITURBO_config = new DoubleConfigFileParameter(this.getClass().getName(), "quick_turn_antiturbo", 10.0);

    //Anti-Turbo button
    registerForJoystickButtonNotification(JoystickButtonEnum.DRIVER_BUTTON_8);
    //Turbo button
    registerForJoystickButtonNotification(JoystickButtonEnum.DRIVER_BUTTON_7);
    //Shifter Button
    registerForJoystickButtonNotification(JoystickButtonEnum.DRIVER_BUTTON_6);

    //Initialize the drive base encoders
    leftDriveEncoder = new Encoder(2, 3, true, EncodingType.k4X);
    leftDriveEncoder.reset();
    leftDriveEncoder.start();
    rightDriveEncoder = new Encoder(4, 5, false, EncodingType.k4X);
    rightDriveEncoder.reset();
    rightDriveEncoder.start();

    //Initialize the gyro
    //@TODO: Get the correct port
    driveHeadingGyro = new Gyro(1);

    continuousAccelerationFilter = new ContinuousAccelFilter(0, 0, 0);
    driveSpeedPidInput = new DriveBaseSpeedPidInput();
    driveSpeedPidOutput = new DriveBaseSpeedPidOutput();
    driveSpeedPid = new SpeedPidController(driveSpeedPidInput, driveSpeedPidOutput, "DriveBaseSpeedPid");
    init();
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:52,代码来源:DriveBase.java


示例18: WsDriveBase

< 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Quantifier类代码示例发布时间:2022-05-16
下一篇:
Java DefaultAttribute类代码示例发布时间:2022-05-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap