diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 8ffa2143a..53099d64d 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("3.1.1641.0")] -[assembly: AssemblyFileVersion("3.1.1641.0")] +[assembly: AssemblyVersion("3.1.1642.0")] +[assembly: AssemblyFileVersion("3.1.1642.0")] diff --git a/TBF/Rig/ControlBoard/Uni/UniCB.cs b/TBF/Rig/ControlBoard/Uni/UniCB.cs index d5e71a639..087ef7c7a 100644 --- a/TBF/Rig/ControlBoard/Uni/UniCB.cs +++ b/TBF/Rig/ControlBoard/Uni/UniCB.cs @@ -246,6 +246,7 @@ namespace TBF.Rig.ControlBoard.Uni /// /// Read data from the control board /// + bool generalDataReceived = false; if (cbCfg.DebugLevel == DebugMode.Normal && serialPort != null && serialPort.IsOpen) { /// Read new received bytes and append them to a buffer @@ -285,6 +286,7 @@ namespace TBF.Rig.ControlBoard.Uni else if (GeneralData.FrameFitsData(rcvdData, cumulativeSums, rcvdBytesCount, offset)) { /// Regular data received + generalDataReceived = true; Data.UpdateData(rcvdData, offset); msg = Telegram.LogTelegram("General data ", rcvdData, offset, GeneralData.MessageLen); offset += GeneralData.MessageLen; @@ -335,7 +337,7 @@ namespace TBF.Rig.ControlBoard.Uni /// lock (this) { - route = (UInt128)(Data.Vystupy ^ valvesToInvert); + if (generalDataReceived) route = (UInt128)(Data.Vystupy ^ valvesToInvert); /// if (!IsUIBlocked && bitsChangedByUI != 0) { @@ -377,7 +379,7 @@ namespace TBF.Rig.ControlBoard.Uni { DateTime now = DateTime.Now; if (now < lastSentTime + TimeSpan.FromSeconds(0.8) || - (lastReceivedTime < lastSentTime && now < lastSentTime + TimeSpan.FromSeconds(2.5))) + (lastReceivedTime < lastSentTime && now < lastSentTime + TimeSpan.FromSeconds(1.7))) { log.Error("RunDeviceAfter() ... skipping too early write of a serial command or a data requect"); return;