package com.edinarobotics.zeke;

import com.edinarobotics.zeke.subsystems.Drivetrain;
import com.edinarobotics.zeke.subsystems.DrivetrainRotation;
import com.edinarobotics.zeke.subsystems.DrivetrainStrafe;
import com.edinarobotics.zeke.subsystems.Shooter;

/**
 * The RobotMap is a mapping from the ports sensors and actuators are wired into
 * to a variable name. This provides flexibility changing wiring, makes checking
 * the wiring easier and significantly reduces the number of magic numbers
 * floating around.
 */
public class Components {
    
    private static Components instance;
    
    // Subsystems
    public final Drivetrain drivetrain;
    public final DrivetrainStrafe drivetrainStrafe;
    public final DrivetrainRotation drivetrainRotation; 
    public final Shooter shooter;
    // END Subsystems
    
    // Analog Inputs
    private static final int GYRO = 1;
    private static final int SHOOTER_POT_PORT = 2;
    // END Analog Inputs
    
    // Digital IO Constants
        // Drivetrain Encoders
        private static final int FRONT_LEFT_A  = 1;
        private static final int FRONT_LEFT_B  = 2;
        private static final int FRONT_RIGHT_A = 3;
        private static final int FRONT_RIGHT_B = 4;
        private static final int REAR_LEFT_A   = 5;
        private static final int REAR_LEFT_B   = 6;
        private static final int REAR_RIGHT_A  = 7;
        private static final int REAR_RIGHT_B  = 8;
    // END Digital IO constants
    
    // PWM constants
        // Drivetrain
        private static final int FRONT_LEFT_DRIVE  = 1;
        private static final int REAR_LEFT_DRIVE   = 2;
        private static final int FRONT_RIGHT_DRIVE = 3;
        private static final int REAR_RIGHT_DRIVE  = 4;
        private static final int WINCH_TALON = 5;
        private static final int DOUBLESOLENOID_FORWARD = 6;
        private static final int DOUBLESOLENOID_REVERSE = 7;
    // END PWM constants
    
    /**
     * Private constructor for the Components singleton. This constructor
     * is only called once and handles creating all the robot subsystems.
     */
    private Components(){
        drivetrain = new Drivetrain(FRONT_LEFT_DRIVE, REAR_LEFT_DRIVE,
                FRONT_RIGHT_DRIVE, REAR_RIGHT_DRIVE);
        drivetrainStrafe = new DrivetrainStrafe(drivetrain);
        drivetrainRotation = new DrivetrainRotation(drivetrain, GYRO);
        shooter = new Shooter(WINCH_TALON, DOUBLESOLENOID_FORWARD, 
                DOUBLESOLENOID_REVERSE, SHOOTER_POT_PORT);
    }
    
    /**
     * Returns a new instance of {@link Components}, creating one if null.
     * @return {@link Components}
     */
    public static Components getInstance() {
        if(instance == null){
            instance = new Components();
        }
        return instance;
    }
    
}

@@ -248,16 +248,59 @@
 Shooter;
+%0Aimport edu.wpi.first.wpilibj.DigitalInput;
 %0A%0A/**%0A *
@@ -1083,34 +1083,43 @@
 te static final 
-in
+DigitalInpu
 t FRONT_LEFT_A  
@@ -1116,25 +1116,46 @@
 T_LEFT_A  = 
-1
+new DigitalInput(1, 1)
 ;%0A        pr
@@ -1165,34 +1165,43 @@
 te static final 
-in
+DigitalInpu
 t FRONT_LEFT_B  
@@ -1198,25 +1198,46 @@
 T_LEFT_B  = 
-2
+new DigitalInput(1, 2)
 ;%0A        pr
@@ -1259,29 +1259,59 @@
 nal 
-int FRONT_RIGH
+DigitalInput REAR_LEF
 T_A 
+  
 = 
-3
+new DigitalInput(1, 3)
 ;%0A  
@@ -1341,81 +1341,141 @@
 nal 
-int FRONT_RIGHT_B = 4;%0A        private static final int REAR_LEFT_A   =
+DigitalInput REAR_LEFT_B   = new DigitalInput(1, 4);%0A        private static final DigitalInput FRONT_RIGHT_A = new DigitalInput(1,
  5
+)
 ;%0A  
@@ -1505,29 +1505,59 @@
 nal 
-int REAR_LEFT_B   =
+DigitalInput FRONT_RIGHT_B = new DigitalInput(1,
  6
+)
 ;%0A  
@@ -1575,34 +1575,43 @@
 te static final 
-in
+DigitalInpu
 t REAR_RIGHT_A  
@@ -1612,17 +1612,38 @@
 HT_A  = 
-7
+new DigitalInput(1, 7)
 ;%0A      
@@ -1657,34 +1657,43 @@
 te static final 
-in
+DigitalInpu
 t REAR_RIGHT_B  
@@ -1698,9 +1698,30 @@
   = 
-8
+new DigitalInput(1, 8)
 ;%0A  

Change Drivetrain components constants to Digital Inputs.