Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 1 | #include "absl/flags/flag.h" |
| 2 | |
James Kuszmaul | 77d536c | 2023-02-11 17:30:59 -0800 | [diff] [blame] | 3 | #include "aos/events/shm_event_loop.h" |
Philipp Schrader | 790cb54 | 2023-07-05 21:06:52 -0700 | [diff] [blame] | 4 | #include "aos/init.h" |
| 5 | #include "frc971/vision/foxglove_image_converter_lib.h" |
James Kuszmaul | 77d536c | 2023-02-11 17:30:59 -0800 | [diff] [blame] | 6 | |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 7 | ABSL_FLAG(std::string, config, "aos_config.json", |
| 8 | "Path to the config file to use."); |
James Kuszmaul | 77d536c | 2023-02-11 17:30:59 -0800 | [diff] [blame] | 9 | |
| 10 | int main(int argc, char *argv[]) { |
| 11 | aos::InitGoogle(&argc, &argv); |
| 12 | |
| 13 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 14 | aos::configuration::ReadConfig(absl::GetFlag(FLAGS_config)); |
James Kuszmaul | 77d536c | 2023-02-11 17:30:59 -0800 | [diff] [blame] | 15 | |
| 16 | aos::ShmEventLoop event_loop(&config.message()); |
| 17 | |
| 18 | frc971::vision::FoxgloveImageConverter converter( |
| 19 | &event_loop, "/camera", "/camera", |
| 20 | frc971::vision::ImageCompression::kJpeg); |
| 21 | |
| 22 | event_loop.Run(); |
| 23 | } |