mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
finished dynamic limits (NOTE: fix actual soft limits)
This commit is contained in:
@@ -120,8 +120,11 @@ public class Arm extends SubsystemBase {
|
||||
}
|
||||
|
||||
public void runPivotTele(double pivot, double tele) {
|
||||
// TODO: tele has to go through some kind of transformation
|
||||
if (pivot > 0 || tele < 0 || checkLimits(tele, getArmRotation())) {
|
||||
double abs_pivot = Math.toRadians(getArmRotation() - 135);
|
||||
double abs_tele = (getArmLength() - ArmConstants.TELE_REVERSE_SOFT_LIMIT) /
|
||||
(ArmConstants.TELE_FORWARD_SOFT_LIMIT - ArmConstants.TELE_REVERSE_SOFT_LIMIT);
|
||||
|
||||
if (pivot > 0 || tele < 0 || checkLimits(abs_tele, abs_pivot)) {
|
||||
setRotVel(pivot);
|
||||
setTeleVel(tele);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user