package com.edinarobotics.zephyr.parts;

import edu.wpi.first.wpilibj.Relay;

/**
 *Wraps the conveyor belt, collector lifter and spinner into a class.
 */
public class CollectorComponents {
    private Relay collectorLift;
    private Relay collectorSpin;
    private Relay conveyor;
    public CollectorComponents(int lift, int spin, int conveyor){
        collectorLift = new Relay(lift);
        collectorSpin = new Relay(spin);
        this.conveyor = new Relay(conveyor);
    }
    /*
     * Lower the conveyor if liftDirection is 1, lower it if it's -1 otherwise
     * stop it.
     */
    public void lift(int liftDirection){
        switch(liftDirection){
                case 1:collectorLift.set(Relay.Value.kForward); break;
                case -1: collectorLift.set(Relay.Value.kReverse); break;
                default: collectorLift.set(Relay.Value.kOff); break;
        }
    }
    /*
     * Spin the collector if collecotState is true, otherwise stop it.
     */
    public void collect(boolean collectState){
        collectorSpin.set((collectState?Relay.Value.kReverse:Relay.Value.kOff));
    }
    /*
     * Spin the conveyor if collectState is true, otherwise stop it.
     */
    public void conveyorMove(boolean collectState){
        conveyor.set((collectState?Relay.Value.kReverse:Relay.Value.kOff));
    }
    
}
@@ -278,16 +278,413 @@
 nveyor;%0A
+    %0A    /**%0A     * Constructs a CollectorComponents using the given channels for its%0A     * sub-components.%0A     * @param lift The channel of the lifting spike relay of the collector.%0A     * @param spin The channel of the collecting motor spike relay of the%0A     * collector%0A     * @param conveyor the channel of the spike relay that powers the conveyor%0A     * belt within the collector.%0A     */%0A
     publ
@@ -874,30 +874,36 @@
 ;%0A    %7D%0A
+    %0A
     /*
+*
 %0A     * 
 Lower th
@@ -898,93 +898,316 @@
   * 
-Lower the conveyor if liftDirection is 1, lower it if it's -1 otherwise%0A     * stop i
+Sets the current deployment direction of the collector.%0A     * @param liftDirection The direction that the collector should be deployed.%0A     * %7B@code 1%7D will lower the collector to the ground, %7B@code -1%7D will%0A     * lift the collector into the robot, and %7B@code 0%7D will stop the%0A     * collector's deploymen
 t.%0A 
@@ -1510,33 +1510,39 @@
     %7D%0A    %7D%0A    
-/
+%0A    /*
 *%0A     * Spin th
@@ -1539,69 +1539,235 @@
  * S
-pin the collector if
+ets whether or not the collector's collection motor should be powered.%0A     * @param
  collec
-o
 tState 
-is true, otherwise stop it
+Turns the collector on or off. %7B@code true%7D starts%0A     * the collector and will collect balls, %7B@code false%7D stops the collector
 .%0A  
@@ -1910,17 +1910,23 @@
   %7D%0A    
-/
+%0A    /*
 *%0A     *
@@ -1931,67 +1931,255 @@
  * S
-pin the conveyor if collectState is true, otherwise stop it
+ets whether or not the internal conveyor belt should move collected%0A     * balls up to the shooter.%0A     * @param conveyorState Turns the internal conveyor belt on and off.%0A     * %7B@code true%7D turns the conveyor belt on, %7B@code false%7D turns it off
 .%0A  
@@ -2215,37 +2215,38 @@
 rMove(boolean co
-llect
+nveyor
 State)%7B%0A        
@@ -2253,37 +2253,38 @@
 conveyor.set((co
-llect
+nveyor
 State?Relay.Valu

Add javadoc comments to CollectorComponents.