mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
There were 3 cases failing before. 1. An OpModeRobot with no annotation. 2. An OpModeRobot with an annotation but a parameterless constructor. 3. An OpMode with a UserControls constructor This PR solves both of these issues. The first one is solved by adding the null check before setting the user controls instance. That one will never have an opmode instance. The second one is solved by falling back to a parameterless constructor if one with a parameter is not found. The 3rd one is solved by using the annotation type rather than the instance for constructor lookup. Also fixes ExpansionHubSample's missing annotations.
13 KiB
13 KiB