Procházet zdrojové kódy

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

sat23 před 4 roky
rodič
revize
df9d5e0feb
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      TCLCommand/TCLCommand/CommandParam.h

+ 3 - 3
TCLCommand/TCLCommand/CommandParam.h

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