Make 2023 camera start first try
We had an order of operations problem with some of the pin
configuration. Fix that and set an exposure + gain as well.
Change-Id: Ic2447b28656f9fa3bee3762ad752d86c17836e2a
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/vision/media_device.cc b/frc971/vision/media_device.cc
index 1813b6f..4c227a8 100644
--- a/frc971/vision/media_device.cc
+++ b/frc971/vision/media_device.cc
@@ -365,8 +365,12 @@
Link *MediaDevice::FindLink(std::string_view source, int source_pad_index,
std::string_view sink, int sink_pad_index) {
- Entity *source_entity = CHECK_NOTNULL(FindEntity(source));
- Entity *sink_entity = CHECK_NOTNULL(FindEntity(sink));
+ Entity *source_entity = FindEntity(source);
+ Entity *sink_entity = FindEntity(sink);
+
+ CHECK(source_entity != nullptr) << ": Failed to find source " << source;
+ CHECK(sink_entity != nullptr) << ": Failed to find sink " << sink;
+
Pad *source_pad = source_entity->pads()[source_pad_index];
Pad *sink_pad = sink_entity->pads()[sink_pad_index];
for (size_t i = 0; i < source_pad->links_size(); ++i) {