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