blob: 1da4ac9d33a13cf4086f670101ac0280197e1056 [file] [log] [blame]
Austin Schuh99f7c6a2024-06-25 22:07:44 -07001#include "absl/flags/flag.h"
2
James Kuszmaul313e9ce2024-02-11 17:47:33 -08003#include "aos/events/shm_event_loop.h"
4#include "aos/init.h"
5#include "frc971/constants/constants_sender_lib.h"
6#include "y2024/control_loops/drivetrain/drivetrain_base.h"
7#include "y2024/localizer/localizer.h"
8
Austin Schuh99f7c6a2024-06-25 22:07:44 -07009ABSL_FLAG(std::string, config, "aos_config.json",
10 "Path to the config file to use.");
James Kuszmaul313e9ce2024-02-11 17:47:33 -080011
12int main(int argc, char *argv[]) {
13 aos::InitGoogle(&argc, &argv);
14
15 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
Austin Schuh99f7c6a2024-06-25 22:07:44 -070016 aos::configuration::ReadConfig(absl::GetFlag(FLAGS_config));
James Kuszmaul313e9ce2024-02-11 17:47:33 -080017
18 frc971::constants::WaitForConstants<y2024::Constants>(&config.message());
19
20 aos::ShmEventLoop event_loop(&config.message());
21 y2024::localizer::Localizer localizer(&event_loop);
22
23 event_loop.Run();
24
25 return 0;
26}