cleaned up issues with Daniel's code
There were a lot of style things and a misunderstanding of the protocol
between the cape and the BBB.
diff --git a/bbb_cape/src/cape/cape.gyp b/bbb_cape/src/cape/cape.gyp
index e9d34ef..91ec298 100644
--- a/bbb_cape/src/cape/cape.gyp
+++ b/bbb_cape/src/cape/cape.gyp
@@ -1,4 +1,9 @@
{
+ 'target_defaults': {
+ 'include_dirs': [
+ '..',
+ ],
+ },
'targets': [
{
'target_name': 'cows',
@@ -7,5 +12,9 @@
'cows.c',
],
},
+ {
+ 'target_name': 'data_struct',
+ 'type': 'static_library',
+ },
],
}
diff --git a/bbb_cape/src/cape/cows.c b/bbb_cape/src/cape/cows.c
index 396889c..16ed1fc 100644
--- a/bbb_cape/src/cape/cows.c
+++ b/bbb_cape/src/cape/cows.c
@@ -1,4 +1,4 @@
-#include "cows.h"
+#include "cape/cows.h"
#include <limits.h>
diff --git a/bbb_cape/src/cape/data_struct.h b/bbb_cape/src/cape/data_struct.h
index 95992b9..797648f 100644
--- a/bbb_cape/src/cape/data_struct.h
+++ b/bbb_cape/src/cape/data_struct.h
@@ -60,6 +60,7 @@
// The number of bytes that we actually send (so it stays consistent) (including
// the byte-stuffing overhead and the CRC on the end).
+// This will always be a multiple of 4.
#define DATA_STRUCT_SEND_SIZE 200
#ifdef __cplusplus