Updated Follower to use PedroConstants

This commit is contained in:
2024-12-27 02:00:27 -08:00
parent 349ba28dc1
commit e85c503b5f
2 changed files with 12 additions and 11 deletions

View File

@ -1,5 +1,9 @@
package org.firstinspires.ftc.teamcode.pedroPathing.follower;
import static org.firstinspires.ftc.teamcode.PedroConstants.BACK_LEFT_MOTOR_DIRECTION;
import static org.firstinspires.ftc.teamcode.PedroConstants.BACK_RIGHT_MOTOR_DIRECTION;
import static org.firstinspires.ftc.teamcode.PedroConstants.FRONT_LEFT_MOTOR_DIRECTION;
import static org.firstinspires.ftc.teamcode.PedroConstants.FRONT_RIGHT_MOTOR_DIRECTION;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.drivePIDFFeedForward;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.drivePIDFSwitch;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.forwardZeroPowerAcceleration;
@ -10,10 +14,6 @@ import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstan
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftRearMotorName;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightFrontMotorName;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightRearMotorName;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorDirection;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftRearMotorDirection;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightFrontMotorDirection;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightRearMotorDirection;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryDrivePIDFFeedForward;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryHeadingPIDFFeedForward;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryTranslationalPIDFFeedForward;
@ -159,10 +159,10 @@ public class Follower {
* @param hardwareMap HardwareMap required
* @param localizer the localizer you wish to use
*/
public Follower(HardwareMap hardwareMap, Localizer localizer) {
this.hardwareMap = hardwareMap;
initialize(localizer);
}
// public Follower(HardwareMap hardwareMap, Localizer localizer) {
// this.hardwareMap = hardwareMap;
// initialize(localizer);
// }
/**
* This initializes the follower.

View File

@ -3,6 +3,7 @@ package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
import static org.firstinspires.ftc.teamcode.PedroConstants.*;
import com.acmerobotics.dashboard.config.Config;
import com.qualcomm.robotcore.hardware.DcMotorSimple;
import org.firstinspires.ftc.teamcode.pedroPathing.util.CustomFilteredPIDFCoefficients;
import org.firstinspires.ftc.teamcode.pedroPathing.util.CustomPIDFCoefficients;
@ -30,10 +31,10 @@ public class FollowerConstants {
public static String rightFrontMotorName = FRONT_RIGHT_MOTOR;
public static String rightRearMotorName = BACK_RIGHT_MOTOR;
public static DcMotorSimple.Direction leftFrontMotorDirection = LEFT_FRONT_MOTOR_DIRECTION;
public static DcMotorSimple.Direction leftFrontMotorDirection = FRONT_RIGHT_MOTOR_DIRECTION;
public static DcMotorSimple.Direction rightFrontMotorDirection = FRONT_RIGHT_MOTOR_DIRECTION;
public static DcMotorSimple.Direction leftRearMotorDirection = REAR_LEFT_MOTOR_DIRECTION;
public static DcMotorSimple.Direction rightRearMotorDirection = REAR_RIGHT_MOTOR_DIRECTION;
public static DcMotorSimple.Direction leftRearMotorDirection = BACK_LEFT_MOTOR_DIRECTION;
public static DcMotorSimple.Direction rightRearMotorDirection = BACK_RIGHT_MOTOR_DIRECTION;
// This section is for setting the actual drive vector for the front left wheel, if the robot
// is facing a heading of 0 radians with the wheel centered at (0,0)