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" |
James Kuszmaul | 41c6815 | 2023-02-23 14:54:59 -0800 | [diff] [blame^] | 5 | #include "y2023/constants.h" |
Austin Schuh | e8153ae | 2023-01-28 11:15:58 -0800 | [diff] [blame] | 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 | aos::ShmEventLoop event_loop(&config.message()); |
James Kuszmaul | 41c6815 | 2023-02-23 14:54:59 -0800 | [diff] [blame^] | 16 | frc971::imu::Imu imu(&event_loop, |
| 17 | y2023::constants::Values::DrivetrainEncoderToMeters(1)); |
Austin Schuh | e8153ae | 2023-01-28 11:15:58 -0800 | [diff] [blame] | 18 | |
| 19 | event_loop.SetRuntimeAffinity(aos::MakeCpusetFromCpus({0})); |
| 20 | event_loop.SetRuntimeRealtimePriority(55); |
| 21 | |
| 22 | event_loop.Run(); |
| 23 | |
| 24 | return 0; |
| 25 | } |