Create an enum for sender errors
Will replace usages of bools, and will now currently only be used
for indicating that messages were sent too fast
After we merge this commit we will replace this enum with a general
Status class for all of aos, similar to absl::Status.
Change-Id: I4b5b2e7685744b3c6826a241cd3c84190eaa96ee
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
diff --git a/y2016/vision/target_receiver.cc b/y2016/vision/target_receiver.cc
index a762e4f..75a07a8 100644
--- a/y2016/vision/target_receiver.cc
+++ b/y2016/vision/target_receiver.cc
@@ -408,8 +408,9 @@
}
if (drivetrain_offset.CompleteVisionStatus(&new_vision_status)) {
- if (!builder.Send(
- VisionStatus::Pack(*builder.fbb(), &new_vision_status))) {
+ if (builder.Send(
+ VisionStatus::Pack(*builder.fbb(), &new_vision_status)) !=
+ aos::RawSender::Error::kOk) {
AOS_LOG(ERROR, "Failed to send vision information\n");
}
} else {