wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.05k stars 612 forks source link

SwerveBot example crashes on encoder pin overallocation #3089

Closed calcmogul closed 3 years ago

calcmogul commented 3 years ago

The encoder pins are hardcoded in the SwerveModule class currently, which means the example project crashes with a HAL overallocation error if more than one SwerveModule is instantiated.

The SwerveModule class in SwerveBot example should take encoder pins in constructor. Note that SwerveModule already takes the motor ports in the constructor.

sciencewhiz commented 3 years ago

https://www.chiefdelphi.com/t/using-wpilibj-java-swerve-example-diojni-error/391031

sciencewhiz commented 3 years ago

https://www.chiefdelphi.com/t/error-1-unhandled-exception-edu-wpi-first-hal-util-uncleanstatusexception-code-1029-hal-resource-already-allocated-frc-robot-model-startalonsrx-init-startalonsrx-java-34/379796/14?u=joe_ross