KickFSM and ChipFSM have identical implementation with the minor difference of some naming and AutoChipOrKickMode. We should combine both into a single implementation.
Some ideas for how we can achieve this:
Update the control params to take in either a chip direction + chip distance or a kick direction + kick speed. Based on which is passed, we could determine the value of AutoChipOrKickMode. This could be achieved using unions (look into AutoChipOrKickMode's implementation. This is more of a classic C approach), or a C++ std::variant.
Description of the task
KickFSM
andChipFSM
have identical implementation with the minor difference of some naming andAutoChipOrKickMode
. We should combine both into a single implementation.Some ideas for how we can achieve this:
AutoChipOrKickMode
. This could be achieved usingunion
s (look intoAutoChipOrKickMode
's implementation. This is more of a classic C approach), or a C++std::variant
.Depending on the results, consider updating the
KickTactic
andChipTactic
as well.Note that the names of these FSMs may be changed once the on going new offense implementation is complete.
Acceptance criteria
kick_fsm_test.cpp
andchip_fsm_test.cpp