From 7eb1feba7c7a64910cb17f741f2349254a34fddd Mon Sep 17 00:00:00 2001 From: Josh Allen Date: Sat, 11 Feb 2017 10:08:16 -0500 Subject: 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 --- tools/ootx_decode/ootx_decoder.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/ootx_decode/ootx_decoder.h') 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); -- cgit v1.2.3