Package ca.teamdave.caruso.actuator

Examples of ca.teamdave.caruso.actuator.Actuator


            value = sensor.getValue();
            this.sensors.put(key, value);
        }

        Actuator actuator;
        keys = actuators.keys();
        while (keys.hasMoreElements()) {
            key = (String) keys.nextElement();
            actuator = (Actuator) actuators.get(key);

            value = actuator.getValue();
            this.actuators.put(key, value);
        }
    }
View Full Code Here


    public Hashtable createActuators() {
        final SimpleFRCBotSimulated me = this;
        Hashtable res = new Hashtable();

        res.put(SimpleFRCIO.ARM_VALVE, new Actuator(Boolean.class) {
            protected void assignValue(Object val) {
                me.valveOn = ((Boolean)val).booleanValue();
            }

            protected Object retriveValue() {
View Full Code Here

    public Hashtable createActuators() {
        final LinearRobotSimulated me = this;
        Hashtable res = new Hashtable();

        res.put(LrNames.OUTPUT_FORCE, new Actuator(Double.class) {
            protected Object retriveValue() {
                return new Double(me.outputNormalized);
            }

            protected void assignValue(Object val) {
                me.outputNormalized = ((Double) val).doubleValue();
                if (me.outputNormalized > 1.0) {
                    me.outputNormalized = 1.0;
                } else if (me.outputNormalized < -1.0) {
                    me.outputNormalized = -1.0;
                }
            }
           
        });

        res.put(LrNames.DESIRED_POSITION, new Actuator(Double.class) {
            protected Object retriveValue() {
                return new Double(me.destPos);
            }

            protected void assignValue(Object val) {
                me.destPos = ((Double)val).doubleValue();
            }
        });
        res.put(LrNames.DESIRED_SPEED, new Actuator(Double.class) {
            protected Object retriveValue() {
                return new Double(me.destSpeed);
            }

            protected void assignValue(Object val) {
                me.destSpeed = ((Double)val).doubleValue();
            }
        });
        res.put(LrNames.DESIRED_ACCEL, new Actuator(Double.class) {
            protected Object retriveValue() {
                return new Double(me.destAccel);
            }

            protected void assignValue(Object val) {
View Full Code Here

     */
    public Hashtable createActuators() {
        final SimpleFRCBotPhysical me = this;

        Hashtable res = new Hashtable();
        res.put(SimpleFRCIO.ARM_VALVE, new Actuator(Boolean.class){
            protected void assignValue(Object val) {
                me.armValve.set(((Boolean)val).booleanValue());
            }

            protected Object retriveValue() {
View Full Code Here

TOP

Related Classes of ca.teamdave.caruso.actuator.Actuator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.