blob: c004ac096f00b2dddcd82a2fcbcac65664b13cde [file] [log] [blame]
Niko Sohmers3860f8a2024-01-12 21:05:19 -08001#include "aos/events/shm_event_loop.h"
2#include "aos/init.h"
3#include "frc971/vision/foxglove_image_converter_lib.h"
4
5DEFINE_string(config, "aos_config.json", "Path to the config file to use.");
Jim Ostrowski9bf206a2024-01-26 23:31:58 -08006DEFINE_string(channel, "/camera", "Input/Output channel to use.");
Niko Sohmers3860f8a2024-01-12 21:05:19 -08007
8int main(int argc, char *argv[]) {
9 aos::InitGoogle(&argc, &argv);
10
11 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
12 aos::configuration::ReadConfig(FLAGS_config);
13
14 aos::ShmEventLoop event_loop(&config.message());
15
16 frc971::vision::FoxgloveImageConverter converter(
Jim Ostrowski9bf206a2024-01-26 23:31:58 -080017 &event_loop, FLAGS_channel, FLAGS_channel,
Niko Sohmers3860f8a2024-01-12 21:05:19 -080018 frc971::vision::ImageCompression::kJpeg);
19
20 event_loop.Run();
21}