CommandScheduler.getInstance().cancelAll();
}));
- // sysId per-module characterization
- controller.get(PS5Button.TRIANGLE).onTrue(new SysIdPerModuleCommand(getDrivetrain()));
+ // // sysId per-module characterization
+ // controller.get(PS5Button.TRIANGLE).onTrue(new SysIdPerModuleCommand(getDrivetrain()));
// Reverse motors
if (intake != null && spindexer != null) {
}
if (isOpenLoop) {
double percentOutput = desiredState.speedMetersPerSecond / DriveConstants.MAX_SPEED;
- driveMotor.setControl(new DutyCycleOut(percentOutput).withEnableFOC(true));
+ driveMotor.setControl(new DutyCycleOut(percentOutput));
} else {
double velocity = desiredState.speedMetersPerSecond/DriveConstants.WHEEL_RADIUS/2/Math.PI*DriveConstants.DRIVE_GEAR_RATIO;
if (!Constants.DISABLE_LOGGING) {
driveMotor.setControl(
velocityRequest
.withVelocity(velocity)
- .withFeedForward(feedforward)
- .withEnableFOC(true));
+ .withFeedForward(feedforward));
}
}
if(desiredState == null){
return;
}
- angleMotor.setControl(new PositionDutyCycle(desiredState.angle.getRotations()*DriveConstants.MODULE_CONSTANTS.angleGearRatio).withEnableFOC(true));
+ angleMotor.setControl(new PositionDutyCycle(desiredState.angle.getRotations()*DriveConstants.MODULE_CONSTANTS.angleGearRatio));
}
public void setDriveVoltage(Voltage voltage){
- driveMotor.setControl(new VoltageOut(voltage.baseUnitMagnitude()).withEnableFOC(true));
+ driveMotor.setControl(new VoltageOut(voltage.baseUnitMagnitude()));
}
public void setAngle(Rotation2d angle){
- angleMotor.setControl(new PositionDutyCycle(angle.getRotations()*DriveConstants.MODULE_CONSTANTS.angleGearRatio).withEnableFOC(true));
+ angleMotor.setControl(new PositionDutyCycle(angle.getRotations()*DriveConstants.MODULE_CONSTANTS.angleGearRatio));
}
public void setOptimize(boolean enable) {