diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..e257ff9 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": "无配置" +} \ No newline at end of file diff --git a/.vs/irext-core/v15/.suo b/.vs/irext-core/v15/.suo new file mode 100644 index 0000000..28103bf Binary files /dev/null and b/.vs/irext-core/v15/.suo differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..a36c552 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/src/ir_decoder/src/ir_ac_binary_parse.c b/src/ir_decoder/src/ir_ac_binary_parse.c index b3360a4..0dc3b37 100644 --- a/src/ir_decoder/src/ir_ac_binary_parse.c +++ b/src/ir_decoder/src/ir_ac_binary_parse.c @@ -33,7 +33,13 @@ const UINT16 tag_index[TAG_COUNT_FOR_PROTOCOL] = INT8 binary_parse_offset() { int i = 0; - UINT16 *phead = (UINT16 *) &p_ir_buffer->data[1]; +#ifdef ESP8266 + UINT8 *phead = (UINT8 *)&p_ir_buffer->data[1]; +#else + UINT16 *phead = (UINT16 *)&p_ir_buffer->data[1]; +#endif //ESP8266 + + tag_count = p_ir_buffer->data[0]; if (TAG_COUNT_FOR_PROTOCOL != tag_count) @@ -59,6 +65,10 @@ INT8 binary_parse_offset() #if defined BOARD_STM8 && defined COMPILER_IAR UINT16 offset = *(phead + i); tags[i].offset = (offset >> 8) | (offset << 8); +#elif defined ESP8266 + UINT16 tmp_a = *(phead + i * 2); + UINT16 tmp_b = *(phead + i * 2 + 1); + tags[i].offset = tmp_b << 8 | tmp_a; #else tags[i].offset = *(phead + i); #endif