Legality of threading code

i dont have physical access to my robot, and wont for a couple days, and i was wondering if you have multiple threads in your code, can the threads illegally bypass the shutoff for auton and driver control? If so, is there a way to make threading legal?

For “is ___ legal” type questions, please look at the game manual. there is no rule saying that using multiple threads is illegal, therefore it is legal. Many teams use multithreading to have multiple tasks (PID, odometry, etc) running at the same time

Using multithreading to bypass the auton shutoff, however, would definitely be illegal since it would gain you a competitive advantage

7 Likes

I was wondering if multiple threads ignore the auton callback thus making it against the rules, Not if multiple threads are against the rules, and if they do ignore the call back, is there a way to make them stop when auton/driver control is ended?

unless you intentionally mess with the competition template code, your threads will be stopped when auton ends.

you might want to look at this topic to troubleshoot any issues with tasks transitioning from auton to driver

3 Likes

It is not possible to use threads (or any other method within reason) to bypass the autonomous cutoff. The disabled robot mode is enforced in the brains firmware and cannot be bypassed without modifying that firmware, which of course would be illegal.

Edit: Just to be clear, it is perfectly legal to have threads/tasks that continue to run past the lifetime of the autonomous mode; there is no rule against this.

10 Likes