blob: d74f0d0a1dcef5b10be9042e4018adcd5db03f1c [file] [log] [blame]
James (Peilun) Lia70e5752024-09-18 20:43:00 -07001#include "absl/flags/flag.h"
2
3#include "aos/configuration.h"
4#include "aos/events/shm_event_loop.h"
5#include "aos/init.h"
6#include "aos/json_to_flatbuffer.h"
7#include "frc971/constants/constants_sender_lib.h"
8#include "y2024_bot3/constants/constants_generated.h"
9#include "y2024_bot3/constants/constants_list_generated.h"
10
11ABSL_FLAG(std::string, config, "aos_config.json", "Path to the AOS config.");
12ABSL_FLAG(std::string, constants_path, "constants.json",
13 "Path to the constant file");
14
15int main(int argc, char **argv) {
16 aos::InitGoogle(&argc, &argv);
17 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
18 aos::configuration::ReadConfig(absl::GetFlag(FLAGS_config));
19 aos::ShmEventLoop event_loop(&config.message());
20 frc971::constants::ConstantSender<y2024_bot3::Constants,
21 y2024_bot3::ConstantsList>
22 constants_sender(&event_loop, absl::GetFlag(FLAGS_constants_path));
23 // Don't need to call Run().
24 return 0;
25}