Actually manage memory in the old-style AOS logging
LeakSanitizer should be happy with it now. It's also still just as
thread-safe.
Change-Id: Id09a0349657cf4f719267b053f0ea3d8ec366256
diff --git a/frc971/wpilib/BUILD b/frc971/wpilib/BUILD
index 8010edc..1256d7f 100644
--- a/frc971/wpilib/BUILD
+++ b/frc971/wpilib/BUILD
@@ -370,6 +370,7 @@
"//aos:init",
"//aos/events:event_loop",
"//aos/events:shm_event_loop",
+ "//aos/logging",
"//aos/stl_mutex",
"//aos/time",
"//aos/util:phased_loop",
diff --git a/frc971/wpilib/interrupt_edge_counting.h b/frc971/wpilib/interrupt_edge_counting.h
index 160682c..dd48f2d 100644
--- a/frc971/wpilib/interrupt_edge_counting.h
+++ b/frc971/wpilib/interrupt_edge_counting.h
@@ -6,8 +6,9 @@
#include <thread>
#include <vector>
-#include "aos/stl_mutex/stl_mutex.h"
+#include "aos/logging/logging.h"
#include "aos/macros.h"
+#include "aos/stl_mutex/stl_mutex.h"
#include "frc971/wpilib/ahal/DigitalInput.h"
#include "frc971/wpilib/ahal/Encoder.h"
diff --git a/frc971/wpilib/sensor_reader.cc b/frc971/wpilib/sensor_reader.cc
index 2c5e563..dea4760 100644
--- a/frc971/wpilib/sensor_reader.cc
+++ b/frc971/wpilib/sensor_reader.cc
@@ -4,6 +4,7 @@
#include <unistd.h>
#include "aos/init.h"
+#include "aos/logging/logging.h"
#include "aos/util/compiler_memory_barrier.h"
#include "aos/util/phased_loop.h"
#include "frc971/wpilib/ahal/DigitalInput.h"