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


Java WsSolenoid類代碼示例

本文整理匯總了Java中com.wildstangs.outputmanager.outputs.WsSolenoid的典型用法代碼示例。如果您正苦於以下問題:Java WsSolenoid類的具體用法?Java WsSolenoid怎麽用?Java WsSolenoid使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: OutputManager

import com.wildstangs.outputmanager.outputs.WsSolenoid; //導入依賴的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.WsSolenoid; //導入依賴的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.WsSolenoid; //導入依賴的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.WsSolenoid類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。