From 39fbf5570c30a0484925dfe92f103d5c6eda7aeb Mon Sep 17 00:00:00 2001 From: chenjiangqun Date: Wed, 13 May 2026 14:47:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=A5=E5=8D=87=E7=BA=A7=E8=BF=87=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=E5=A4=B1=E8=B4=A5=EF=BC=8C=E5=88=99=E4=B8=8B=E6=AC=A1?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E9=87=8D=E7=BD=AE=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WinISP/FormISP_MSI.cs | 53 ++++++++++++++++--- 1 file changed, 45 insertions(+), 8 deletions(-) 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; } }