mirror of
https://github.com/Team4388/2025RidgeScape.git
synced 2026-06-08 16:28:04 -06:00
Updated PID and Motor constants
Added PID to constants Used michaels candevice type for motor
This commit is contained in:
@@ -328,9 +328,8 @@ public final class Constants {
|
||||
}
|
||||
|
||||
public static final class ElevatorConstants {
|
||||
public static final class IDs {
|
||||
public static final int ELEVATOR_ID = 420;
|
||||
}
|
||||
public static final CanDevice ELEVATOR_ID = new CanDevice("Elevator", 724);
|
||||
|
||||
public static final double LEVEL_1 = 123;
|
||||
public static final double LEVEL_2 = 123;
|
||||
public static final double ELEVATOR_MAX_HEIGHT = 123;
|
||||
@@ -338,6 +337,9 @@ public final class Constants {
|
||||
public static final double ELEVATOR_SPEED_DOWN = -123;
|
||||
|
||||
|
||||
|
||||
public static final Slot0Configs ELEVATOR_PID = new Slot0Configs()
|
||||
.withKP(0)
|
||||
.withKI(0)
|
||||
.withKD(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class RobotMap {
|
||||
);
|
||||
|
||||
/* Elevator Subsystem */
|
||||
public final TalonFX elevator = new TalonFX(ElevatorConstants.IDs.ELEVATOR_ID);
|
||||
public final TalonFX elevator = new TalonFX(ElevatorConstants.ELEVATOR_ID.id);
|
||||
void configureDriveMotorControllers() {}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,13 +19,10 @@ public class Elevator extends SubsystemBase {
|
||||
public Elevator(TalonFX elevatorTalonFX) {
|
||||
elevatorMotor = elevatorTalonFX;
|
||||
|
||||
elevatorMotor.setNeutralMode(NeutralModeValue.Coast);
|
||||
elevatorMotor.setNeutralMode(NeutralModeValue.Brake);
|
||||
|
||||
var PIDConfigs = new Slot0Configs();
|
||||
PIDConfigs.kP = 0;
|
||||
PIDConfigs.kI = 0;
|
||||
PIDConfigs.kD = 0;
|
||||
elevatorMotor.getConfigurator().apply(PIDConfigs);
|
||||
|
||||
elevatorMotor.getConfigurator().apply(ElevatorConstants.ELEVATOR_PID);
|
||||
}
|
||||
|
||||
//PID methods
|
||||
|
||||
Reference in New Issue
Block a user