fixed dyson decode for algorithm 0.2.5
This commit is contained in:
@@ -38,7 +38,9 @@ set(SOURCE_FILES_LIB
|
|||||||
src/ir_ac_build_frame.c
|
src/ir_ac_build_frame.c
|
||||||
src/ir_ac_parse_parameter.c
|
src/ir_ac_parse_parameter.c
|
||||||
src/ir_ac_parse_forbidden_info.c
|
src/ir_ac_parse_forbidden_info.c
|
||||||
src/ir_ac_parse_frame_info.c
|
|
||||||
|
|
||||||
|
System.out.println("continue downloading"); src/ir_ac_parse_frame_info.c
|
||||||
src/ir_ac_control.c
|
src/ir_ac_control.c
|
||||||
src/ir_ac_binary_parse.c
|
src/ir_ac_binary_parse.c
|
||||||
src/ir_decode.c)
|
src/ir_decode.c)
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ typedef enum
|
|||||||
REMOTE_CATEGORY_BSTB = 11,
|
REMOTE_CATEGORY_BSTB = 11,
|
||||||
REMOTE_CATEGORY_CLEANING_ROBOT = 12,
|
REMOTE_CATEGORY_CLEANING_ROBOT = 12,
|
||||||
REMOTE_CATEGORY_AREMOTE_CLEANER = 13,
|
REMOTE_CATEGORY_AREMOTE_CLEANER = 13,
|
||||||
|
REMOTE_CATEGORY_DYSON = 14,
|
||||||
REMOTE_CATEGORY_NEXT,
|
REMOTE_CATEGORY_NEXT,
|
||||||
REMOTE_CATEGORY_MAX = 64,
|
REMOTE_CATEGORY_MAX = 64,
|
||||||
} t_remote_category;
|
} t_remote_category;
|
||||||
|
|||||||
@@ -468,19 +468,6 @@ static UINT16 ir_ac_control(t_remote_ac_status ac_status, UINT16* user_data, UIN
|
|||||||
|
|
||||||
time_length = create_ir_frame();
|
time_length = create_ir_frame();
|
||||||
|
|
||||||
#if (defined BOARD_PC)
|
|
||||||
#if (defined BOARD_PC_JNI)
|
|
||||||
ir_printf("code count = %d\n", context->code_cnt);
|
|
||||||
#else
|
|
||||||
int i = 0;
|
|
||||||
for (i = 0; i < context->code_cnt; i++)
|
|
||||||
{
|
|
||||||
ir_printf("%d,", context->time[i]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ir_printf("\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return time_length;
|
return time_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -724,15 +711,6 @@ static UINT16 ir_tv_control(UINT8 key, UINT16 *l_user_data)
|
|||||||
memset(l_user_data, 0x00, USER_DATA_SIZE);
|
memset(l_user_data, 0x00, USER_DATA_SIZE);
|
||||||
ir_code_length = tv_binary_decode(key, l_user_data);
|
ir_code_length = tv_binary_decode(key, l_user_data);
|
||||||
|
|
||||||
#if defined BOARD_PC
|
|
||||||
// have some debug
|
|
||||||
ir_printf("length of IR code = %d\n", ir_code_length);
|
|
||||||
for (print_index = 0; print_index < ir_code_length; print_index++)
|
|
||||||
{
|
|
||||||
ir_printf("%d ", l_user_data[print_index]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ir_code_length;
|
return ir_code_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ static INT8 decode_as_ac(char *file_name)
|
|||||||
UINT8 function_code = AC_FUNCTION_MAX;
|
UINT8 function_code = AC_FUNCTION_MAX;
|
||||||
int key_code = 0;
|
int key_code = 0;
|
||||||
int first_time = 1;
|
int first_time = 1;
|
||||||
|
int length = 0;
|
||||||
|
int index = 0;
|
||||||
|
|
||||||
// get status
|
// get status
|
||||||
UINT8 supported_mode = 0x00;
|
UINT8 supported_mode = 0x00;
|
||||||
@@ -218,7 +220,13 @@ static INT8 decode_as_ac(char *file_name)
|
|||||||
ac_status.ac_wind_dir,
|
ac_status.ac_wind_dir,
|
||||||
function_code);
|
function_code);
|
||||||
|
|
||||||
ir_decode(function_code, user_data, &ac_status, change_wind_dir);
|
length = ir_decode(function_code, user_data, &ac_status, change_wind_dir);
|
||||||
|
printf("\n === Binary decoded : %d\n", length);
|
||||||
|
for (index = 0; index < length; index++)
|
||||||
|
{
|
||||||
|
printf("%d, ", user_data[index]);
|
||||||
|
}
|
||||||
|
printf("===\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (TRUE);
|
} while (TRUE);
|
||||||
@@ -233,6 +241,8 @@ static INT8 decode_as_tv(char *file_name, UINT8 ir_hex_encode)
|
|||||||
// keyboard input
|
// keyboard input
|
||||||
int key_code = 0;
|
int key_code = 0;
|
||||||
int first_time = 1;
|
int first_time = 1;
|
||||||
|
int length = 0;
|
||||||
|
int index = 0;
|
||||||
|
|
||||||
// here remote category TV represents for command typed IR code
|
// here remote category TV represents for command typed IR code
|
||||||
if (IR_DECODE_FAILED == ir_file_open(REMOTE_CATEGORY_TV, ir_hex_encode, file_name))
|
if (IR_DECODE_FAILED == ir_file_open(REMOTE_CATEGORY_TV, ir_hex_encode, file_name))
|
||||||
@@ -258,7 +268,13 @@ static INT8 decode_as_tv(char *file_name, UINT8 ir_hex_encode)
|
|||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ir_decode(key_code, user_data, NULL, 0);
|
length = ir_decode(key_code, user_data, NULL, 0);
|
||||||
|
printf("\n === Binary decoded : %d\n", length);
|
||||||
|
for (index = 0; index < length; index++)
|
||||||
|
{
|
||||||
|
printf("%d, ", user_data[index]);
|
||||||
|
}
|
||||||
|
printf("===\n");
|
||||||
|
|
||||||
} while (TRUE);
|
} while (TRUE);
|
||||||
|
|
||||||
@@ -303,4 +319,6 @@ int main(int argc, char *argv[])
|
|||||||
printf("Decode functionality not supported : %c\n", function);
|
printf("Decode functionality not supported : %c\n", function);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user