瀏覽代碼

解决G客户FireTV:切了pid后devicecode变化了,会使用上一个pid的devicecode的dsn来抄写的Bug。

Jeff Wang 3 年之前
父節點
當前提交
3d07fc9c64
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      FactoryTool_CShare/Views/OperationPanel.cs

+ 8 - 0
FactoryTool_CShare/Views/OperationPanel.cs

@@ -4810,6 +4810,14 @@ namespace MOKA_Factory_Tools
                             string psn = keyInfo._PSN.data = Encoding.ASCII.GetString(data_psn);
                             if (CommonMethod.GetFireTVDsn(midListNow.host, orderNow, Encoding.ASCII.GetString(data), SN, psn, out string dsn, out error_psn, errorDBNow))
                             {
+                                // 预防切了pid后,deviceCode变化了;
+                                if ( dsn.IndexOf(devicecode) == -1 )
+                                {
+                                    ErrMsg = string.Format("The device code [{0}] is not included in the DSN [{1}]!\r\n", devicecode, dsn);
+                                    Log.WriteErrorLog(ErrMsg);
+                                    goto end;
+                                }
+
                                 keyInfo.DSN.data = dsn;
                                 if (!CommonMethod.IsNumberAndWord(keyInfo.DSN.data))
                                 {