-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
66 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/subsystems/arm/ArmPIDSubsystem.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.firstinspires.ftc.teamcode.subsystems.arm | ||
|
||
import com.arcrobotics.ftclib.controller.PIDController | ||
import com.arcrobotics.ftclib.hardware.motors.Motor | ||
import com.arcrobotics.ftclib.hardware.motors.MotorGroup | ||
import org.firstinspires.ftc.teamcode.utils.PIDSubsystem | ||
|
||
class ArmPIDSubsystem( | ||
armLeft: Motor, | ||
armRight: Motor | ||
) : PIDSubsystem( | ||
PIDController( | ||
0.0, | ||
0.0, | ||
0.0, | ||
) | ||
) { | ||
private val turnMotors = MotorGroup(armLeft, armRight) | ||
|
||
init { | ||
armLeft.inverted = true | ||
turnMotors.resetEncoder() | ||
turnMotors.setZeroPowerBehavior(Motor.ZeroPowerBehavior.BRAKE) | ||
} | ||
|
||
override fun useOutput(output: Double, setpoint: Double) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun getMeasurement(): Double { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters