001package com.ctre.phoenix.led; 002 003import com.ctre.phoenix.CustomParamConfiguration; 004import com.ctre.phoenix.led.CANdle.LEDStripType; 005import com.ctre.phoenix.led.CANdle.VBatOutputMode; 006 007/** 008 * Configurables available to CANifier 009 */ 010public class CANdleConfiguration extends CustomParamConfiguration{ 011 /** 012 * What type of LEDs the CANdle controls 013 */ 014 public LEDStripType stripType = LEDStripType.RGB; 015 /** 016 * Brightness scalar for all LEDs controlled 017 */ 018 public double brightnessScalar = 1.0; 019 /** 020 * True to turn off LEDs when Loss of Signal occurrs 021 */ 022 public boolean disableWhenLOS = false; 023 /** 024 * True to turn off Status LED when CANdle is actively being controlled 025 */ 026 public boolean statusLedOffWhenActive = false; 027 /** 028 * The behavior of VBat output 029 */ 030 public VBatOutputMode vBatOutputMode = VBatOutputMode.On; 031 032 public CANdleConfiguration() { 033 } 034 035 /** 036 * @return String representation of configs 037 */ 038 public String toString() { 039 return toString(""); 040 } 041 042 /** 043 * @param prependString 044 * String to prepend to configs 045 * @return String representation of configs 046 */ 047 public String toString(String prependString) { 048 049 String retstr = prependString + ".stripType = " + stripType.toString() + ";\n"; 050 retstr += prependString + ".brightnessScalar = " + String.valueOf(brightnessScalar) + ";\n"; 051 retstr += prependString + ".disableWhenLOS = " + String.valueOf(disableWhenLOS) + ";\n"; 052 retstr += prependString + ".statusLedOffWhenActive = " + String.valueOf(statusLedOffWhenActive) + ";\n"; 053 retstr += prependString + ".vBatOutputMode = " + String.valueOf(vBatOutputMode) + ";\n"; 054 055 retstr += super.toString(prependString); 056 057 return retstr; 058 } 059 060}