Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonCoal committed Jan 10, 2024
1 parent dc538df commit 3a3aa6e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team4099.robot2023.subsystems.TelescopingArm
package board.team4099.robot2023.subsystems.TelescopingArm

interface TelescopingArmIO {
}
Original file line number Diff line number Diff line change
@@ -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 {

}

0 comments on commit 3a3aa6e

Please sign in to comment.