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" |
James Kuszmaul | 68f7d27 | 2020-02-22 20:55:02 -0800 | [diff] [blame] | 5 | #include "y2020/control_loops/drivetrain/localizer.h" |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 6 | |
| 7 | using ::frc971::control_loops::drivetrain::DrivetrainLoop; |
| 8 | |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 9 | int main(int argc, char *argv[]) { |
| 10 | ::aos::InitGoogle(&argc, &argv); |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 11 | |
| 12 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 13 | aos::configuration::ReadConfig("config.json"); |
| 14 | |
| 15 | ::aos::ShmEventLoop event_loop(&config.message()); |
James Kuszmaul | 68f7d27 | 2020-02-22 20:55:02 -0800 | [diff] [blame] | 16 | ::y2020::control_loops::drivetrain::Localizer localizer( |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 17 | &event_loop, ::y2020::control_loops::drivetrain::GetDrivetrainConfig()); |
| 18 | DrivetrainLoop drivetrain( |
| 19 | ::y2020::control_loops::drivetrain::GetDrivetrainConfig(), &event_loop, |
| 20 | &localizer); |
| 21 | |
| 22 | event_loop.Run(); |
| 23 | |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 24 | return 0; |
| 25 | } |