diff --git a/src/ir_decoder/src/include/ir_ac_apply.h b/src/ir_decoder/src/include/ir_ac_apply.h index 42537bd..af68831 100644 --- a/src/ir_decoder/src/include/ir_ac_apply.h +++ b/src/ir_decoder/src/include/ir_ac_apply.h @@ -12,7 +12,9 @@ Revision log: #ifndef _IR_APPLY_H_ #define _IR_APPLY_H_ +#if defined (BOARD_PC) #pragma ide diagnostic ignored "OCUnusedMacroInspection" +#endif #ifdef __cplusplus extern "C" diff --git a/src/ir_decoder/src/include/ir_ac_control.h b/src/ir_decoder/src/include/ir_ac_control.h index 655f9db..60d8722 100644 --- a/src/ir_decoder/src/include/ir_ac_control.h +++ b/src/ir_decoder/src/include/ir_ac_control.h @@ -11,7 +11,9 @@ Revision log: #ifndef _IR_DECODER_IR_AC_CONTROL_H #define _IR_DECODER_IR_AC_CONTROL_H +#if defined (BOARD_PC) #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection" +#endif #ifdef __cplusplus extern "C" diff --git a/src/ir_decoder/src/include/ir_decode.h b/src/ir_decoder/src/include/ir_decode.h index 5ba789f..e0069aa 100644 --- a/src/ir_decoder/src/include/ir_decode.h +++ b/src/ir_decoder/src/include/ir_decode.h @@ -12,8 +12,10 @@ Revision log: #ifndef _IR_DECODE_H_ #define _IR_DECODE_H_ +#if defined (BOARD_PC) #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection" #pragma ide diagnostic ignored "OCUnusedMacroInspection" +#endif #ifdef __cplusplus extern "C" diff --git a/src/ir_decoder/src/include/ir_defs.h b/src/ir_decoder/src/include/ir_defs.h index e8e3f85..be31f58 100644 --- a/src/ir_decoder/src/include/ir_defs.h +++ b/src/ir_decoder/src/include/ir_defs.h @@ -12,8 +12,10 @@ Revision log: #ifndef _IR_DEFS_H #define _IR_DEFS_H +#if defined (BOARD_PC) #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection" #pragma ide diagnostic ignored "OCUnusedMacroInspection" +#endif #ifdef __cplusplus extern "C" diff --git a/src/ir_decoder/src/include/ir_tv_control.h b/src/ir_decoder/src/include/ir_tv_control.h index 6149556..fc948f6 100644 --- a/src/ir_decoder/src/include/ir_tv_control.h +++ b/src/ir_decoder/src/include/ir_tv_control.h @@ -12,8 +12,10 @@ Revision log: #ifndef _IR_TV_CONTROL_H_ #define _IR_TV_CONTROL_H_ +#if defined (BOARD_PC) #pragma ide diagnostic ignored "OCUnusedMacroInspection" #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection" +#endif #ifdef __cplusplus extern "C" diff --git a/src/ir_decoder/src/include/ir_utils.h b/src/ir_decoder/src/include/ir_utils.h index 299b76d..842ac16 100644 --- a/src/ir_decoder/src/include/ir_utils.h +++ b/src/ir_decoder/src/include/ir_utils.h @@ -12,7 +12,9 @@ Revision log: #ifndef _IR_UTILS_H_ #define _IR_UTILS_H_ +#if defined (BOARD_PC) #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection" +#endif #ifdef __cplusplus extern "C" diff --git a/src/ir_decoder/src/ir_ac_apply.c b/src/ir_decoder/src/ir_ac_apply.c index 8ab1da3..1dc8881 100644 --- a/src/ir_decoder/src/ir_ac_apply.c +++ b/src/ir_decoder/src/ir_ac_apply.c @@ -8,8 +8,10 @@ Description: This file provides methods for AC IR applying functionalities Revision log: * 2016-10-12: created by strawmanbobi **************************************************************************************/ +#if defined (BOARD_PC) #pragma ide diagnostic ignored "bugprone-branch-clone" #pragma ide diagnostic ignored "hicpp-signed-bitwise" +#endif #include "include/ir_utils.h" #include "include/ir_ac_apply.h" diff --git a/src/ir_decoder/src/ir_ac_build_frame.c b/src/ir_decoder/src/ir_ac_build_frame.c index a34c11b..2ba3272 100644 --- a/src/ir_decoder/src/ir_ac_build_frame.c +++ b/src/ir_decoder/src/ir_ac_build_frame.c @@ -9,8 +9,10 @@ Revision log: * 2016-10-01: created by strawmanbobi **************************************************************************************/ +#if defined (BOARD_PC) #pragma ide diagnostic ignored "hicpp-signed-bitwise" #pragma ide diagnostic ignored "readability-redundant-declaration" +#endif #include "include/ir_ac_build_frame.h" #include "include/ir_decode.h" diff --git a/src/ir_decoder/src/ir_ac_control.c b/src/ir_decoder/src/ir_ac_control.c index 36ce198..e6ee7b7 100644 --- a/src/ir_decoder/src/ir_ac_control.c +++ b/src/ir_decoder/src/ir_ac_control.c @@ -550,10 +550,11 @@ INT8 free_ac_context() return IR_DECODE_SUCCEEDED; } -#pragma clang diagnostic push +#if defined (BOARD_PC) #pragma ide diagnostic ignored "hicpp-signed-bitwise" +#endif + BOOL is_solo_function(UINT8 function_code) { return (((context->solo_function_mark >> (function_code - 1)) & 0x01) == 0x01) ? TRUE : FALSE; -} -#pragma clang diagnostic pop +} \ No newline at end of file diff --git a/src/ir_decoder/src/ir_ac_parse_forbidden_info.c b/src/ir_decoder/src/ir_ac_parse_forbidden_info.c index 2339c7a..5121932 100644 --- a/src/ir_decoder/src/ir_ac_parse_forbidden_info.c +++ b/src/ir_decoder/src/ir_ac_parse_forbidden_info.c @@ -9,7 +9,9 @@ Revision log: * 2016-10-05: created by strawmanbobi **************************************************************************************/ +#if defined (BOARD_PC) #pragma ide diagnostic ignored "readability-redundant-declaration" +#endif #include #include diff --git a/src/ir_decoder/src/ir_decode.c b/src/ir_decoder/src/ir_decode.c index eb47c7e..008439e 100644 --- a/src/ir_decoder/src/ir_decode.c +++ b/src/ir_decoder/src/ir_decode.c @@ -31,8 +31,10 @@ struct tag_head tags[TAG_COUNT_FOR_PROTOCOL]; #endif static UINT8 byte_array[PROTOCOL_SIZE] = { 0 }; +#if !defined NO_FS static size_t binary_length = 0; static UINT8 *binary_content = NULL; +#endif static t_remote_category remote_category = REMOTE_CATEGORY_NONE; static UINT8 ir_binary_type = IR_TYPE_STATUS; @@ -178,7 +180,7 @@ INT8 ir_binary_open(const UINT8 category, const UINT8 sub_category, UINT8* binar ir_printf("wrong remote category\n"); return IR_DECODE_FAILED; } - remote_category = category; + remote_category = (t_remote_category) category; if (sub_category < SUB_CATEGORY_QUATERNARY || sub_category >= SUB_CATEGORY_NEXT) @@ -738,7 +740,7 @@ UINT16 ir_decode_combo(const UINT8 category, const UINT8 sub_category, return IR_DECODE_FAILED; } - remote_category = category; + remote_category = (t_remote_category) category; if (key_code < 0 || key_code >= KEY_CODE_MAX[remote_category]) { diff --git a/src/ir_decoder/src/ir_decode_test.c b/src/ir_decoder/src/ir_decode_test.c index d14f0f3..36f1ea2 100644 --- a/src/ir_decoder/src/ir_decode_test.c +++ b/src/ir_decoder/src/ir_decode_test.c @@ -1,9 +1,9 @@ /************************************************************************************** -Filename: ir_main.c +Filename: ir_decode_test.c Revised: Date: 2016-11-05 Revision: Revision: 1.0 -Description: This file provides main entry for irda decoder +Description: This file provides main entry for irda decoder test Revision log: * 2016-11-05: created by strawmanbobi @@ -74,13 +74,13 @@ static INT8 decode_as_ac(char *file_name) UINT8 supported_swing = 0x00; UINT8 supported_wind_direction = 0x00; - BOOL need_control; + BOOL need_control = TRUE; // init air conditioner status ac_status.ac_display = 0; ac_status.ac_sleep = 0; ac_status.ac_timer = 0; - ac_status.ac_power = AC_POWER_OFF; + ac_status.ac_power = AC_POWER_ON; ac_status.ac_mode = AC_MODE_COOL; ac_status.ac_temp = AC_TEMP_20; ac_status.ac_wind_dir = AC_SWING_ON; diff --git a/src/ir_decoder/src/ir_tv_control.c b/src/ir_decoder/src/ir_tv_control.c index c7cc98f..9585034 100644 --- a/src/ir_decoder/src/ir_tv_control.c +++ b/src/ir_decoder/src/ir_tv_control.c @@ -9,7 +9,9 @@ Revision log: * 2016-10-21: created by strawmanbobi **************************************************************************************/ +#if defined (BOARD_PC) #pragma ide diagnostic ignored "hicpp-signed-bitwise" +#endif #include