Commit 631cfd9f01197d95bb48516021fe5c9694157e97

Authored by Echo
1 parent 3ef61614

两个IMEI都写了是PASS,其它情况都是FAIL

@@ -100,6 +100,7 @@ void SmartPhoneSN::SPInit() @@ -100,6 +100,7 @@ void SmartPhoneSN::SPInit()
100 } 100 }
101 } 101 }
102 102
  103 +#if 0
103 int SmartPhoneSN::getLastIMEIdigit(CString strIMEI) 104 int SmartPhoneSN::getLastIMEIdigit(CString strIMEI)
104 { 105 {
105 int imei1 = (strIMEI[0]-'0'); 106 int imei1 = (strIMEI[0]-'0');
@@ -141,7 +142,7 @@ int SmartPhoneSN::getLastIMEIdigit(CString strIMEI) @@ -141,7 +142,7 @@ int SmartPhoneSN::getLastIMEIdigit(CString strIMEI)
141 142
142 return (10 - ret % 10) % 10; 143 return (10 - ret % 10) % 10;
143 } 144 }
144 - 145 +#endif
145 146
146 META_RESULT SmartPhoneSN::WriteNvramLoop() 147 META_RESULT SmartPhoneSN::WriteNvramLoop()
147 { 148 {
@@ -262,8 +263,8 @@ META_RESULT SmartPhoneSN::WriteNvramLoop() @@ -262,8 +263,8 @@ META_RESULT SmartPhoneSN::WriteNvramLoop()
262 char a_imei_ary2[16]; 263 char a_imei_ary2[16];
263 char tmpBuf1[20] = {0}; 264 char tmpBuf1[20] = {0};
264 char tmpBuf2[20] = {0}; 265 char tmpBuf2[20] = {0};
265 - CString IMEI1_validity;  
266 - CString IMEI2_validity; 266 + // CString IMEI1_validity;
  267 + // CString IMEI2_validity;
267 268
268 iRet = REQ_ReadModem_NVRAM_Start(WRITE_IMEI, tmpBuf1, 1); 269 iRet = REQ_ReadModem_NVRAM_Start(WRITE_IMEI, tmpBuf1, 1);
269 iRet2 = REQ_ReadModem_NVRAM_Start(WRITE_IMEI, tmpBuf2, 2); 270 iRet2 = REQ_ReadModem_NVRAM_Start(WRITE_IMEI, tmpBuf2, 2);
@@ -292,49 +293,21 @@ META_RESULT SmartPhoneSN::WriteNvramLoop() @@ -292,49 +293,21 @@ META_RESULT SmartPhoneSN::WriteNvramLoop()
292 a_imei_ary[15] = 0; 293 a_imei_ary[15] = 0;
293 a_imei_ary2[15] = 0; 294 a_imei_ary2[15] = 0;
294 295
295 - if(iRet == META_SUCCESS) 296 + if(iRet == META_SUCCESS && iRet2 == META_SUCCESS)
296 { 297 {
297 - if((a_imei_ary[14]-'0') == getLastIMEIdigit(CString(a_imei_ary)))  
298 - {  
299 - IMEI1_validity = _T("PASS");  
300 - }  
301 - else  
302 - {  
303 - IMEI1_validity = _T("Fail");  
304 - } 298 + g_pMainDlg->GetDlgItem(IDC_RSLT_WRITE_IMEI)->SetWindowText("PASS");
  299 + UpdateUIMsg("IMEI read success!!!");
305 } 300 }
306 else 301 else
307 { 302 {
308 - IMEI1_validity = _T("UnTested");;  
309 - }  
310 -  
311 - if(iRet2 == META_SUCCESS )  
312 - {  
313 - if((a_imei_ary2[14]-'0') ==getLastIMEIdigit(CString(a_imei_ary2)))  
314 - {  
315 - IMEI2_validity = _T("PASS");  
316 - }  
317 - else  
318 - {  
319 - IMEI2_validity = _T("Fail");  
320 - }  
321 - }  
322 - else  
323 - {  
324 - IMEI2_validity = _T("UnTested");; 303 + g_pMainDlg->GetDlgItem(IDC_RSLT_WRITE_IMEI)->SetWindowText("Fail");
  304 + UpdateUIMsg("IMEI read fail");
325 } 305 }
326 -  
327 - g_pMainDlg->GetDlgItem(IDC_RSLT_WRITE_IMEI)->SetWindowText(IMEI1_validity+","+IMEI2_validity);  
328 306
329 307
330 // UpdateUIMsg("IMEI read success!!!"); 308 // UpdateUIMsg("IMEI read success!!!");
331 spNextStage = SP_END_STAGE; 309 spNextStage = SP_END_STAGE;
332 } 310 }
333 - else if (iRet == META_FAILED && iRet2 == META_FAILED)  
334 - {  
335 - g_pMainDlg->GetDlgItem(IDC_RSLT_WRITE_IMEI)->SetWindowText("UnTested,UnTested");  
336 - spNextStage = SP_END_STAGE;  
337 - }  
338 else 311 else
339 { 312 {
340 g_pMainDlg->GetDlgItem(IDC_RSLT_WRITE_IMEI)->SetWindowText("Fail"); 313 g_pMainDlg->GetDlgItem(IDC_RSLT_WRITE_IMEI)->SetWindowText("Fail");
@@ -66,7 +66,7 @@ protected: @@ -66,7 +66,7 @@ protected:
66 virtual META_RESULT SwitchMDByIndex(UINT MDIndex); 66 virtual META_RESULT SwitchMDByIndex(UINT MDIndex);
67 67
68 virtual int GetSPModemInfo_Ex(); 68 virtual int GetSPModemInfo_Ex();
69 - virtual int getLastIMEIdigit(CString strIMEI); 69 + //virtual int getLastIMEIdigit(CString strIMEI);
70 virtual SPMETA_DLL::META_RESULT QueryDBFromDUT(); 70 virtual SPMETA_DLL::META_RESULT QueryDBFromDUT();
71 virtual SPMETA_DLL::META_RESULT GetAPDBFromDUT(); 71 virtual SPMETA_DLL::META_RESULT GetAPDBFromDUT();
72 virtual SPMETA_DLL::META_RESULT GetMDDBFromDUT(); 72 virtual SPMETA_DLL::META_RESULT GetMDDBFromDUT();
Please register or login to post a comment