Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,16 @@ public CANMotorControllerInfo getIntakeDeployMotor() {
new TalonFxMotorControllerOutputConfig()
.withSupplyCurrentLimit(Amps.of(15), Amps.of(30), Seconds.of(1))
.withStatorCurrentLimit(Amps.of(50))
.withRemoteCanCoderFeedback(getIntakeDeployAbsoluteEncoder().channel));
.withRemoteCanCoderFeedback(getIntakeDeployAbsoluteEncoder().channel)
.withInversionType(CANMotorControllerOutputConfig.InversionType.Inverted));
}

@Override
public boolean isIntakeDeployAbsoluteEncoderReady() { return true; }

@Override
public DeviceInfo getIntakeDeployAbsoluteEncoder() {
return new DeviceInfo("IntakeDeployAbsoluteEncoderReady", CANBusId.Canivore, 58);
return new DeviceInfo("IntakeDeployAbsoluteEncoderReady", CANBusId.Canivore, 58, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ public IntakeDeploySubsystem(XCANMotorController.XCANMotorControllerFactory xcan
this.intakeDeployEncoder = null;
}

this.retractedPosition = propertyFactory.createPersistentProperty("RetractedPosition", -10.0);
this.extendedPosition = propertyFactory.createPersistentProperty("ExtendedPosition", -145.0);
this.retractedPosition = propertyFactory.createPersistentProperty("RetractedPosition", 10.0);
this.extendedPosition = propertyFactory.createPersistentProperty("ExtendedPosition", 145.0);

this.manualControlPower = propertyFactory.createPersistentProperty("ManualControlPower", 0.2);

this.mechanismDegreePerMotorRotation = propertyFactory.createPersistentProperty("MechanismDegreePerMotorRotation", 360);
this.mechanismTargetRotation = propertyFactory.createPersistentProperty("MechanismTargetRotation", Degrees.of(-10));
this.mechanismTargetRotation = propertyFactory.createPersistentProperty("MechanismTargetRotation", Degrees.of(10));

this.maxPidVelocity = propertyFactory.createPersistentProperty("PidMaxMotorVelocity-RotationsPerSecond", 200);
this.maxPidAcceleration = propertyFactory.createPersistentProperty("PidMaxMotorAcceleration-RotationsPerSecondPerSecond", 200);
Expand All @@ -103,7 +103,7 @@ public IntakeDeploySubsystem(XCANMotorController.XCANMotorControllerFactory xcan
@Override
public Angle getCurrentValue() {
if (intakeDeployEncoder != null) {
return intakeDeployEncoder.getAbsolutePosition();
return intakeDeployEncoder.getAbsolutePosition().times(-1);
}

return Degrees.zero();
Expand Down
Loading