blob: 5049b0f34742de9cb45d8d09d41835056cf14ce8 [file] [log] [blame]
Niko Sohmers3860f8a2024-01-12 21:05:19 -08001#include <cstdio>
2
3#include "aos/events/shm_event_loop.h"
4#include "aos/init.h"
James Kuszmaulb5f11832024-03-15 22:30:59 -07005#include "frc971/constants/constants_sender_lib.h"
Niko Sohmers3860f8a2024-01-12 21:05:19 -08006#include "y2024/autonomous/autonomous_actor.h"
7
8int main(int argc, char *argv[]) {
9 ::aos::InitGoogle(&argc, &argv);
10
11 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
12 aos::configuration::ReadConfig("aos_config.json");
13
James Kuszmaulb5f11832024-03-15 22:30:59 -070014 frc971::constants::WaitForConstants<y2024::Constants>(&config.message());
15
16 ::aos::ShmEventLoop constant_fetcher_event_loop(&config.message());
17 frc971::constants::ConstantsFetcher<y2024::Constants> constants_fetcher(
18 &constant_fetcher_event_loop);
19
20 const y2024::Constants *robot_constants = &constants_fetcher.constants();
21
Niko Sohmers3860f8a2024-01-12 21:05:19 -080022 ::aos::ShmEventLoop event_loop(&config.message());
James Kuszmaulb5f11832024-03-15 22:30:59 -070023 ::y2024::autonomous::AutonomousActor autonomous(&event_loop, robot_constants);
Niko Sohmers3860f8a2024-01-12 21:05:19 -080024
25 event_loop.Run();
26
27 return 0;
28}