Skip to content

No Voltage Compensation configured on non-swerve mechanisms #214

@markpete

Description

@markpete

Files: Flywheels.java, Feeder.java, Spindexer.java, IntakeRollers.java

Root cause: None of the non-swerve mechanisms enable VoltageCompensation or configure a VoltageCompensationConfigs entry. During brownout conditions, the output voltage delivered to the motors varies dramatically. Without voltage compensation, the velocity PID will fight harder to reach setpoint during sags, running higher than desired current exactly when the battery can least support it.

Suggested fix (example for Feeder):

// Add to feederConfig()
talonFXConfiguration.Voltage.PeakForwardVoltage  = 11.5; // leave headroom below 12 V
talonFXConfiguration.Voltage.PeakReverseVoltage  = -11.5;

This caps the maximum voltage request so the motor won't try to overdrive when battery voltage is good.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions