diff options
author | Josh Allen <axlecrusher@gmail.com> | 2017-02-14 20:53:19 -0500 |
---|---|---|
committer | Josh Allen <axlecrusher@gmail.com> | 2017-02-14 20:53:19 -0500 |
commit | 7d28d767ec888a189a338b984062b8097b63fddd (patch) | |
tree | 8f6298cfb752cc3e3e2a0d157b9a70552eecddf8 /tools | |
parent | 5509a5722af2e00fed5797b038076c0e7b8cc435 (diff) | |
download | libsurvive-7d28d767ec888a189a338b984062b8097b63fddd.tar.gz libsurvive-7d28d767ec888a189a338b984062b8097b63fddd.tar.bz2 |
use acode
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ootx_decode/ootx_decode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/ootx_decode/ootx_decode.c b/tools/ootx_decode/ootx_decode.c index 1074698..74d2dfe 100644 --- a/tools/ootx_decode/ootx_decode.c +++ b/tools/ootx_decode/ootx_decode.c @@ -64,18 +64,19 @@ void cnlohr_code_test() { int8_t lh_id = 0x00; uint32_t ticks = 0x00; int32_t delta = 0x00; + uint8_t acode = 0x00; ootx_decoder_context *c_ctx = ctx; while (getline(&line,&line_len,stdin)>0) { //R Y HMD -1575410734 -2 7 19714 6485 - sscanf(line,"%s %s %s %s %hhd %s %d %d", + sscanf(line,"%s %s %s %s %hhd %hhd %d %d", trash, trash, trash, trash, &lh_id, - trash, //sensor id? + &acode, &delta, &ticks); @@ -91,8 +92,8 @@ void cnlohr_code_test() { // uint8_t dbit = ootx_decode_bit(ticks); // printf("LH:%d ticks:%d bit:%X %s", lh, ticks, dbit, line); - ootx_process_bit(c_ctx, ticks); - +// ootx_process_bit(c_ctx, ticks); + ootx_pump_bit( c_ctx, (acode&0x02)>>1 ); /* uint16_t s = *(c_ctx->payload_size); uint16_t fwv = *(c_ctx->buffer+2); |