mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-08 16:18:02 -06:00
Make Wrist move with Arm
This commit is contained in:
@@ -113,7 +113,7 @@ public class Arm extends Subsystem implements ControlLoopable
|
||||
private boolean isFinished;
|
||||
private ArmControlMode armControlMode = ArmControlMode.MOTION_MAGIC;
|
||||
private double targetPositionInchesPID = 0;
|
||||
private double targetPositionInchesMM = 0;
|
||||
public static double targetPositionInchesMM = 0;
|
||||
private boolean firstMpPoint;
|
||||
private double joystickInchesPerMs = JOYSTICK_INCHES_PER_MS_LO;
|
||||
private double p = 0;
|
||||
@@ -334,6 +334,8 @@ public class Arm extends Subsystem implements ControlLoopable
|
||||
double deltaPosition = joystickPosition * joystickInchesPerMs;
|
||||
targetPositionInchesMM = targetPositionInchesMM + deltaPosition;
|
||||
updatePositionMM(targetPositionInchesMM);
|
||||
Wrist.targetPositionInchesPID = targetPositionInchesPID - (deltaPosition/3);
|
||||
Robot.wrist.updatePositionPID(Wrist.targetPositionInchesPID);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class Wrist extends Subsystem implements ControlLoopable
|
||||
public static final double AUTO_ZERO_MOTOR_CURRENT = 4.0;
|
||||
private boolean isFinished;
|
||||
private WristControlMode wristControlMode = WristControlMode.JOYSTICK_PID;
|
||||
private double targetPositionInchesPID = 0;
|
||||
public static double targetPositionInchesPID = 0;
|
||||
private boolean firstMpPoint;
|
||||
private double joystickInchesPerMs = JOYSTICK_INCHES_PER_MS_LO;
|
||||
private double p = 0;
|
||||
|
||||
Reference in New Issue
Block a user