From bf5bf601d041315baeec8ba75cafd26c95f3c983 Mon Sep 17 00:00:00 2001 From: 00magikarp <94652654+00magikarp@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:25:35 -0400 Subject: [PATCH] new method of obtaining applied voltage in SwerveModuleIOTalon --- .../drivetrain/swervemodule/SwerveModuleIOTalon.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/team4099/robot2023/subsystems/drivetrain/swervemodule/SwerveModuleIOTalon.kt b/src/main/kotlin/com/team4099/robot2023/subsystems/drivetrain/swervemodule/SwerveModuleIOTalon.kt index 5cb98b8a..90de7373 100644 --- a/src/main/kotlin/com/team4099/robot2023/subsystems/drivetrain/swervemodule/SwerveModuleIOTalon.kt +++ b/src/main/kotlin/com/team4099/robot2023/subsystems/drivetrain/swervemodule/SwerveModuleIOTalon.kt @@ -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