/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.frc2013.rmr662.manipulator;

import com.frc2013.rmr662.system.generic.Component;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;

/**
 *
 * @author ROBOTics
 */
public class Foot extends Component {
    
    private DoubleSolenoid footSolenoid;
    private Joystick controller;
    
    private Jaguar motor;
    
    public Foot() {
	footSolenoid = new DoubleSolenoid(4, 5);
	controller = new Joystick(3);
	
	motor = new Jaguar(3);
    }
    
    protected void update() {
	if (controller.getRawButton(1)) {
	    footSolenoid.set(DoubleSolenoid.Value.kForward);
	} else {
	    footSolenoid.set(DoubleSolenoid.Value.kReverse);
	}
	
	double speed = controller.getRawAxis(3);
	motor.set(speed);
    }
    
    protected void onEnd() {
	footSolenoid.free();
	motor.free();
    }
    
    
    
}

@@ -197,44 +197,45 @@
 ort 
-edu.wpi.first.wpilibj.DoubleSolenoid
+com.frc2013.rmr662.wrappers.RMRJaguar
 ;%0Aim
@@ -261,22 +261,30 @@
 wpilibj.
-Jaguar
+DoubleSolenoid
 ;%0Aimport
@@ -315,16 +315,52 @@
 oystick;
+%0Aimport edu.wpi.first.wpilibj.Servo;
 %0A%0A/**%0A *
@@ -509,34 +509,880 @@
     
-%0A    private Jaguar motor;
+private Carriage carriage;%0A    %0A    private class Carriage extends RMRJaguar %7B%0A        %0A        private Servo lockingServo;%0A        %0A        private static final double SERVO_LOCK = 0.0; // TODO%0A        private static final double SERVO_UNLOCK = SERVO_LOCK + 0.6;%0A        %0A        public Carriage(int channel, double multiplier) %7B%0A            super(channel, multiplier);%0A            lockingServo = new Servo(4);%0A        %7D%0A        %0A        public void set(double speed) %7B%0A            %0A            if (speed %3E 0 %7C%7C controller.getRawButton(2) %7C%7C Math.abs(speed) %3C 0.05) %7B%0A                lockingServo.set(SERVO_LOCK);%0A            %7D else %7B%0A                lockingServo.set(SERVO_UNLOCK);%0A            %7D%0A            %0A            super.set(speed);%0A        %7D%0A        %0A        public void free() %7B%0A            lockingServo.free();%0A            super.free();%0A        %7D%0A        %0A    %7D
 %0A   
@@ -1480,31 +1480,46 @@
 3);%0A
-%09%0A%09motor = new Jaguar(3
+        carriage = new Carriage(3, 1.0
 );%0A 
@@ -1758,22 +1758,32 @@
 xis(3);%0A
-%09motor
+        carriage
 .set(spe
@@ -1853,14 +1853,24 @@
 ();%0A
-%09motor
+        carriage
 .fre

Add servo code to matts stuff