Austin Schuh | 4701741 | 2013-03-10 11:50:46 -0700 | [diff] [blame] | 1 | #include "stdio.h" |
| 2 | |
| 3 | #include "aos/aos_core.h" |
| 4 | #include "aos/common/control_loop/Timing.h" |
| 5 | #include "aos/common/time.h" |
| 6 | #include "frc971/autonomous/auto.q.h" |
| 7 | #include "frc971/autonomous/auto.h" |
| 8 | |
| 9 | using ::aos::time::Time; |
| 10 | |
| 11 | int main(int /*argc*/, char * /*argv*/[]) { |
| 12 | ::aos::Init(); |
| 13 | |
| 14 | ::frc971::autonomous::autonomous.FetchLatest(); |
| 15 | while (!::frc971::autonomous::autonomous.get()) { |
| 16 | ::frc971::autonomous::autonomous.FetchNextBlocking(); |
| 17 | } |
| 18 | |
| 19 | while (true) { |
| 20 | while (!::frc971::autonomous::autonomous->run_auto) { |
| 21 | ::frc971::autonomous::autonomous.FetchNextBlocking(); |
| 22 | } |
| 23 | ::frc971::autonomous::HandleAuto(); |
| 24 | |
| 25 | while (::frc971::autonomous::autonomous->run_auto) { |
| 26 | ::frc971::autonomous::autonomous.FetchNextBlocking(); |
| 27 | } |
| 28 | } |
| 29 | ::aos::Cleanup(); |
| 30 | return 0; |
| 31 | } |
| 32 | |