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/y2020/control_loops/drivetrain/localizer.cc b/y2020/control_loops/drivetrain/localizer.cc
index d4d5f72..505a598 100644
--- a/y2020/control_loops/drivetrain/localizer.cc
+++ b/y2020/control_loops/drivetrain/localizer.cc
@@ -199,7 +199,7 @@
builder.MakeBuilder<LocalizerDebug>();
debug_builder.add_matches(vector_offset);
debug_builder.add_statistics(stats_offset);
- CHECK(builder.Send(debug_builder.Finish()));
+ builder.CheckOk(builder.Send(debug_builder.Finish()));
}
}
@@ -303,7 +303,8 @@
ImageMatchDebug::Builder builder(*fbb);
builder.add_camera(camera_index);
builder.add_pose_index(index);
- builder.add_local_image_capture_time_ns(result.image_monotonic_timestamp_ns());
+ builder.add_local_image_capture_time_ns(
+ result.image_monotonic_timestamp_ns());
builder.add_roborio_image_capture_time_ns(
capture_time.time_since_epoch().count());
builder.add_image_age_sec(aos::time::DurationInSeconds(now - capture_time));
@@ -390,8 +391,8 @@
(2.0 * dt_config_.robot_radius) +
(is_turret ? turret_data.velocity : 0.0));
- // Pay less attention to cameras that aren't actually on the turret, since they
- // are less useful when it comes to actually making shots.
+ // Pay less attention to cameras that aren't actually on the turret, since
+ // they are less useful when it comes to actually making shots.
if (!is_turret) {
noises *= 3.0;
} else {