Austin Schuh | e8153ae | 2023-01-28 11:15:58 -0800 | [diff] [blame^] | 1 | #include "aos/events/shm_event_loop.h" |
| 2 | #include "aos/init.h" |
| 3 | #include "aos/realtime.h" |
| 4 | #include "frc971/imu_reader/imu.h" |
| 5 | |
| 6 | DEFINE_string(config, "aos_config.json", "Path to the config file to use."); |
| 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 | // TODO(austin): Set the ratio... |
| 16 | frc971::imu::Imu imu(&event_loop, 1.0); |
| 17 | |
| 18 | event_loop.SetRuntimeAffinity(aos::MakeCpusetFromCpus({0})); |
| 19 | event_loop.SetRuntimeRealtimePriority(55); |
| 20 | |
| 21 | event_loop.Run(); |
| 22 | |
| 23 | return 0; |
| 24 | } |