Implement UART serialization code to/from the cameras
Also fix a few things in the SPI serialization code I noticed while
reusing the pattern.
Change-Id: I645775b4c9ea1265025957e50b4d03f4932582f8
diff --git a/y2019/jevois/structures.h b/y2019/jevois/structures.h
index 15889c4..fcc268e 100644
--- a/y2019/jevois/structures.h
+++ b/y2019/jevois/structures.h
@@ -107,7 +107,7 @@
// This is all the information sent from the Teensy to each camera.
struct CameraCalibration {
- enum class CameraCommand {
+ enum class CameraCommand : char {
// Stay in normal mode.
kNormal,
// Go to camera passthrough mode.
@@ -120,6 +120,15 @@
if (other.calibration != calibration) {
return false;
}
+ if (other.teensy_now != teensy_now) {
+ return false;
+ }
+ if (other.realtime_now != realtime_now) {
+ return false;
+ }
+ if (other.camera_command != camera_command) {
+ return false;
+ }
return true;
}
bool operator!=(const CameraCalibration &other) const {