diff options
author | Josh Allen <axlecrusher@gmail.com> | 2017-02-11 11:27:21 -0500 |
---|---|---|
committer | Josh Allen <axlecrusher@gmail.com> | 2017-02-11 11:27:21 -0500 |
commit | 998ffc6ec9dc6ca2f0c94501c6d70882dfb13f5b (patch) | |
tree | d3782b07fe78b45d6f1c2ab7b3ef8354791f66de /tools | |
parent | 7eb1feba7c7a64910cb17f741f2349254a34fddd (diff) | |
download | libsurvive-998ffc6ec9dc6ca2f0c94501c6d70882dfb13f5b.tar.gz libsurvive-998ffc6ec9dc6ca2f0c94501c6d70882dfb13f5b.tar.bz2 |
print protocol and firmware version
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ootx_decode/ootx_decode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/ootx_decode/ootx_decode.c b/tools/ootx_decode/ootx_decode.c index 26e0028..aabf1e8 100644 --- a/tools/ootx_decode/ootx_decode.c +++ b/tools/ootx_decode/ootx_decode.c @@ -89,8 +89,11 @@ void raw_test() { 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; + fwv>>=6; // uint16_t ss = (s>>8) | (s<<8); - if (c_ctx->found_preamble) printf("LH:%d s:%d 0x%x\t%s", current_lighthouse, s, s, line); + if (c_ctx->found_preamble) printf("LH:%d s:%d 0x%x fw:%d pv:%d %d\t%s", current_lighthouse, s, s, fwv, pv, c_ctx->buf_offset, line); //change to newly found lighthouse current_lighthouse = lh; |