Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 1 | #include "aos/events/shm_event_loop.h" |
| 2 | #include "aos/init.h" |
| 3 | #include "frc971/control_loops/drivetrain/drivetrain.h" |
| 4 | #include "y2020/control_loops/drivetrain/drivetrain_base.h" |
| 5 | |
| 6 | using ::frc971::control_loops::drivetrain::DrivetrainLoop; |
| 7 | |
| 8 | int main() { |
James Kuszmaul | ad8a808 | 2020-02-14 21:21:58 -0800 | [diff] [blame] | 9 | ::aos::InitNRT(); |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 10 | |
| 11 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 12 | aos::configuration::ReadConfig("config.json"); |
| 13 | |
| 14 | ::aos::ShmEventLoop event_loop(&config.message()); |
| 15 | ::frc971::control_loops::drivetrain::DeadReckonEkf localizer( |
| 16 | &event_loop, ::y2020::control_loops::drivetrain::GetDrivetrainConfig()); |
| 17 | DrivetrainLoop drivetrain( |
| 18 | ::y2020::control_loops::drivetrain::GetDrivetrainConfig(), &event_loop, |
| 19 | &localizer); |
| 20 | |
| 21 | event_loop.Run(); |
| 22 | |
| 23 | ::aos::Cleanup(); |
| 24 | return 0; |
| 25 | } |