From c04c9fb7dcf80123edec53a2e6709bb128548a73 Mon Sep 17 00:00:00 2001 From: Josh Allen Date: Sat, 11 Feb 2017 20:56:50 -0500 Subject: add lighthouse_info_v6 --- tools/ootx_decode/ootx_decode.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tools/ootx_decode/ootx_decode.c') 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); -- cgit v1.2.3