Browse Source

变量重命名;

sat23 4 years ago
parent
commit
150b9776f7
2 changed files with 6 additions and 6 deletions
  1. 3 3
      TCLCommand/TCLCommand/Command.cpp
  2. 3 3
      TCLCommand/TCLCommand/CommandParam.h

+ 3 - 3
TCLCommand/TCLCommand/Command.cpp

@@ -154,7 +154,7 @@ int TCLCommand::parse_cmds_from_file(const TCHAR* file_name, std::vector<Command
                 cp.nOption = CMDOPT_Set;
 
             parse_pair_key(value, multicode, _T("returnParam"));
-            cp.bMulticode = !_tcsicmp(value.c_str(), _T("true")) ? true : false;
+            cp.returnParam = !_tcsicmp(value.c_str(), _T("true")) ? true : false;
 
             parse_pair_key(value, read_wait_time, _T("readWaitTime"));
             cp.read_wait_time = pares_time_value(value.c_str());
@@ -249,7 +249,7 @@ void TCLCommand::parse_cmds_from_string(std::string str, std::vector<CommandPara
                 cp.nOption = CMDOPT_Set;
 
             parse_pair_key(value, multicode, _T("returnParam"));
-            cp.bMulticode = !_tcsicmp(value.c_str(), _T("true")) ? true : false;
+            cp.returnParam = !_tcsicmp(value.c_str(), _T("true")) ? true : false;
 
             parse_pair_key(value, read_wait_time, _T("readWaitTime"));
             cp.read_wait_time = pares_time_value(value.c_str());
@@ -395,7 +395,7 @@ bool TCLCommand::TheSecondPart(CommandParam& cmdPara, std::string data)
 
         // 返回的数据;
         ++nDataPos;// 返回码占一字节;
-        if (cmdPara.bMulticode) {
+        if (cmdPara.returnParam) {
             if (_tcsicmp(cmdPara.param.c_str(), utils::ByteToChars((byte)data[nDataPos]).c_str()) != 0) {
 #if _MSC_VER >= 1200 && _MSC_VER < 1500
 				cmdPara._rtnError = utils::_dprintf(_T("返回的指令参数错误, %s, %02X"), cmdPara.param.c_str(), (byte)data[nDataPos]);

+ 3 - 3
TCLCommand/TCLCommand/CommandParam.h

@@ -16,7 +16,7 @@ typedef struct __CMDPARAM__ {
     // 1=Get,返回一段或两段数据包(成功时返回2段,失败时返回1段);
     // 2=Set,返回一段或两段数据包(成功时返回1段,失败时返回1段);
     int nOption;
-    bool bMulticode;        // 命令码是否多参数;
+    bool returnParam;        // 命令码是否多参数;
     int cmd_wait_time;        // 两条串口指令间隔时间;
     int read_wait_time;        // 写完串口后,等待多久读;
     byte _rtnCode;
@@ -45,7 +45,7 @@ typedef struct __CMDPARAM__ {
             code = cls.code;
             param = cls.param;
             nOption = cls.nOption;
-            bMulticode = cls.bMulticode;
+            returnParam = cls.returnParam;
             cmd_wait_time = cls.cmd_wait_time;
             read_wait_time = cls.read_wait_time;
             _rtnCode = cls._rtnCode;
@@ -79,7 +79,7 @@ typedef struct __CMDPARAM__ {
         _rtnCode = 0;
         _rtnStatus = 0;
         nOption = 0;
-        bMulticode = false;
+        returnParam = false;
         cmd_wait_time = 100;
         read_wait_time = 100;
     }