reverted ac decode issue patch since the issue comes from console
This commit is contained in:
@@ -22,7 +22,6 @@ extern "C"
|
||||
#define TAG_COUNT_FOR_PROTOCOL 29
|
||||
|
||||
#define TAG_INVALID 0xffff
|
||||
#define TAG_INVALID_2 0xfdfd
|
||||
|
||||
#define MAX_DELAYCODE_NUM 16
|
||||
#define MAX_BITNUM 16
|
||||
|
||||
@@ -51,7 +51,7 @@ INT8 binary_parse_offset()
|
||||
tags[i].tag = tag_index[i];
|
||||
tags[i].offset = *(phead + i);
|
||||
|
||||
if (tags[i].offset == TAG_INVALID || tags[i].offset == TAG_INVALID_2)
|
||||
if (tags[i].offset == TAG_INVALID)
|
||||
{
|
||||
tags[i].len = 0;
|
||||
}
|
||||
@@ -64,14 +64,14 @@ INT8 binary_parse_len()
|
||||
UINT16 i = 0, j = 0;
|
||||
for (i = 0; i < (tag_count - 1); i++)
|
||||
{
|
||||
if (tags[i].offset == TAG_INVALID || tags[i].offset == TAG_INVALID_2)
|
||||
if (tags[i].offset == TAG_INVALID)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (j = (UINT16) (i + 1); j < tag_count; j++)
|
||||
{
|
||||
if (tags[j].offset != TAG_INVALID && tags[j].offset != TAG_INVALID_2)
|
||||
if (tags[j].offset != TAG_INVALID)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ INT8 binary_parse_len()
|
||||
return IR_DECODE_SUCCEEDED;
|
||||
}
|
||||
}
|
||||
if (tags[tag_count - 1].offset != TAG_INVALID && tags[tag_count - 1].offset != TAG_INVALID_2)
|
||||
if (tags[tag_count - 1].offset != TAG_INVALID)
|
||||
{
|
||||
tags[tag_count - 1].len = p_ir_buffer->len - tag_head_offset - tags[tag_count - 1].offset;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ static BOOL get_ir_protocol(UINT8 encode_type);
|
||||
|
||||
static BOOL get_ir_keymap(void);
|
||||
|
||||
static void print_ir_time(ir_data_t *data, UINT8 keyindex, UINT16 *ir_time);
|
||||
static void print_ir_time(ir_data_t *data, UINT8 key_index, UINT16 *ir_time);
|
||||
|
||||
static void process_decode_number(UINT8 keycode, ir_data_t *data, UINT8 valid_bits, UINT16 *ir_time);
|
||||
|
||||
@@ -181,12 +181,12 @@ static BOOL get_ir_keymap(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void print_ir_time(ir_data_t *data, UINT8 keyindex, UINT16 *ir_time)
|
||||
static void print_ir_time(ir_data_t *data, UINT8 key_index, UINT16 *ir_time)
|
||||
{
|
||||
UINT8 i = 0;
|
||||
UINT8 cycles_num = 0;
|
||||
ir_cycles_t *pcycles = NULL;
|
||||
UINT8 keycode = 0;
|
||||
UINT8 key_code = 0;
|
||||
|
||||
if (NULL == data || NULL == ir_time)
|
||||
{
|
||||
@@ -194,7 +194,7 @@ static void print_ir_time(ir_data_t *data, UINT8 keyindex, UINT16 *ir_time)
|
||||
}
|
||||
|
||||
pcycles = prot_cycles_data[data->index];
|
||||
keycode = remote_pdata[remote_p->per_keycode_bytes * keyindex + data->index - 1];
|
||||
key_code = remote_pdata[remote_p->per_keycode_bytes * key_index + data->index - 1];
|
||||
|
||||
if (prot_cycles_num[IRDA_ONE] != 1 || prot_cycles_num[IRDA_ZERO] != 1)
|
||||
{
|
||||
@@ -305,22 +305,22 @@ static void print_ir_time(ir_data_t *data, UINT8 keyindex, UINT16 *ir_time)
|
||||
{
|
||||
// mode: inverse
|
||||
if (data->mode == 1)
|
||||
keycode = ~keycode;
|
||||
key_code = ~key_code;
|
||||
|
||||
if (ir_decode_flag == IRDA_DECODE_1_BIT)
|
||||
{
|
||||
// for binary formatted code
|
||||
process_decode_number(keycode, data, 1, ir_time);
|
||||
process_decode_number(key_code, data, 1, ir_time);
|
||||
}
|
||||
else if (ir_decode_flag == IRDA_DECODE_2_BITS)
|
||||
{
|
||||
// for quanternary formatted code
|
||||
process_decode_number(keycode, data, 2, ir_time);
|
||||
process_decode_number(key_code, data, 2, ir_time);
|
||||
}
|
||||
else if (ir_decode_flag == IRDA_DECODE_4_BITS)
|
||||
{
|
||||
// for hexadecimal formatted code
|
||||
process_decode_number(keycode, data, 4, ir_time);
|
||||
process_decode_number(key_code, data, 4, ir_time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user