Эх сурвалжийг харах

修正:AAFE也是AB返回码;其他同理,只取前2字符。

sat23 4 жил өмнө
parent
commit
df9d5e0feb

+ 3 - 3
TCLCommand/TCLCommand/CommandParam.h

@@ -27,13 +27,13 @@ typedef struct __CMDPARAM__ {
     std::string _cmdContext;
 
     void UpdateRtnCode() {
-        if (!_tcsicmp(_T("AA"), head.c_str())) { // 调试用命令代码引导码;
+        if (!_tcsicmp(_T("AA"), head.substr(0,2).c_str())) { // 调试用命令代码引导码;
             _rtnCode = 0xAB;
         }
-        else if (!_tcsicmp(_T("AC"), head.c_str())) { // 软件配屏参数调整命令代码引导码;
+        else if (!_tcsicmp(_T("AC"), head.substr(0,2).c_str())) { // 软件配屏参数调整命令代码引导码;
             _rtnCode = 0xAD;
         }
-        else if (!_tcsicmp(_T("AE"), head.c_str())) { // 保留命令发送类型引导码;
+        else if (!_tcsicmp(_T("AE"), head.substr(0,2).c_str())) { // 保留命令发送类型引导码;
             _rtnCode = 0xAF;
         }
     }