add Task At Index
Insert a task at a specific index in the queue. This is useful for adding tasks that should be run at a specific point in the autonomous sequence. Note that this function immediately produces side effects, and subsequent calls will not be able to insert tasks at the same index due to the shifting of tasks.
Parameters
the index to insert the task at, starting from 0
the task to add to the run queue
Insert a task at a specific index in the queue. This is useful for adding tasks that should be run at a specific point in the autonomous sequence. Note that this function immediately produces side effects, and subsequent calls will not be able to insert tasks at the same index due to the shifting of tasks.
Parameters
the index to insert the task at, starting from 0
the code to add to the run queue to run once