Package edu.stuy.subsystems

Source Code of edu.stuy.subsystems.Tusks

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.stuy.subsystems;

import edu.stuy.RobotMap;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.command.Subsystem;

/**
*
* @author Kevin Wang
*/
public class Tusks extends Subsystem {
    Solenoid solenoidExtend;
    Solenoid solenoidRetract;
   
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
   
    public Tusks() {
       // In "2nd" cRio slot, or 4th physical
        solenoidExtend = new Solenoid(2, RobotMap.TUSKS_SOLENOID_EXTEND);
        solenoidRetract = new Solenoid(2, RobotMap.TUSKS_SOLENOID_RETRACT);
    }

    public void initDefaultCommand() {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
   
    public void extend() {
        solenoidExtend.set(true);
        solenoidRetract.set(false);
    }
   
    public void retract() {
        solenoidRetract.set(true);
        solenoidExtend.set(false);
    }

    public boolean isExtended() {
        return solenoidExtend.get();
    }
}
TOP

Related Classes of edu.stuy.subsystems.Tusks

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.