/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package drive;

import edu.wpi.first.wpilibj.command.PIDSubsystem;
import edu.wpi.first.wpilibj.Talon;
import sensing.TurningEncoder;

/**
 *
 * @author 1218
 */
public class TurningMotorPID extends PIDSubsystem {

    private static final double Kp = 0.0;
    private static final double Ki = 0.0;
    private static final double Kd = 0.0;

    private Talon motor;
    TurningEncoder encoder;
    
    // Initialize your subsystem here
    public TurningMotorPID(int talonPort, int encoderPort1, int encoderPort2) {
        super("turningMotorPID", Kp, Ki, Kd);
        motor = new Talon(talonPort);
        //encoder = new TurningEncoder(encoderPort1, encoderPort2, 360, 2);
        // Use these to get going:
        // setSetpoint() -  Sets where the PID controller should move the system
        //                  to
        // enable() - Enables the PID controller.
    }
    
    public void initDefaultCommand() {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
    
    protected double returnPIDInput() {
        // Return your input value for the PID loop
        // e.g. a sensor, like a potentiometer:
        // yourPot.getAverageVoltage() / kYourMaxVoltage;
        return 0.0;
    }
    
    protected void usePIDOutput(double output) {
        // Use output to drive your system, like a motor
        motor.set(output);
    }
    
    public void setAngle(int angle)
    {
        setSetpoint(angle);
    }
}

@@ -1,11 +1,10 @@
 /*
-%0D
 %0A * To c
@@ -75,17 +75,16 @@
 perties.
-%0D
 %0A * To c
@@ -133,17 +133,16 @@
 emplates
-%0D
 %0A * and 
@@ -173,22 +173,35 @@
  editor.
-%0D
 %0A */
-%0D
+%0A //test change
 %0Apackage
@@ -207,19 +207,17 @@
 e drive;
-%0D%0A%0D
+%0A
 %0Aimport 
@@ -259,17 +259,16 @@
 bsystem;
-%0D
 %0Aimport 
@@ -295,17 +295,16 @@
 j.Talon;
-%0D
 %0Aimport 
@@ -330,20 +330,16 @@
 der;
-%0D%0A%0D
+%0A
 %0A/**
-%0D
 %0A *
-%0D
 %0A * 
@@ -354,14 +354,12 @@
 1218
-%0D
 %0A */
-%0D
 %0Apub
@@ -406,19 +406,17 @@
 system %7B
-%0D%0A%0D
+%0A
 %0A    pri
@@ -445,25 +445,24 @@
 le Kp = 0.0;
-%0D
 %0A    private
@@ -487,25 +487,24 @@
 le Ki = 0.0;
-%0D
 %0A    private
@@ -537,11 +537,9 @@
 0.0;
-%0D%0A%0D
+%0A
 %0A   
@@ -559,17 +559,16 @@
 n motor;
-%0D
 %0A    Tur
@@ -587,23 +587,21 @@
 encoder;
-%0D
 %0A    
-%0D
 %0A    // 
@@ -630,17 +630,16 @@
 tem here
-%0D
 %0A    pub
@@ -710,17 +710,16 @@
 Port2) %7B
-%0D
 %0A       
@@ -756,17 +756,16 @@
 Ki, Kd);
-%0D
 %0A       
@@ -794,17 +794,16 @@
 onPort);
-%0D
 %0A       
@@ -870,17 +870,16 @@
 360, 2);
-%0D
 %0A       
@@ -905,17 +905,16 @@
 t going:
-%0D
 %0A       
@@ -986,17 +986,16 @@
 e system
-%0D
 %0A       
@@ -1017,17 +1017,16 @@
       to
-%0D
 %0A       
@@ -1067,30 +1067,27 @@
 troller.
-%0D
 %0A    %7D
-%0D
 %0A    
-%0D
 %0A    pub
@@ -1113,25 +1113,24 @@
 tCommand() %7B
-%0D
 %0A        // 
@@ -1174,17 +1174,16 @@
 em here.
-%0D
 %0A       
@@ -1227,30 +1227,27 @@
 mand());
-%0D
 %0A    %7D
-%0D
 %0A    
-%0D
 %0A    pro
@@ -1278,17 +1278,16 @@
 nput() %7B
-%0D
 %0A       
@@ -1330,17 +1330,16 @@
 PID loop
-%0D
 %0A       
@@ -1378,17 +1378,16 @@
 iometer:
-%0D
 %0A       
@@ -1436,17 +1436,16 @@
 Voltage;
-%0D
 %0A       
@@ -1456,30 +1456,27 @@
 urn 0.0;
-%0D
 %0A    %7D
-%0D
 %0A    
-%0D
 %0A    pro
@@ -1516,17 +1516,16 @@
 utput) %7B
-%0D
 %0A       
@@ -1573,17 +1573,16 @@
  a motor
-%0D
 %0A       
@@ -1604,22 +1604,19 @@
 ut);
-%0D
 %0A    %7D
-%0D
 %0A    
-%0D
 %0A   
@@ -1651,16 +1651,14 @@
 gle)
-%0D
 %0A    %7B
-%0D
 %0A   
@@ -1685,16 +1685,13 @@
 le);
-%0D
 %0A    %7D
-%0D
 %0A%7D
-%0D
 %0A

test lcook