Bug fixes : (1) UniCB timing after a delay in worker thread (DB request), (2) Scales.MettlerToledo.ScaleCfg, ver. 3.1.1806
This commit is contained in:
parent
335fce3e39
commit
51b3e994c3
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.1.1805.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1805.0")]
|
||||
[assembly: AssemblyVersion("3.1.1806.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1806.0")]
|
||||
|
||||
@ -472,14 +472,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// </summary>
|
||||
public void RunDeviceAfter()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
if (now < lastSentTime + TimeSpan.FromSeconds(0.7) ||
|
||||
(lastReceivedTime < lastSentTime && now < lastSentTime + TimeSpan.FromSeconds(1.7)))
|
||||
{
|
||||
log.Error("RunDeviceAfter() ... skipping too early write of a serial command or a data requect");
|
||||
return;
|
||||
}
|
||||
|
||||
///
|
||||
/// Combine data from the current route and from UI
|
||||
///
|
||||
|
||||
@ -277,6 +277,7 @@ namespace TBF.Rig.Scales.MettlerToledo
|
||||
if (Utils.TryParseUFloat(strValue, out fdummy)) return true;
|
||||
break;
|
||||
case 13: /// Evaporation
|
||||
return true;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
|
||||
@ -836,7 +836,10 @@ namespace TBF.Rig
|
||||
/// <returns>true when interrupted by 'quitStateMachine', otherwise false</returns>
|
||||
public static void WaitNextTick()
|
||||
{
|
||||
currentTimeSec += Period;
|
||||
int currentTimeSecFromClock = Convert.ToInt32(Math.Round((DateTime.Now - startDateTime).TotalSeconds - 0.2));
|
||||
|
||||
currentTimeSec = Math.Max(currentTimeSec, currentTimeSecFromClock) + Period;
|
||||
|
||||
DateTime nextTickDateTime = startDateTime + TimeSpan.FromSeconds(currentTimeSec);
|
||||
|
||||
while (DateTime.Now < nextTickDateTime)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user