Pārlūkot izejas kodu

墨西哥G客户增加抄写前先检查projectID

chenjiangqun 2 gadi atpakaļ
vecāks
revīzija
daa417b766
1 mainītis faili ar 25 papildinājumiem un 0 dzēšanām
  1. 25 0
      FactoryTool_CShare/Views/OperationPanel.cs

+ 25 - 0
FactoryTool_CShare/Views/OperationPanel.cs

@@ -2329,6 +2329,31 @@ namespace MOKA_Factory_Tools
                     if (midListNow.keytype.ContainsKey("DSN"))
                     {
 #if !SIMULATION && !OD_VER
+                        // 墨西哥G客户Pid检测;
+                        if (FunctionSettingNow.Mexican_NTF)
+                        {
+                            if(cfg_readcheck.PIDReadcheck)
+                            {
+                                // 读取pid
+                                if (SerialCMD.GetProjectID(TVPort, out result, out data, out error, SerailDelay))
+                                {
+                                    int readpid = CommonMethod.BytelisttoInt(data);
+                                    //比较
+                                    if (readpid.ToString() != ProjectIDText.Text)
+                                    {
+                                        ErrMsg = string.Format("{0} contrast projectID fail", SN);
+                                        Log.WriteErrorLog("get projectID:" + readpid.ToString() + "TEXT projectID:" + ProjectIDText.Text);
+                                        goto end;
+                                    }
+                                }
+                                else
+                                {
+                                    ErrMsg = string.Format("{0} Failed to get projectID before writing", SN);
+                                    goto end;
+                                }
+                            }                                                                                                    
+                        }
+
                         // 读取dvicecode
                         if (SerialCMD.GetFireTVDevcieCode(TVPort, out result, out data, out error, SerailDelay))
                         {