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


Java ISubjectEnum类代码示例

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


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

示例1: getSubject

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public Subject getSubject(ISubjectEnum subjectEnum) {
    if (subjectEnum == WsJoystickAxisEnum.MANIPULATOR_ENTER_FLYWHEEL_ADJUSTMENT) {
        return enterFlywheelAdjustment;
    } else if (subjectEnum == WsJoystickAxisEnum.MANIPULATOR_EXIT_FLYWHEEL_ADJUSTMENT) {
        return exitFlywheelAdjustment;
    } else if (subjectEnum == WsJoystickAxisEnum.MANIPULATOR_D_PAD_UP_DOWN) {
        return dPadUpDown;
    } else if (subjectEnum == WsJoystickAxisEnum.MANIPULATOR_D_PAD_LEFT_RIGHT) {
        return dPadLeftRight;
    } else if (subjectEnum instanceof WsJoystickButtonEnum && ((WsJoystickButtonEnum) subjectEnum).isDriver() == false) {
        return buttons[((WsJoystickButtonEnum) subjectEnum).toValue()];
    } else {
        System.out.println("Subject not supported or incorrect.");
        return null;
    }
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:17,代码来源:WsManipulatorJoystick.java

示例2: getSubject

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public Subject getSubject(ISubjectEnum subjectEnum) {
    if (subjectEnum == WsManipulatorJoystickEnum.ENTER_FLYWHEEL_ADJUSTMENT) {
        return enterFlywheelAdjustment;
    } else if (subjectEnum == WsManipulatorJoystickEnum.EXIT_FLYWHEEL_ADJUSTMENT) {
        return exitFlywheelAdjustment;
    } else if (subjectEnum == WsManipulatorJoystickEnum.D_PAD_UP_DOWN) {
        return dPadUpDown;
    } else if (subjectEnum == WsManipulatorJoystickEnum.D_PAD_LEFT_RIGHT) {
        return dPadLeftRight;
    } else if (subjectEnum instanceof WsManipulatorJoystickButtonEnum) {
        return buttons[((WsManipulatorJoystickButtonEnum) subjectEnum).toValue()];
    } else {
        System.out.println("Subject not supported or incorrect.");
        return null;
    }
}
 
开发者ID:wildstang111,项目名称:2013_robot_software,代码行数:17,代码来源:WsManipulatorJoystick.java

示例3: WsFloorPickup

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public WsFloorPickup(String name) {
    super(name);
    Subject subject = WsInputManager.getInstance().getOiInput(WsInputManager.DRIVER_JOYSTICK).getSubject(WsDriverJoystickButtonEnum.BUTTON5);
    subject.attach(this);

    subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON7);
    subject.attach(this);

    subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON5);
    subject.attach(this);

    subject = WsInputManager.getInstance().getSensorInput(WsInputManager.ACCUMULATOR_UP_LIMIT_SWITCH).getSubject((ISubjectEnum) null);
    subject.attach(this);

    maxVictorSpeed = maxSpeed.getValue();
}
 
开发者ID:wildstang111,项目名称:2013_robot_software,代码行数:17,代码来源:WsFloorPickup.java

示例4: WsHopper

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public WsHopper(String name) {
    super(name);
    init();

    Subject subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON6);
    subject.attach(this);

    subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON8);
    subject.attach(this);

    subject = WsInputManager.getInstance().getSensorInput(WsInputManager.HOPPER_DOWN_LIMIT_SWITCH).getSubject((ISubjectEnum) null);
    subject.attach(this);

    subject = WsInputManager.getInstance().getSensorInput(WsInputManager.HOPPER_UP_LIMIT_SWITCH).getSubject((ISubjectEnum) null);
    subject.attach(this);

    subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON1);
    subject.attach(this);

    //Needed for tomahawk control
    subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON5);
    subject.attach(this);
}
 
开发者ID:wildstang111,项目名称:2013_robot_software,代码行数:24,代码来源:WsHopper.java

示例5: initialize

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public void initialize() {
        Subject subject = WsInputManager.getInstance().getSensorInput(WsInputManager.FUNNELATOR_LIMIT_SWITCH).getSubject((ISubjectEnum) null);
        subject.attach(this);
        numLatchedDiscs = ((WsIntake) WsSubsystemContainer.getInstance().getSubsystem(WsSubsystemContainer.WS_INTAKE)).getNumLatchedDiscs();
        if (numLatchedDiscs == 0) {
            //No discs were collected, no need to intake
            finished = true;
//            numLatchedDiscs = 1 ; 
        }
    }
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:11,代码来源:WsAutonomousStepWaitForDiscsLatchedThroughFunnelator.java

示例6: update

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public void update() {
    if (((BooleanSubject) WsInputManager.getInstance().
            getSensorInput(WsInputManager.LEFT_ACCUMULATOR_LIMIT_SWITCH).getSubject((ISubjectEnum) null)).
            getValue() == true && ((BooleanSubject) WsInputManager.getInstance().
            getSensorInput(WsInputManager.RIGHT_ACCUMULATOR_LIMIT_SWITCH).getSubject((ISubjectEnum) null)).
            getValue() == true) {
        finished = true;
    }
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:10,代码来源:WsAutonomousStepWaitForAccumulatorLeftAndRightLimitSwitches.java

示例7: initialize

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public void initialize() {
        Subject subject = WsInputManager.getInstance().getSensorInput(WsInputManager.FUNNELATOR_LIMIT_SWITCH).getSubject((ISubjectEnum) null);
        subject.attach(this);
        numLatchedDiscs = ((WsIntake) WsSubsystemContainer.getInstance().getSubsystem(WsSubsystemContainer.WS_INTAKE)).getNumLatchedDiscs();
        if (numLatchedDiscs == 0) {
            //No discs were collected, no need to intake
            finished = true;
//            numLatchedDiscs = 1 ; 
        }
        trueToFalse = false;
    }
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:12,代码来源:WsAutonomousStepWaitForDiscsLatchedIntoFunnelator.java

示例8: update

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public void update() {
    boolean upSwitchState = ((BooleanSubject) WsInputManager.getInstance().getSensorInput(WsInputManager.HOPPER_UP_LIMIT_SWITCH).getSubject((ISubjectEnum) null)).getValue();
    if (true == upSwitchState) {
        finished = true;
    }

}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:8,代码来源:WsAutonomousStepWaitForHopperUp.java

示例9: update

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public void update() {
    boolean downSwitchState = ((BooleanSubject) WsInputManager.getInstance().getSensorInput(WsInputManager.HOPPER_DOWN_LIMIT_SWITCH).getSubject((ISubjectEnum) null)).getValue();
    if (true == downSwitchState) {
        finished = true;
    }

}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:8,代码来源:WsAutonomousStepWaitForHopperDown.java

示例10: getSubject

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public Subject getSubject(ISubjectEnum subjectEnum) {
    if (subjectEnum == WsJoystickAxisEnum.DRIVER_THROTTLE) {
        return throttle;
    } else if (subjectEnum == WsJoystickAxisEnum.DRIVER_HEADING) {
        return heading;
    } else if (subjectEnum == WsJoystickAxisEnum.DRIVER_D_PAD_UP_DOWN) {
        return dPadUpDown;
    } else if (subjectEnum instanceof WsJoystickButtonEnum && ((WsJoystickButtonEnum) subjectEnum).isDriver() == true) {
        return buttons[((WsJoystickButtonEnum) subjectEnum).toValue()];
    } else {
        System.out.println("Subject not supported or incorrect.");
        return null;
    }
}
 
开发者ID:wildstang111,项目名称:2013_drivebase_proto,代码行数:15,代码来源:WsDriverJoystick.java

示例11: initialize

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public void initialize() {
    //This is as a precaution so we don't fire the catapult into the arm. If the pids are disabled then we wouldn't be able to move the arm out of the way
    boolean armPidsDisabled = ((BallHandler) (SubsystemContainer.getInstance().getSubsystem(SubsystemContainer.BALL_HANDLER_INDEX))).areArmPidsCompletelyDisabled();
    Subject subject = InputManager.getInstance().getOiInput(InputManager.MANIPULATOR_JOYSTICK_INDEX).getSubject(DISABLE_AUTO_CATAPULT_FIRE.getValue() || armPidsDisabled ? (ISubjectEnum) JoystickDPadButtonEnum.MANIPULATOR_D_PAD_BUTTON_LEFT : (ISubjectEnum) JoystickButtonEnum.MANIPULATOR_BUTTON_4);
    button = (BooleanSubject) subject;
    button.setValue(true);
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:8,代码来源:AutonomousStepFireCatapult.java

示例12: getSubject

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public Subject getSubject(ISubjectEnum subjectEnum) {
    if (subjectEnum instanceof JoystickAxisEnum && ((JoystickAxisEnum) subjectEnum).isDriver() == true) {
        return axes[((JoystickAxisEnum) subjectEnum).toValue()];
    } else if (subjectEnum instanceof JoystickButtonEnum && ((JoystickButtonEnum) subjectEnum).isDriver() == true) {
        return buttons[((JoystickButtonEnum) subjectEnum).toValue()];
    }
    else if(subjectEnum instanceof JoystickDPadButtonEnum && ((JoystickDPadButtonEnum) subjectEnum).isDriver())
    {
        return dPadButtons[((JoystickDPadButtonEnum) subjectEnum).toValue()];
    } 
    else {
        System.out.println("Subject not supported or incorrect.");
        return null;
    }
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:16,代码来源:DriverJoystick.java

示例13: getSubject

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public Subject getSubject(ISubjectEnum subjectEnum) {
    if (subjectEnum instanceof JoystickAxisEnum && ((JoystickAxisEnum) subjectEnum).isDriver() == false) {
        return axes[((JoystickAxisEnum) subjectEnum).toValue()];
    } else if (subjectEnum instanceof JoystickButtonEnum && ((JoystickButtonEnum) subjectEnum).isDriver() == false) {
        return buttons[((JoystickButtonEnum) subjectEnum).toValue()];
    }
    else if(subjectEnum instanceof JoystickDPadButtonEnum && !((JoystickDPadButtonEnum) subjectEnum).isDriver())
    {
        return dPadButtons[((JoystickDPadButtonEnum) subjectEnum).toValue()];
    } 
    else {
        System.out.println("Subject not supported or incorrect.");
        return null;
    }
}
 
开发者ID:wildstang111,项目名称:2014_software,代码行数:16,代码来源:ManipulatorJoystick.java

示例14: getSubject

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public Subject getSubject(ISubjectEnum subjectEnum) {
    if (subjectEnum == WsDriverJoystickEnum.THROTTLE) {
        return throttle;
    } else if (subjectEnum == WsDriverJoystickEnum.HEADING) {
        return heading;
    } else if (subjectEnum == WsDriverJoystickEnum.D_PAD_UP_DOWN) {
        return dPadUpDown;
    } else if (subjectEnum instanceof WsDriverJoystickButtonEnum) {
        return buttons[((WsDriverJoystickButtonEnum) subjectEnum).toValue()];
    } else {
        System.out.println("Subject not supported or incorrect.");
        return null;
    }
}
 
开发者ID:wildstang111,项目名称:2013_robot_software,代码行数:15,代码来源:WsDriverJoystick.java

示例15: WsIntake

import com.wildstangs.subjects.base.ISubjectEnum; //导入依赖的package包/类
public WsIntake(String name) {
    super(name);

    //Finger down override button
    Subject subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON10);
    subject.attach(this);
    
    //Finger up override button
    subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON9);
    subject.attach(this);

    subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON5);
    subject.attach(this);

    subject = WsInputManager.getInstance().getOiInput(WsInputManager.MANIPULATOR_JOYSTICK).getSubject(WsManipulatorJoystickButtonEnum.BUTTON7);
    subject.attach(this);

    subject = WsInputManager.getInstance().getSensorInput(WsInputManager.LEFT_ACCUMULATOR_LIMIT_SWITCH).getSubject((ISubjectEnum) null);
    subject.attach(this);

    subject = WsInputManager.getInstance().getSensorInput(WsInputManager.RIGHT_ACCUMULATOR_LIMIT_SWITCH).getSubject((ISubjectEnum) null);
    subject.attach(this);

    subject = WsInputManager.getInstance().getSensorInput(WsInputManager.FUNNELATOR_LIMIT_SWITCH).getSubject((ISubjectEnum) null);
    subject.attach(this);

    switchDelayTime = switchDelay.getValue();
    useTimeDelay = useDelay.getValue();
}
 
开发者ID:wildstang111,项目名称:2013_robot_software,代码行数:30,代码来源:WsIntake.java


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