diff --git a/src/main/java/org/carlmontrobotics/Constants.java b/src/main/java/org/carlmontrobotics/Constants.java index 344eb23e..58e5e875 100644 --- a/src/main/java/org/carlmontrobotics/Constants.java +++ b/src/main/java/org/carlmontrobotics/Constants.java @@ -26,19 +26,14 @@ public static final class Drivetrain { public static final class Arm { - //ports -//config for motors (inverted, encoder offset, etc) -//goal positions -//feedforward, pid, trapezoid constants -//Boundaries (arm cannot go beyond certain angles) -//Controller buttons should go in OI not Arm + //Motor port public static final int ARM_MOTOR_PORT_MASTER = 7; public final static int ARM_MOTOR_PORT_FOLLOWER = 8; //Config for motors - public static final boolean MOTOR_INVERTED_1 = true; //Todo: find all these (they are definetely wrong) - public static final boolean MOTOR_INVERTED_2 = false; + public static final boolean MOTOR_INVERTED_MASTER = true; //Todo: find all these (they are definetely wrong) + public static final boolean MOTOR_INVERTED_FOLLOWER = false; public static final double ROTATION_TO_RAD = 2 * Math.PI; public static final boolean ENCODER_INVERTED = false; public static final double ARM_TELEOP_MAX_GOAL_DIFF_FROM_CURRENT_RAD = 0; //placeholder diff --git a/src/main/java/org/carlmontrobotics/subsystems/Arm.java b/src/main/java/org/carlmontrobotics/subsystems/Arm.java index 9c3ba105..a48e2c1d 100644 --- a/src/main/java/org/carlmontrobotics/subsystems/Arm.java +++ b/src/main/java/org/carlmontrobotics/subsystems/Arm.java @@ -71,9 +71,9 @@ public class Arm extends SubsystemBase { public Arm() { // weird math stuff - armMotorMaster.setInverted(MOTOR_INVERTED_1); + armMotorMaster.setInverted(MOTOR_INVERTED_MASTER); armMotorMaster.setIdleMode(IdleMode.kBrake); - armMotorFollower.setInverted(MOTOR_INVERTED_2); + armMotorFollower.setInverted(MOTOR_INVERTED_FOLLOWER); armMotorFollower.setIdleMode(IdleMode.kBrake); armMasterEncoder.setPositionConversionFactor(ROTATION_TO_RAD); @@ -192,7 +192,7 @@ public void resetGoal() { } public void driveMotor(Measure volts) { armMotorMaster.setVoltage(volts.in(Volts)); - armMotorFollower.setVoltage(volts.in(Volts)); + } public void logMotor(SysIdRoutineLog log) { log.motor("armMotorMaster")