diff --git a/src/main/kotlin/com/team4099/robot2023/subsystems/led/Led.kt b/src/main/kotlin/com/team4099/robot2023/subsystems/led/Led.kt new file mode 100644 index 00000000..91a4f1bd --- /dev/null +++ b/src/main/kotlin/com/team4099/robot2023/subsystems/led/Led.kt @@ -0,0 +1,23 @@ +package com.team4099.robot2023.subsystems.led + +import com.team4099.robot2023.config.constants.LedConstants +import org.littletonrobotics.junction.Logger + +class Led(val io: LedIO) { + var inputs = LedIO.LedIOInputs() + var state = LedConstants.LEDMode.IDLE + set(value) { + io.setState(value) + field = value + } + + init { + state = state + } + + fun periodic() { + io.updateInputs(inputs) + Logger.processInputs("LED", inputs) + Logger.recordOutput("LED/state", state.name) + } +} \ No newline at end of file