Philipp Schrader | 790cb54 | 2023-07-05 21:06:52 -0700 | [diff] [blame^] | 1 | #include "gflags/gflags.h" |
| 2 | #include "glog/logging.h" |
| 3 | |
James Kuszmaul | d67f6d2 | 2023-02-05 17:37:25 -0800 | [diff] [blame] | 4 | #include "aos/configuration.h" |
| 5 | #include "aos/events/shm_event_loop.h" |
| 6 | #include "aos/init.h" |
| 7 | #include "aos/json_to_flatbuffer.h" |
| 8 | #include "frc971/constants/constants_sender_lib.h" |
James Kuszmaul | d67f6d2 | 2023-02-05 17:37:25 -0800 | [diff] [blame] | 9 | #include "y2023/constants/constants_generated.h" |
| 10 | #include "y2023/constants/constants_list_generated.h" |
| 11 | |
| 12 | DEFINE_string(config, "aos_config.json", "Path to the AOS config."); |
| 13 | DEFINE_string(constants_path, "constants.json", "Path to the constant file"); |
| 14 | |
| 15 | int main(int argc, char **argv) { |
| 16 | aos::InitGoogle(&argc, &argv); |
| 17 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 18 | aos::configuration::ReadConfig(FLAGS_config); |
| 19 | aos::ShmEventLoop event_loop(&config.message()); |
| 20 | frc971::constants::ConstantSender<y2023::Constants, y2023::ConstantsList> |
| 21 | constants_sender(&event_loop, FLAGS_constants_path); |
| 22 | // Don't need to call Run(). |
| 23 | return 0; |
| 24 | } |