/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.usfirst.frc330.wpilibj;

import org.usfirst.frc330.Robot;

import edu.wpi.first.wpilibj.PIDController;
import edu.wpi.first.wpilibj.PIDOutput;
import edu.wpi.first.wpilibj.PIDSource;

 
/**
 *
 * @author joe
 */
public class MultiPIDController extends PIDController{
	private String name;
	
    public MultiPIDController(PIDGains gains, PIDSource source, PIDOutput output, double period, String name)
    {
        super(gains.getP(),gains.getI(),gains.getD(),gains.getF(),source,output,period);
        this.name = name;
    }
    
    public MultiPIDController(PIDGains gains, PIDSource source, PIDOutput output, String name)
    {
        super(gains.getP(),gains.getI(),gains.getD(),gains.getF(),source,output);
        this.name = name;
    }

    public void setPID(PIDGains gains) {
        setPID(gains.getP(), gains.getI(), gains.getD(), gains.getF());
        Robot.logger.println("Changing " + name + " Gains to " + gains.getName() + ". P=" + gains.getP(),false);
        
    }
    
    public void setMaxOutput(double maxOutput) {
    	setOutputRange(-maxOutput,maxOutput);
    }

}

@@ -1109,16 +1109,102 @@
 tP()
+ + %22 MaxOutput=%22 + gains.getMaxOutput() + %22 MaxOutputStep=%22 + gains.getMaxOutputStep()
 ,false);
 %0D%0A  
@@ -1199,18 +1199,16 @@
 ,false);
-%0D%0A
         

Add more print values when switching gains