Skip to content

Commit

Permalink
Added Led.kt File
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingMaster121 committed Jan 10, 2024
1 parent b671632 commit 9fae23a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/kotlin/com/team4099/robot2023/subsystems/led/Led.kt
Original file line number Diff line number Diff line change
@@ -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)
}
}

0 comments on commit 9fae23a

Please sign in to comment.