Package org.parts3492.partslib
Class PARTsCandle
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
org.parts3492.partslib.command.PARTsSubsystem
org.parts3492.partslib.PARTsCandle
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem,IPARTsSubsystem
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.parts3492.partslib.command.PARTsSubsystem
partsLogger, partsNT, partsPrefrences -
Constructor Summary
ConstructorsConstructorDescriptionPARTsCandle(String className, int canID, int ledLength) Create a new PARTsCANdle. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigBrightness(double percent) voidconfigLedType(com.ctre.phoenix6.signals.StripTypeValue type) voidconfigLos(com.ctre.phoenix6.signals.LossOfSignalBehaviorValue disableWhenLos) voidconfigStatusLedBehavior(com.ctre.phoenix6.signals.StatusLedWhenActiveValue offWhenActive) doubleget5V()doubledoubledoublegetVbat()voidlog()voidvoidperiodic()voidreset()protected voidprotected voidprotected voidrunColorFlowAnimation(PARTsCandle.Color color, double speed, com.ctre.phoenix6.signals.AnimationDirectionValue direction) protected voidrunFadeAnimation(PARTsCandle.Color color, double speed) protected voidprotected voidrunFireAnimation(double brightness, double speed, double sparking, double cooling) protected voidprotected voidrunLarsonAnimation(PARTsCandle.Color color, double speed, int size) protected voidprotected voidprotected voidrunStrobeAnimation(PARTsCandle.Color color, double speed) protected voidprotected voidrunTwinkleAnimation(PARTsCandle.Color color, double speed) protected voidsetColor(PARTsCandle.Color color) protected edu.wpi.first.wpilibj2.command.Commandprotected voidprotected edu.wpi.first.wpilibj2.command.Commandvoidstop()Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.util.sendable.Sendable
initSendableMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, getName, idle, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
PARTsCandle
Create a new PARTsCANdle.- Parameters:
className- The class name. E.g. PARTsCANdlecanID- The ID of the CANdle hardware.ledLength- The length of LEDs attached to the CANdle.
-
-
Method Details
-
setColor
-
setNoColor
protected void setNoColor() -
setColorGreenCommand
protected edu.wpi.first.wpilibj2.command.Command setColorGreenCommand() -
setNoColorCommand
protected edu.wpi.first.wpilibj2.command.Command setNoColorCommand() -
runBurnyBurnAnimation
protected void runBurnyBurnAnimation() -
runRainbowAnimation
protected void runRainbowAnimation() -
runStrobeAnimation
-
runStrobeAnimation
-
runLarsonAnimation
-
runLarsonAnimation
-
runTwinkleAnimation
-
runColorFlowAnimation
-
runColorFlowAnimation
protected void runColorFlowAnimation(PARTsCandle.Color color, double speed, com.ctre.phoenix6.signals.AnimationDirectionValue direction) -
runFireAnimation
protected void runFireAnimation() -
runFireAnimation
protected void runFireAnimation(double brightness, double speed, double sparking, double cooling) -
runTwinkleAnimation
-
runFadeAnimation
-
getVbat
public double getVbat() -
get5V
public double get5V() -
getCurrent
public double getCurrent() -
getTemperature
public double getTemperature() -
configBrightness
public void configBrightness(double percent) -
configLos
public void configLos(com.ctre.phoenix6.signals.LossOfSignalBehaviorValue disableWhenLos) -
configLedType
public void configLedType(com.ctre.phoenix6.signals.StripTypeValue type) -
configStatusLedBehavior
public void configStatusLedBehavior(com.ctre.phoenix6.signals.StatusLedWhenActiveValue offWhenActive) -
periodic
public void periodic() -
outputTelemetry
public void outputTelemetry() -
stop
public void stop() -
reset
public void reset() -
log
public void log()
-