cleaned up the #includes and build files for the bbb code
diff --git a/bbb_cape/src/bbb/bbb.gyp b/bbb_cape/src/bbb/bbb.gyp
index a57ea23..37f60f4 100644
--- a/bbb_cape/src/bbb/bbb.gyp
+++ b/bbb_cape/src/bbb/bbb.gyp
@@ -19,12 +19,7 @@
       'target_name': 'uart_reader',
       'type': 'static_library',
       'dependencies': [
-        '<(DEPTH)/bbb_cape/src/cape/cape.gyp:data_struct',
         '<(AOS)/build/aos.gyp:logging',
-        'packet_finder',
-      ],
-      'export_dependent_settings': [
-        '<(DEPTH)/bbb_cape/src/cape/cape.gyp:data_struct',
       ],
       'sources': [
         'uart_reader.cc',
@@ -65,16 +60,32 @@
         '<(AOS)/build/aos.gyp:logging',
         'crc',
       ],
+      'export_dependent_settings': [
+        '<(AOS)/build/aos.gyp:logging',
+      ],
+    },
+    {
+      'target_name': 'data_struct',
+      'type': 'static_library',
+      'sources': [
+        # 'data_struct.h',
+      ],
+      'dependencies': [
+        '<(DEPTH)/bbb_cape/src/cape/cape.gyp:data_struct',
+      ],
+      'export_dependent_settings': [
+        '<(DEPTH)/bbb_cape/src/cape/cape.gyp:data_struct',
+      ],
     },
     {
       'target_name': 'uart_reader_main',
       'type': 'executable',
       'dependencies': [
         'uart_reader',
-        'gpios',
-        '<(AOS)/common/common.gyp:time',
         '<(AOS)/build/aos.gyp:logging',
         '<(AOS)/atom_code/atom_code.gyp:init',
+        'packet_finder',
+        'data_struct',
       ],
       'sources': [
         'uart_reader_main.cc',
diff --git a/bbb_cape/src/bbb/data_struct.h b/bbb_cape/src/bbb/data_struct.h
new file mode 100644
index 0000000..767c0e0
--- /dev/null
+++ b/bbb_cape/src/bbb/data_struct.h
@@ -0,0 +1,9 @@
+#include <stdint.h>
+
+namespace bbb {
+
+#define DATA_STRUCT_NAME DataStruct
+#include "cape/data_struct.h"
+#undef DATA_STRUCT_NAME
+
+}  // namespace bbb
diff --git a/bbb_cape/src/bbb/packet_finder.h b/bbb_cape/src/bbb/packet_finder.h
index 8d02caf..ae7cb14 100644
--- a/bbb_cape/src/bbb/packet_finder.h
+++ b/bbb_cape/src/bbb/packet_finder.h
@@ -8,10 +8,6 @@
 
 #include "bbb/byte_reader.h"
 
-#define DATA_STRUCT_NAME DataStruct
-#include "cape/data_struct.h"
-#undef DATA_STRUCT_NAME
-
 namespace bbb {
 
 class PacketFinder {
diff --git a/bbb_cape/src/bbb/uart_reader.cc b/bbb_cape/src/bbb/uart_reader.cc
index 03cd248..6d65330 100644
--- a/bbb_cape/src/bbb/uart_reader.cc
+++ b/bbb_cape/src/bbb/uart_reader.cc
@@ -1,7 +1,5 @@
 #include "bbb/uart_reader.h"
 
-#define OLD_CUSTOM_SPEED 0
-
 #include <errno.h>
 #include <fcntl.h>
 #include <linux/serial.h>
diff --git a/bbb_cape/src/bbb/uart_reader_main.cc b/bbb_cape/src/bbb/uart_reader_main.cc
index 94db8fc..2196e81 100644
--- a/bbb_cape/src/bbb/uart_reader_main.cc
+++ b/bbb_cape/src/bbb/uart_reader_main.cc
@@ -4,12 +4,10 @@
 
 #include "aos/atom_code/init.h"
 #include "aos/common/logging/logging_impl.h"
-#include "aos/common/time.h"
-#include "bbb/gpios.h"
+
 #include "bbb/uart_reader.h"
 #include "bbb/packet_finder.h"
-
-using ::aos::time::Time;
+#include "bbb/data_struct.h"
 
 int main() {
   ::aos::Init();
@@ -27,15 +25,13 @@
         WEXITSTATUS(chrt_result));
   }
 
-  Time last_packet_time = Time::Now();
   while (true) {
     if (!receiver.ReadPacket()) {
       LOG(WARNING, "Could not read a packet.\n");
       continue;
     }
-    last_packet_time = Time::Now();
 
-    const DataStruct *packet = receiver.get_packet<DataStruct>();
+    const ::bbb::DataStruct *packet = receiver.get_packet< ::bbb::DataStruct>();
     LOG(DEBUG, "got one!\n");
     LOG(DEBUG, "timestamp %" PRIu64 "\n", packet->timestamp);
     LOG(DEBUG, "gyro old=%d uninit=%d z=%d bad=%d %" PRId64 " \n",
diff --git a/bbb_cape/src/cape/data_struct.h b/bbb_cape/src/cape/data_struct.h
index e4f0d78..31a909f 100644
--- a/bbb_cape/src/cape/data_struct.h
+++ b/bbb_cape/src/cape/data_struct.h
@@ -4,8 +4,8 @@
 // This means that it can not #include anything else because it (sometimes) gets
 // #included inside a namespace.
 // <stdint.h> must be #included by the containing file.
-// In the cape code, fill_packet.h #includes this file.
-// In the fitpc code, frc971/input/gyro_board_data.h #includes this file.
+// In the cape code, bbb_cape/src/cape/fill_packet.h #includes this file.
+// In the prime code, bbb_cape/src/bbb/data_struct.h #includes this file.
 
 #pragma pack(push, 1)
 // Be careful with declaration order in here. ARM doesn't like unaligned