Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 1 | #include "absl/flags/flag.h" |
| 2 | |
James Kuszmaul | 313e9ce | 2024-02-11 17:47:33 -0800 | [diff] [blame] | 3 | #include "aos/events/shm_event_loop.h" |
| 4 | #include "aos/init.h" |
| 5 | #include "frc971/constants/constants_sender_lib.h" |
| 6 | #include "y2024/control_loops/drivetrain/drivetrain_base.h" |
| 7 | #include "y2024/localizer/localizer.h" |
| 8 | |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 9 | ABSL_FLAG(std::string, config, "aos_config.json", |
| 10 | "Path to the config file to use."); |
James Kuszmaul | 313e9ce | 2024-02-11 17:47:33 -0800 | [diff] [blame] | 11 | |
| 12 | int main(int argc, char *argv[]) { |
| 13 | aos::InitGoogle(&argc, &argv); |
| 14 | |
| 15 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 16 | aos::configuration::ReadConfig(absl::GetFlag(FLAGS_config)); |
James Kuszmaul | 313e9ce | 2024-02-11 17:47:33 -0800 | [diff] [blame] | 17 | |
| 18 | frc971::constants::WaitForConstants<y2024::Constants>(&config.message()); |
| 19 | |
| 20 | aos::ShmEventLoop event_loop(&config.message()); |
| 21 | y2024::localizer::Localizer localizer(&event_loop); |
| 22 | |
| 23 | event_loop.Run(); |
| 24 | |
| 25 | return 0; |
| 26 | } |