Skip to content

Commit

Permalink
toLog IO file
Browse files Browse the repository at this point in the history
  • Loading branch information
Shom770 committed Jan 9, 2024
1 parent 4698453 commit 6235082
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.team4099.robot2023.subsystems.intake

class Intake {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.team4099.robot2023.subsystems.intake

import org.littletonrobotics.junction.LogTable
import org.littletonrobotics.junction.inputs.LoggableInputs
import org.team4099.lib.units.base.amps
import org.team4099.lib.units.base.celsius
import org.team4099.lib.units.base.inAmperes
import org.team4099.lib.units.base.inCelsius
import org.team4099.lib.units.base.meters
import org.team4099.lib.units.derived.inVolts
import org.team4099.lib.units.derived.rotations
import org.team4099.lib.units.derived.volts
import org.team4099.lib.units.inRotationsPerMinute
import org.team4099.lib.units.perMinute
import org.team4099.lib.units.perSecond

interface IntakeIO {
class IntakeIOInputs : LoggableInputs {
var rollerVelocity = 0.0.rotations.perMinute

var rollerAppliedVoltage = 0.0.volts
var rollerSupplyCurrent = 0.0.amps
var rollerStatorCurrent = 0.0.amps
var rollerTemp = 0.0.celsius

override fun toLog(table: LogTable?) {
table?.put("rollerVelocityRPM", rollerVelocity.inRotationsPerMinute)

table?.put("rollerAppliedVoltage", rollerAppliedVoltage.inVolts)

table?.put("rollerSupplyCurrentAmps", rollerSupplyCurrent.inAmperes)

table?.put("rollerStatorCurrentAmps", rollerStatorCurrent.inAmperes)

table?.put("rollerTempCelsius", rollerTemp.inCelsius)
}
}
}

0 comments on commit 6235082

Please sign in to comment.