diff --git a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/FormISP_MSI.cs b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/FormISP_MSI.cs index aacfc56..b240c98 100644 --- a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/FormISP_MSI.cs +++ b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/FormISP_MSI.cs @@ -77,6 +77,7 @@ namespace WinISP private const byte MS_GET_BOARD_NAME = 0x45; private const byte MS_GET_FW_VERSION = 0x47; private string _fwVersionFromDDC = String.Empty; + private bool _suppressSendFileFailMessage = false; object _lockObj = new object(); int _numberOfMonitors; int _lastNumOfMonitors = 0; @@ -1656,6 +1657,10 @@ namespace WinISP frmISP.WriteLog("binFilePath is NULL", "debug"); return; } + bool suppressSendFileFail = _suppressSendFileFailMessage; + _suppressSendFileFailMessage = false; + if (suppressSendFileFail) + SetStatusMsg("Ready"); frmISP.WriteLog("Start ISP", "debug"); //int totalFailCnt1 = 0; int failCnt = 0; @@ -1894,8 +1899,16 @@ namespace WinISP //bypass empty sector if (SetSentInfo(sentLen + _flashSectorSize) == false) { - SetStatusMsg("Send file fail."); - SetISPStatus(false, "Send file fail."); + if (!suppressSendFileFail) + { + SetStatusMsg("Send file fail."); + SetISPStatus(false, "Send file fail."); + } + else + { + SetISPStatus(false); + } + _suppressSendFileFailMessage = true; return; } checkSum = 0; @@ -1909,8 +1922,16 @@ namespace WinISP //bypass empty sector if (SetSentInfo(sentLen + _flashSectorSize) == false) { - SetStatusMsg("Send file fail."); - SetISPStatus(false, "Send file fail."); + if (!suppressSendFileFail) + { + SetStatusMsg("Send file fail."); + SetISPStatus(false, "Send file fail."); + } + else + { + SetISPStatus(false); + } + _suppressSendFileFailMessage = true; return; } checkSum = 0; @@ -1961,15 +1982,31 @@ namespace WinISP //reset sent info if (SetSentInfo(sentLen) == false) { - SetStatusMsg("Send file fail."); - SetISPStatus(false, "Send file fail."); + if (!suppressSendFileFail) + { + SetStatusMsg("Send file fail."); + SetISPStatus(false, "Send file fail."); + } + else + { + SetISPStatus(false); + } + _suppressSendFileFailMessage = true; return; } if (retryCnt > MaxRetryCnt) { - SetStatusMsg("Send file fail."); - SetISPStatus(false, "Send file fail."); + if (!suppressSendFileFail) + { + SetStatusMsg("Send file fail."); + SetISPStatus(false, "Send file fail."); + } + else + { + SetISPStatus(false); + } + _suppressSendFileFailMessage = true; return; } }