James Kuszmaul | 93825a0 | 2022-02-13 16:50:33 -0800 | [diff] [blame] | 1 | #include "aos/events/shm_event_loop.h" |
| 2 | #include "aos/init.h" |
James Kuszmaul | 93825a0 | 2022-02-13 16:50:33 -0800 | [diff] [blame] | 3 | #include "y2022/control_loops/drivetrain/drivetrain_base.h" |
Philipp Schrader | 790cb54 | 2023-07-05 21:06:52 -0700 | [diff] [blame^] | 4 | #include "y2022/localizer/localizer.h" |
James Kuszmaul | 93825a0 | 2022-02-13 16:50:33 -0800 | [diff] [blame] | 5 | |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 6 | DEFINE_string(config, "aos_config.json", "Path to the config file to use."); |
James Kuszmaul | 93825a0 | 2022-02-13 16:50:33 -0800 | [diff] [blame] | 7 | |
| 8 | int main(int argc, char *argv[]) { |
| 9 | aos::InitGoogle(&argc, &argv); |
| 10 | |
| 11 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 12 | aos::configuration::ReadConfig(FLAGS_config); |
| 13 | |
| 14 | aos::ShmEventLoop event_loop(&config.message()); |
| 15 | frc971::controls::EventLoopLocalizer localizer( |
| 16 | &event_loop, ::y2022::control_loops::drivetrain::GetDrivetrainConfig()); |
| 17 | |
| 18 | event_loop.Run(); |
| 19 | |
| 20 | return 0; |
| 21 | } |