aboutsummaryrefslogtreecommitdiff
path: root/tools/ootx_decode/ootx_decode.c
diff options
context:
space:
mode:
authorJosh Allen <axlecrusher@gmail.com>2017-02-11 20:56:50 -0500
committerJosh Allen <axlecrusher@gmail.com>2017-02-11 20:56:50 -0500
commitc04c9fb7dcf80123edec53a2e6709bb128548a73 (patch)
tree650fa2b1780536eaf69c348cec674df96bc930e3 /tools/ootx_decode/ootx_decode.c
parentaab9f4f1db0dd752a00f3ae67531f1d58b9e2980 (diff)
downloadlibsurvive-c04c9fb7dcf80123edec53a2e6709bb128548a73.tar.gz
libsurvive-c04c9fb7dcf80123edec53a2e6709bb128548a73.tar.bz2
add lighthouse_info_v6
Diffstat (limited to 'tools/ootx_decode/ootx_decode.c')
-rw-r--r--tools/ootx_decode/ootx_decode.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/ootx_decode/ootx_decode.c b/tools/ootx_decode/ootx_decode.c
index 19d6574..3a6b6f0 100644
--- a/tools/ootx_decode/ootx_decode.c
+++ b/tools/ootx_decode/ootx_decode.c
@@ -22,6 +22,10 @@ void my_test(ootx_packet* packet) {
void my_test2(ootx_packet* packet) {
printf("completed ootx packet\n");
+
+ lighthouse_info_v6 lhi;
+ init_lighthouse_info_v6(&lhi,packet->data);
+ print_lighthouse_info_v6(&lhi);
// packet->data[packet->length] = 0;
// printf("%d %s 0x%X\n", packet->length, packet->data, packet->crc32);
}
@@ -91,11 +95,10 @@ void raw_test() {
if (current_lighthouse==0) bit &= ootx_pump_greatest_bit(c_ctx);
- uint16_t s = *(c_ctx->payload_size);
- uint16_t fwv = *(c_ctx->buffer+2);
- uint16_t pv = 0x3f & fwv; //protocol version
- fwv>>=6; //firmware version
-// uint16_t ss = (s>>8) | (s<<8);
+// uint16_t s = *(c_ctx->payload_size);
+// uint16_t fwv = *(c_ctx->buffer+2);
+// uint16_t pv = 0x3f & fwv; //protocol version
+// fwv>>=6; //firmware version
//this will print after any messages from ootx_pump
// if (c_ctx->found_preamble>0) printf("LH:%d s:%d 0x%x fw:%d pv:%d bo:%d bit:%d\t%s", current_lighthouse, s, s, fwv, pv, c_ctx->buf_offset, bit, line);