diff options
author | Josh Allen <axlecrusher@gmail.com> | 2017-02-11 10:08:16 -0500 |
---|---|---|
committer | Josh Allen <axlecrusher@gmail.com> | 2017-02-11 10:08:16 -0500 |
commit | 7eb1feba7c7a64910cb17f741f2349254a34fddd (patch) | |
tree | 2ffdd54115daab2887a573702b08155ee8494826 /tools/ootx_decode/ootx_decoder.h | |
parent | acf367aab41e13b047df6670ffbb27cea8afe2d9 (diff) | |
download | libsurvive-7eb1feba7c7a64910cb17f741f2349254a34fddd.tar.gz libsurvive-7eb1feba7c7a64910cb17f741f2349254a34fddd.tar.bz2 |
ootx payload length for lighthouse 1 seems to be decoding correctly at 0x21.
the payload length seems to be oscillating between 0x21 and a much larger number.
the larger number 0xc8ec I have no idea why. 0xc8ec does not last long before a new preamble is found
Diffstat (limited to 'tools/ootx_decode/ootx_decoder.h')
-rw-r--r-- | tools/ootx_decode/ootx_decoder.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/ootx_decode/ootx_decoder.h b/tools/ootx_decode/ootx_decoder.h index 696fecb..6b181ee 100644 --- a/tools/ootx_decode/ootx_decoder.h +++ b/tools/ootx_decode/ootx_decoder.h @@ -23,6 +23,8 @@ typedef struct { uint32_t preamble; uint8_t bits_processed; uint8_t found_preamble; + + uint8_t bit_count[2]; } ootx_decoder_context; @@ -31,6 +33,8 @@ void ootx_process_bit(ootx_decoder_context *ctx, uint32_t length); void ootx_init_decoder_context(ootx_decoder_context *ctx); int8_t ootx_decode_lighthouse_number(uint8_t last_num, uint32_t ticks, int32_t delta); +void ootx_log_bit(ootx_decoder_context *ctx, uint32_t length); +void ootx_pump_greatest_bit(ootx_decoder_context *ctx); extern void (*ootx_packet_clbk)(ootx_packet* packet); |