Skip to content

Commit

Permalink
new method of obtaining applied voltage in SwerveModuleIOTalon
Browse files Browse the repository at this point in the history
  • Loading branch information
00magikarp committed Jul 5, 2024
1 parent c6077a8 commit bf5bf60
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ class SwerveModuleIOTalon(
override fun updateInputs(inputs: SwerveModuleIO.SwerveModuleIOInputs) {
updateSignals()

inputs.driveAppliedVoltage = (driveFalcon.get() * RobotController.getBatteryVoltage()).volts
inputs.steerAppliedVoltage = (steeringFalcon.get() * RobotController.getBatteryVoltage()).volts
inputs.driveAppliedVoltage = driveFalcon.motorVoltage.value.volts
inputs.steerAppliedVoltage = steeringFalcon.motorVoltage.value.volts
//inputs.driveAppliedVoltage = (driveFalcon.get() * RobotController.getBatteryVoltage()).volts
//inputs.steerAppliedVoltage = (steeringFalcon.get() * RobotController.getBatteryVoltage()).volts

inputs.statorCurrentDrive = driveStatorCurrentSignal.value.amps
inputs.supplyCurrentDrive = driveSupplyCurrentSignal.value.amps
Expand Down

0 comments on commit bf5bf60

Please sign in to comment.