From 3a3aa6eb77f0dcb2f95094d978afcbb570f55f37 Mon Sep 17 00:00:00 2001 From: NeonCoal <52942449+NeonCoal@users.noreply.github.com> Date: Tue, 9 Jan 2024 19:34:46 -0500 Subject: [PATCH] a --- .../TelescopingArm/TelescopingArm.kt | 19 +------------------ .../TelescopingArm/TelescopingArmIO.kt | 2 +- .../TelescopingArm/TelescopingArmIOReal.kt | 18 +++++++++++++++++- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArm.kt b/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArm.kt index 47cea5ec..6e59d178 100644 --- a/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArm.kt +++ b/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArm.kt @@ -18,23 +18,6 @@ import edu.wpi.first.math.controller.ElevatorFeedforward import edu.wpi.first.math.trajectory.TrapezoidProfile import edu.wpi.first.wpilibj2.boardmand.SubsystemBase import org.littletonrobotics.junction.Logger -class TelescopingArm { +class TelescopingArm(val io: TelescopingClimberIO) : SubsystemBase() { - fun holdPosition(loaded: Boolean = true) { - if (loaded) { - io.setLeftPosition(inputs.leftPosition, loadedFeedForward.calculate(0.0).volts) - io.setRightPosition(inputs.rightPosition, loadedFeedForward.calculate(0.0).volts) - } else { - io.setLeftPosition(inputs.leftPosition, noLoadFeedForward.calculate(0.0).volts) - io.setRightPosition(inputs.rightPosition, noLoadFeedForward.calculate(0.0).volts) - } - } - - fun zeroLeftEncoder() { - io.zeroLeftEncoder() - } - - fun zeroRightEncoder() { - io.zeroRightEncoder() - } } \ No newline at end of file diff --git a/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArmIO.kt b/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArmIO.kt index dd89b2bd..7de40498 100644 --- a/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArmIO.kt +++ b/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArmIO.kt @@ -1,4 +1,4 @@ -package com.team4099.robot2023.subsystems.TelescopingArm +package board.team4099.robot2023.subsystems.TelescopingArm interface TelescopingArmIO { } \ No newline at end of file diff --git a/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArmIOReal.kt b/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArmIOReal.kt index a386a714..f80cf52d 100644 --- a/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArmIOReal.kt +++ b/src/main/kotlin/com/team4099/robot2023/subsystems/TelescopingArm/TelescopingArmIOReal.kt @@ -1,4 +1,20 @@ package com.team4099.robot2023.subsystems.TelescopingArm -object TelescopingArmIOReal { +import board.ctre.phoenix.motorcontrol.ControlMode +import board.ctre.phoenix.motorcontrol.DemandType +import board.ctre.phoenix.motorcontrol.NeutralMode +import board.ctre.phoenix.motorcontrol.can.TalonFX +import board.ctre.phoenix.motorcontrol.can.TalonFXConfiguration +import board.team4099.lib.units.base.Length +import board.team4099.lib.units.base.amps +import board.team4099.lib.units.ctreLinearMechanismSensor +import board.team4099.lib.units.derived.ElectricalPotential +import board.team4099.lib.units.derived.inVolts +import board.team4099.lib.units.derived.volts +import board.team4099.robot2022.config.constants.Constants +import board.team4099.robot2022.config.constants.Constants.Universal.CANIVORE_NAME +import board.team4099.robot2022.config.constants.TelescopingClimberConstants + +object TelescopingArmIOReal : TelescopingClimberIO { + } \ No newline at end of file