Brian Silverman | 17f503e | 2015-08-02 18:17:18 -0700 | [diff] [blame] | 1 | #include "aos/common/controls/replay_control_loop.h" |
| 2 | #include "aos/linux_code/init.h" |
| 3 | |
| 4 | #include "y2014/control_loops/drivetrain/drivetrain.q.h" |
| 5 | |
| 6 | // Reads one or more log files and sends out all the queue messages (in the |
| 7 | // correct order and at the correct time) to feed a "live" drivetrain process. |
| 8 | |
| 9 | int main(int argc, char **argv) { |
| 10 | if (argc <= 1) { |
| 11 | fprintf(stderr, "Need at least one file to replay!\n"); |
| 12 | return EXIT_FAILURE; |
| 13 | } |
| 14 | |
| 15 | ::aos::InitNRT(); |
| 16 | |
| 17 | ::aos::controls::ControlLoopReplayer<::frc971::control_loops::DrivetrainQueue> |
| 18 | replayer(&::frc971::control_loops::drivetrain_queue, "drivetrain"); |
| 19 | for (int i = 1; i < argc; ++i) { |
| 20 | replayer.ProcessFile(argv[i]); |
| 21 | } |
| 22 | |
| 23 | ::aos::Cleanup(); |
| 24 | } |