package org.redalert1741.cageBot;

import org.redalert1741.robotBase.config.Config;
import org.redalert1741.robotBase.config.Configurable;

import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Spark;

public class GearPlacer implements Configurable
{
	boolean liftOn, pushOn;
	Solenoid liftL, liftR, pushL, pushR;
	private Spark in;
	
	public GearPlacer(int liftL, int liftR, int pushL, int pushR, int intake)
	{
		this.in = new Spark(intake);
		this.liftL = new Solenoid(liftL);
		this.liftR = new Solenoid(liftR);
		this.pushL = new Solenoid(pushL);
		this.pushR = new Solenoid(pushR);
	}
	
	public void liftUp()
	{
		liftL.set(liftOn);
		liftR.set(liftOn);
	}
	
	public void liftDown()
	{
		liftL.set(!liftOn);
		liftR.set(!liftOn);
	}
	
	public void push()
	{
		pushL.set(pushOn);
		pushR.set(pushOn);
	}
	
	public void hold()
	{
		pushL.set(!pushOn);
		pushR.set(!pushOn);
	}
	
	public void setIntake(double x)
	{
		in.set(x);
	}

	@Override
	public void reloadConfig()
	{
		liftOn = Config.getSetting("liftOn", false);
		pushOn = Config.getSetting("pushOn", true);
	}
}

@@ -131,16 +131,122 @@
 gurable;
+%0Aimport org.redalert1741.robotBase.logging.DataLogger;%0Aimport org.redalert1741.robotBase.logging.Loggable;
 %0A%0Aimport
@@ -362,16 +362,26 @@
 igurable
+, Loggable
 %0A%7B%0A%09bool
@@ -1197,11 +1197,357 @@
 rue);%0A%09%7D
+%0A%0A%09@Override%0A%09public void setupLogging(DataLogger logger)%0A%09%7B%0A%09%09logger.addAttribute(%22liftState%22);%0A%09%09logger.addAttribute(%22pushState%22);%0A%09%09logger.addAttribute(%22intakeSpeed%22);%0A%09%7D%0A%0A%09@Override%0A%09public void log(DataLogger logger)%0A%09%7B%0A%09%09logger.log(%22liftState%22, liftL.get());%0A%09%09logger.log(%22pushState%22, pushR.get());%0A%09%09logger.log(%22intakeSpeed%22, in.get());%0A%09%7D
 %0A%7D%0A

Add config to gearplacer