Skip to content

Commit

Permalink
kCos
Browse files Browse the repository at this point in the history
  • Loading branch information
SachetK committed Nov 23, 2024
1 parent 7eb30b9 commit 06b422f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.arcrobotics.ftclib.controller.wpilibcontroller.ArmFeedforward
import com.arcrobotics.ftclib.hardware.motors.Motor
import com.arcrobotics.ftclib.hardware.motors.Motor.GoBILDA
import com.arcrobotics.ftclib.hardware.motors.MotorGroup
import org.firstinspires.ftc.teamcode.subsystems.arm.OpenArmSubsystem.Companion.kCos
import org.firstinspires.ftc.teamcode.utils.PIDSubsystem
import kotlin.math.PI

Expand Down Expand Up @@ -49,6 +48,9 @@ class ArmSubsystem(
override fun getMeasurement() = armAngle

companion object {
@JvmField
var kCos = 0.3

@JvmField
var kP = 0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.arcrobotics.ftclib.hardware.motors.Motor
import com.arcrobotics.ftclib.hardware.motors.Motor.GoBILDA
import com.arcrobotics.ftclib.hardware.motors.MotorGroup
import kotlin.math.PI
import kotlin.math.cos

@Config
class OpenArmSubsystem(
Expand Down Expand Up @@ -38,7 +39,7 @@ class OpenArmSubsystem(
}

fun stop() {
turnMotors.set(kCos * Math.cos(armAngle))
turnMotors.set(kCos * cos(armAngle))
}

companion object {
Expand Down

0 comments on commit 06b422f

Please sign in to comment.