FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Framework - Periodic tasks during (Independent) Autonomous?

Probably a simple answer, but assume I'm:

  • using the Advanced Framework
  • using Independent Autonomous - the simple one, eh?
  • Have my periodic tasks doing stuff - traction control and camera tracking

Can I actually count on the periodic tasks running during Independent autonomous?   

My confusion comes in that the Autonomous independent vi seems to occur solely down in the begin.vi.   Still hard to get a mental grasp on this dataflow stuff at times...

(I'm counting on passing data via Global variables - such as "desired left side speed" to my traction control periodic task.   That periodic task will than jam out PWM values to the motors appropriately.)

Thanks!

0 Kudos
Message 1 of 2
(5,526 Views)

Yes, periodic tasks always runs. The autonomous independent isn't run in Begin, rather a reference is saved. That reference is used deeper in the framework to start and stop autonomous independent whenever the robot enters and leaves autonomous.

Your method of doing control loops and motor outputs in the periodic tasks and using global variables to communicate is exactly what we've been doing.

0 Kudos
Message 2 of 2
(2,496 Views)