Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changed filtering function from
const PathPlannerAuto* const
->const PathPlannerAuto&
: Easier syntax, reference act like varible instead of pointerconst_cast<>
can still change the const-ness ofPathPlannerAuto&
which allows them to edit directly (I despise this feature, however there is no copy constructor forPathPlannerAuto
due tounique_ptr
)Replace
dynamic_cast<>
tostatic_cast<>
since we know relationship at compile timeSet
filter
as first parameter anddefaultAutoName
as second (which is defaulted), which prevents confusion as to why there is an empty string input (in user code)Separated
buildAutoChooser
intobuildAutoChooser
,buildAutoChooserFilter
, andbuildAutoChooserFilterPath
for different degrees of concern and to mirror java version more neatly (allows people to change from both languages)Updated function descriptions
Degrees of concern for
buildAutoChooser
SendableChooser
of all PathPlannerAutos just needs to worry aboutbuildAutoChooser
filter
out some PathPlannerAutos just needs to worry aboutbuildAutoChooserFilter
filter
out some PathPlannerAutos based on filepath (std::filesystem::path
libary) needs to worry aboutbuildAutoChooserFilterPath
I know I have made a lot of changes to this feature however I just want it to be right before backward compatibility requirements happen. I am probably not going to edit this any further as it performs all the roles it need to Java version while maintaining C++ style.
Good luck rolling out for the 2025 season btw👍