Package com.grt192.mechanism.cannonbot

Source Code of com.grt192.mechanism.cannonbot.Target

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package com.grt192.mechanism.cannonbot;

import com.grt192.actuator.GRTTwoWaySolenoid;
import com.grt192.core.Command;
import com.grt192.core.Mechanism;

/**
*
* @author Robostudent
*/
public class Target extends Mechanism {
    private GRTTwoWaySolenoid solenoid;
    private boolean out = false;

    public Target(GRTTwoWaySolenoid solenoid){
        this.addActuator("solenoid", solenoid);
        this.solenoid = solenoid;
    }
    public void withdraw() {
         solenoid.enqueueCommand(new Command(GRTTwoWaySolenoid.REVERSE));
         out = false;
    }

    public void extend() {
         solenoid.enqueueCommand(new Command(GRTTwoWaySolenoid.FORWARD));
         out = true;
    }

    public boolean solenoidOut() {
        return out;
    }

}
TOP

Related Classes of com.grt192.mechanism.cannonbot.Target

TOP
Copyright © 2018 www.massapi.com. 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.