Programming resources for FIRST Robotics team 1318
Macro operations work differently than Analog and Digital Operations, but are very important when creating the ButtonMap for the driver. Macros are groupings of different ControlTasks that need to happen in a certain order and with certain conditions between the various operations. This is typically done by defining a set of individual “tasks” that perform one operation until it has completed, and then composing them together using different types of logic. One example of a macro from 2019 is the climb macro, which moved the robot forwards, engaged the arms, rotated the cam, drove forward, and finally lifted the elevator and reset the arms and cam. Another example from 2019 is the vision-based alignment and approach of the rocket and cargo ship.
Understanding Existing Tasks can help explain the way that common, pre-existing tasks can be joined together to create macros that can accomplish complex tasks.
To create your own Macros, refer to the Adding Macros page to guide you.