Skip to content

Commit

Permalink
Started IO File
Browse files Browse the repository at this point in the history
  • Loading branch information
SirBeans committed Jan 10, 2024
1 parent 99853d7 commit 21f0652
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.team4099.robot2023.subsystems.Shooter

interface ShooterIO () {
class ShooterIOInputs : LoggableInputs {
var rollerVelocity = 0.rotations.perMinute
var rollerAppliedVoltage = 0.volts
var rollerStatorCurrent = 0.amps
var rollerSupplyCurrent = 0.amps
var rollerTempreature = 0.celsius
}
fun toLog(table:LogTable){
table?.put("rollerVelocityRPM", rollerVelocity.inRadians.perSecond)
table?.put("rollerAppliedVoltage", rollerAppliedVoltage.inVolts)
table?.put("rollerStatorCurrent", rollerStatorCurrent.inamps)
table?.put("rollerVelocityRPM", rollerSupplyCurrent.inamps)
table?.put("rollerTempreature", rollerTempreature.celsisus)

}
fun fromLog(table:LogTable){
table?.getDouble("rollerVelocityRPM", rollerVelocityRPM.inRadiansPerSecond)?.let{
rollerVelocity = it.radians.perSecond
}
table?.getDouble("rollerAppliedVoltage", rollerAppliedVoltage.involts)?.let {
rollerAppliedVoltage = it.volts
}
table?.getDouble("rollerStatorCurrent", rollerStatorCurrent.inRadiansPerSecond)?.let{

}
table?.getDouble("rollerVelocityRPM", rollerVelocityRPM.inRadiansPerSecond)
table?.getDouble("rollerVelocityRPM", rollerVelocityRPM.inRadiansPerSecond)


}
}

0 comments on commit 21f0652

Please sign in to comment.