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


Java WsDoubleSolenoid类代码示例

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


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

示例1: OutputManager

import com.wildstangs.outputmanager.outputs.WsDoubleSolenoid; //导入依赖的package包/类
/**
 * Constructor for OutputManager.
 *
 * All new output elements need to be added in the constructor as well as
 * having a key value added above.
 */

protected OutputManager() {
    //Add the facade data elements
    outputs.addToIndex(UNKNOWN_INDEX, new NoOutput());
    outputs.addToIndex(RIGHT_DRIVE_SPEED_INDEX, new WsDriveSpeed("Right Drive Speed", 3, 4));
    outputs.addToIndex(LEFT_DRIVE_SPEED_INDEX, new WsDriveSpeed("Left Drive Speed", 1, 2));
    outputs.addToIndex(SHIFTER_INDEX, new WsDoubleSolenoid("Shifter", 1, 1, 2));
    outputs.addToIndex(LIGHT_CANNON_RELAY_INDEX, new WsRelay(1, 5, Relay.Direction.kForward));
    outputs.addToIndex(WINGS_SOLENOID_INDEX, new WsDoubleSolenoid("Wings Solenoid1", 1, 3, 4));
    outputs.addToIndex(LANDING_GEAR_SOLENOID_INDEX, new WsDoubleSolenoid("Landing Gear Solenoid", 1, 7, 8));
    outputs.addToIndex(CATAPAULT_SOLENOID_INDEX, new WsSolenoid("Arm Catapult Solenoid", 1, 5));
    outputs.addToIndex(FRONT_ARM_VICTOR_INDEX, new WsVictor("Front Arm Victor", 5));       
    outputs.addToIndex(BACK_ARM_VICTOR_INDEX, new WsVictor("Back Arm Victor", 6));
    outputs.addToIndex(FRONT_ARM_ROLLER_VICTOR_INDEX, new WsVictor("Front Arm Roller Victor",7));
    outputs.addToIndex(BACK_ARM_ROLLER_VICTOR_INDEX, new WsVictor("Back Arm Roller Victor", 8));
    outputs.addToIndex(LATCH_SOLENOID_INDEX, new WsSolenoid("Latch Solenoid", 1, 6));
    outputs.addToIndex(LEFT_EAR_SERVO_INDEX, new WsServo("Left Ear Servo", 9));
    outputs.addToIndex(RIGHT_EAR_SERVO_INDEX, new WsServo("Right Ear Servo", 10));
    outputs.addToIndex(CAMERA_LED_SPIKE_INDEX, new WsRelay(1, 2, Relay.Direction.kForward));
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:27,代码来源:OutputManager.java

示例2: WsOutputManager

import com.wildstangs.outputmanager.outputs.WsDoubleSolenoid; //导入依赖的package包/类
/**
 * Constructor for WsOutputManager.
 *
 * All new output elements need to be added in the constructor as well as
 * having a key value added above.
 */
protected WsOutputManager() {
    //Add the facade data elements
    outputs.add(new DataElement(RIGHT_DRIVE_SPEED, new WsDriveSpeed(RIGHT_DRIVE_SPEED, 1, 2)));
    outputs.add(new DataElement(LEFT_DRIVE_SPEED, new WsDriveSpeed(LEFT_DRIVE_SPEED, 3, 4)));
    BooleanConfigFileParameter outputsFor2012 = new BooleanConfigFileParameter(this.getClass().getName(), "2012_Robot", false);
    if (outputsFor2012.getValue()) {
        //Shifter is actually a single solenoid on 4 but 2 is unused for faking it as a double
        outputs.add(new DataElement(SHIFTER, new WsDoubleSolenoid(SHIFTER, 1, 2, 4)));
        outputs.add(new DataElement(FRISBIE_CONTROL, new WsSolenoid(FRISBIE_CONTROL, 1, 5)));

        outputs.add(new DataElement(KICKER, new WsSolenoid(KICKER, 1, 1)));
        outputs.add(new DataElement(ACCUMULATOR_SOLENOID, new WsSolenoid(ACCUMULATOR_SOLENOID, 2, 7)));
        outputs.add(new DataElement(LIFT, new WsDoubleSolenoid(LIFT, 2, 3, 4)));
        outputs.add(new DataElement(SHOOTER_ANGLE, new WsDoubleSolenoid(SHOOTER_ANGLE, 2, 5, 6)));
        outputs.add(new DataElement(SHOOTER_VICTOR_EXIT, new WsVictor(SHOOTER_VICTOR_EXIT, 10)));
        outputs.add(new DataElement(LOADING_RAMP, new WsServo(LOADING_RAMP, 6)));
        outputs.add(new DataElement(FUNNELATOR_ROLLER, new WsVictor(FUNNELATOR_ROLLER, 8)));
        
        outputs.add(new DataElement(CLIMBER, new WsSolenoid(CLIMBER, 2, 1)));

    } else {
        outputs.add(new DataElement(KICKER, new WsSolenoid(KICKER, 1, 1)));
        outputs.add(new DataElement(ACCUMULATOR_SOLENOID, new WsSolenoid(ACCUMULATOR_SOLENOID, 1, 2)));
        outputs.add(new DataElement(ACCUMULATOR_SECONDARY_SOLENOID, new WsSolenoid(ACCUMULATOR_SECONDARY_SOLENOID, 1, 5)));
        outputs.add(new DataElement(FRISBIE_CONTROL, new WsSolenoid(FRISBIE_CONTROL, 1, 3)));
        outputs.add(new DataElement(CLIMBER, new WsSolenoid(CLIMBER, 1, 4)));
        outputs.add(new DataElement(SHIFTER, new WsDoubleSolenoid(SHIFTER, 2, 1, 2)));
        //put the frisbee holder above the lift, so it updates first.
        outputs.add(new DataElement(TOMAHAWK_SERVO, new WsServo(TOMAHAWK_SERVO, 8)));
        outputs.add(new DataElement(LIFT, new WsDoubleSolenoid(LIFT, 2, 3, 4)));
        outputs.add(new DataElement(SHOOTER_ANGLE, new WsDoubleSolenoid(SHOOTER_ANGLE, 2, 5, 6)));
        outputs.add(new DataElement(SHOOTER_VICTOR_EXIT, new WsVictor(SHOOTER_VICTOR_EXIT, 6)));
        outputs.add(new DataElement(LOADING_RAMP, new WsServo(LOADING_RAMP, 7)));
        outputs.add(new DataElement(FUNNELATOR_ROLLER, new WsVictor(FUNNELATOR_ROLLER, 10)));
    }
    outputs.add(new DataElement(SHOOTER_VICTOR_ENTER, new WsVictor(SHOOTER_VICTOR_ENTER, 5)));
    outputs.add(new DataElement(ACCUMULATOR_VICTOR, new WsVictor(ACCUMULATOR_VICTOR, 9)));
    outputs.add(new DataElement(LIGHT_CANNON_RELAY, new WsRelay(1, 2, Relay.Direction.kForward)));
}
 
开发者ID:wildstang111,项目名称:2013_robot_software,代码行数:46,代码来源:WsOutputManager.java

示例3: WsOutputManager

import com.wildstangs.outputmanager.outputs.WsDoubleSolenoid; //导入依赖的package包/类
/**
 * Constructor for WsOutputManager.
 *
 * All new output elements need to be added in the constructor as well as
 * having a key value added above.
 */
protected WsOutputManager() {
    //Add the facade data elements
    outputs.add(new DataElement(RIGHT_DRIVE_SPEED, new WsDriveSpeed(RIGHT_DRIVE_SPEED, 1, 2)));
    outputs.add(new DataElement(LEFT_DRIVE_SPEED, new WsDriveSpeed(LEFT_DRIVE_SPEED, 3, 4)));
    BooleanConfigFileParameter outputsFor2012 = new BooleanConfigFileParameter(this.getClass().getName(), "2012_Robot", false);
    if (outputsFor2012.getValue()) {
        //Shifter is actually a single solenoid on 4 but 2 is unused for faking it as a double
        outputs.add(new DataElement(SHIFTER, new WsDoubleSolenoid(SHIFTER, 1, 2, 4)));
        

        //This goes to the ball staging upper solenoid to allow shooting
        outputs.add(new DataElement(KICKER, new WsSolenoid(KICKER, 1, 5)));
        outputs.add(new DataElement(SHOOTER_ANGLE, new WsDoubleSolenoid(SHOOTER_ANGLE, 1, 8, 3)));
        outputs.add(new DataElement(FUNNELATOR_ROLLER, new WsDriveSpeed(FUNNELATOR_ROLLER, 7,8)));
        
        outputs.add(new DataElement(SHOOTER_VICTOR_ENTER, new WsVictor(SHOOTER_VICTOR_ENTER, 5)));
        outputs.add(new DataElement(TURRET, new WsVictor(TURRET, 9)));
        
        //Unused
        outputs.add(new DataElement(SHOOTER_VICTOR_EXIT, new NoVictor(SHOOTER_VICTOR_EXIT, 10)));
        outputs.add(new DataElement(ACCUMULATOR_VICTOR, new NoVictor(ACCUMULATOR_VICTOR, 6)));
        outputs.add(new DataElement(LOADING_RAMP, new NoServo(LOADING_RAMP, 6)));
        outputs.add(new DataElement(CLIMBER, new NoSolenoid(CLIMBER, 2, 1)));
        outputs.add(new DataElement(FRISBIE_CONTROL, new NoSolenoid(FRISBIE_CONTROL, 1, 5)));
        outputs.add(new DataElement(ACCUMULATOR_SOLENOID, new NoSolenoid(ACCUMULATOR_SOLENOID, 2, 7)));
        outputs.add(new DataElement(LIFT, new NoDoubleSolenoid(LIFT, 2, 3, 4)));
        outputs.add(new DataElement(ACCUMULATOR_SECONDARY_SOLENOID, new NoSolenoid(ACCUMULATOR_SECONDARY_SOLENOID, 1, 5)));
        outputs.add(new DataElement(TOMAHAWK_SERVO, new NoServo(TOMAHAWK_SERVO, 8)));


    } else {
        outputs.add(new DataElement(KICKER, new WsSolenoid(KICKER, 1, 1)));
        outputs.add(new DataElement(ACCUMULATOR_SOLENOID, new WsSolenoid(ACCUMULATOR_SOLENOID, 1, 2)));
        outputs.add(new DataElement(ACCUMULATOR_SECONDARY_SOLENOID, new WsSolenoid(ACCUMULATOR_SECONDARY_SOLENOID, 1, 5)));
        outputs.add(new DataElement(FRISBIE_CONTROL, new WsSolenoid(FRISBIE_CONTROL, 1, 3)));
        outputs.add(new DataElement(CLIMBER, new WsSolenoid(CLIMBER, 1, 4)));
        outputs.add(new DataElement(SHIFTER, new WsDoubleSolenoid(SHIFTER, 2, 1, 2)));
        //put the frisbee holder above the lift, so it updates first.
        outputs.add(new DataElement(TOMAHAWK_SERVO, new WsServo(TOMAHAWK_SERVO, 8)));
        outputs.add(new DataElement(LIFT, new WsDoubleSolenoid(LIFT, 2, 3, 4)));
        outputs.add(new DataElement(SHOOTER_ANGLE, new WsDoubleSolenoid(SHOOTER_ANGLE, 2, 5, 6)));
        outputs.add(new DataElement(SHOOTER_VICTOR_EXIT, new WsVictor(SHOOTER_VICTOR_EXIT, 6)));
        outputs.add(new DataElement(LOADING_RAMP, new WsServo(LOADING_RAMP, 7)));
        outputs.add(new DataElement(FUNNELATOR_ROLLER, new WsVictor(FUNNELATOR_ROLLER, 10)));
        outputs.add(new DataElement(SHOOTER_VICTOR_ENTER, new WsVictor(SHOOTER_VICTOR_ENTER, 5)));
        outputs.add(new DataElement(ACCUMULATOR_VICTOR, new WsVictor(ACCUMULATOR_VICTOR, 9)));
        outputs.add(new DataElement(TURRET, new NoVictor(TURRET, 9)));
    }
    outputs.add(new DataElement(LIGHT_CANNON_RELAY, new WsRelay(1, 2, Relay.Direction.kForward)));
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:57,代码来源:WsOutputManager.java


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