James Kuszmaul | 04a343c | 2023-02-20 16:38:22 -0800 | [diff] [blame] | 1 | #include "aos/events/shm_event_loop.h" |
| 2 | #include "aos/init.h" |
| 3 | #include "frc971/constants/constants_sender_lib.h" |
| 4 | #include "y2023/control_loops/drivetrain/drivetrain_base.h" |
| 5 | #include "y2023/localizer/localizer.h" |
| 6 | |
| 7 | DEFINE_string(config, "aos_config.json", "Path to the config file to use."); |
| 8 | |
| 9 | int main(int argc, char *argv[]) { |
| 10 | aos::InitGoogle(&argc, &argv); |
| 11 | |
| 12 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 13 | aos::configuration::ReadConfig(FLAGS_config); |
| 14 | |
| 15 | frc971::constants::WaitForConstants<y2023::Constants>(&config.message()); |
| 16 | |
| 17 | aos::ShmEventLoop event_loop(&config.message()); |
| 18 | y2023::localizer::Localizer localizer( |
| 19 | &event_loop, ::y2023::control_loops::drivetrain::GetDrivetrainConfig()); |
| 20 | |
| 21 | event_loop.Run(); |
| 22 | |
| 23 | return 0; |
| 24 | } |