summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-10-10 00:17:06 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-10-10 00:17:06 +0200
commitc6e20fda3ec5ea0c177455a6922da80b96856d81 (patch)
treeb3b6130d2e580bcb896c6cfb44f526c0ddfcbeb0 /main.cpp
parent29b57608a54604c7e940577f9e33009cc6d1eb17 (diff)
Send type with xbee message.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/main.cpp b/main.cpp
index 199ffcd..1993489 100644
--- a/main.cpp
+++ b/main.cpp
@@ -66,22 +66,16 @@ void threadmain() {
while(1) {
GPIOB.ODR ^= 1 << 1;
- uint8_t buf[] = {
- gyro.x & 0xff,
- gyro.x >> 8,
- gyro.y & 0xff,
- gyro.y >> 8,
- gyro.z & 0xff,
- gyro.z >> 8,
- accel.x & 0xff,
- accel.x >> 8,
- accel.y & 0xff,
- accel.y >> 8,
- accel.z & 0xff,
- accel.z >> 8,
+ uint16_t buf[] = {
+ gyro.x,
+ gyro.y,
+ gyro.z,
+ accel.x,
+ accel.y,
+ accel.z,
};
- xbee_send(sizeof(buf), buf);
+ xbee_send(1, sizeof(buf), (uint8_t*)buf);
Time::sleep(100);
}
}