Flip front/back and use team number for IP address
We tend to go to backwards buttons more often, and it's slightly more
natural to have front buttons on the left, so switch front/back
Also, both robots were controlling the 10.9.71.179 camera. Point
them now at robot specific IP addresses.
Change-Id: I0b1c0152f62edae0453d44a614b927c40a4daf2e
diff --git a/y2018/vision/image_streamer.cc b/y2018/vision/image_streamer.cc
index 93f8c58..f6da93c 100644
--- a/y2018/vision/image_streamer.cc
+++ b/y2018/vision/image_streamer.cc
@@ -334,13 +334,16 @@
ProtoUdpClient<VisionControl> udp_client(
5000, [&camera0, &camera1](const VisionControl &vision_control) {
- LOG(INFO, "Got control packet\n");
+ bool cam0_active = false;
if (camera1) {
+ cam0_active = !vision_control.high_video();
camera0->set_active(!vision_control.high_video());
camera1->set_active(vision_control.high_video());
} else {
+ cam0_active = true;
camera0->set_active(true);
}
+ LOG(INFO, "Got control packet, cam%d active\n", cam0_active ? 0 : 1);
});
// Default to camera0