// RobotBuilder Version: 1.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc3360.Hyperion2014.subsystems;


import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.command.Subsystem;
import org.usfirst.frc3360.Hyperion2014.RobotMap;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStationEnhancedIO;
import edu.wpi.first.wpilibj.Timer;

/**
 *
 */
public class LedsSetter extends Subsystem {
    
    Relay ColorLedsRelay = RobotMap.ColorLedsRelay;
    Relay FlashingLedsRelay = RobotMap.FlashingLedsRelay;
    double LastFlashTimeMs = System.currentTimeMillis();
    boolean m_bIsError;
    boolean m_FlashState = false;

   
    public void initDefaultCommand() {
        
    }
    
    
    public void FlashLedsPeriodic(){
        
        double flashTimeMs = 1;
        try {
            flashTimeMs = DriverStation.getInstance().getEnhancedIO().getAnalogIn(8) * 1000;
            
            if(flashTimeMs > 2500){
                flashTimeMs = 10000000;
            }
        } catch (DriverStationEnhancedIO.EnhancedIOException ex) {
            ex.printStackTrace();
        }
        
        //System.out.println("FlashTime" + flashTimeMs);
        
        if ((System.currentTimeMillis() - LastFlashTimeMs) > flashTimeMs){
            // Initiate FLASH;
            m_FlashState = false;
            
            LastFlashTimeMs = System.currentTimeMillis();
        }
        else if ((System.currentTimeMillis() - LastFlashTimeMs) > (0.1 * flashTimeMs))
        {
            m_FlashState = true;
        }
        
        if (m_FlashState)
        {
            if (!m_bIsError)
            {
                FlashingLedsRelay.set(Relay.Value.kForward);
            }
            else
            {
                FlashingLedsRelay.set(Relay.Value.kReverse);
            }
        }
        else
        {
            FlashingLedsRelay.set(Relay.Value.kOff);           
        }
    }
    public void ErrorBoolean(){
        m_bIsError = true;
    }
    
    public void RemoveErrorBoolean()
    {
        m_bIsError = false;        
    }
    
    public void SetBumpersColor(){
        
        double ColorValue = 0;
        try {
            ColorValue = DriverStation.getInstance().getEnhancedIO().getAnalogIn(6);
        } catch (DriverStationEnhancedIO.EnhancedIOException ex) {
            ex.printStackTrace();
        }
        
        if(ColorValue > 1.5){
            
            ColorLedsRelay.set(Relay.Value.kForward);
        }
        else{
            ColorLedsRelay.set(Relay.Value.kReverse);
        }
        
    }
}
@@ -2345,10 +2345,9 @@
 e.kO
-ff
+n
 );  

Put relay to on to avoid feedback going into the other set of led connected to the oposite direction.