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