Fix bug where multiple threads modify same variable at the same time. Perform some refactoring

This commit is contained in:
Duc
2025-03-13 14:40:58 -07:00
parent ffa9905494
commit 492cbb9cd9
10 changed files with 84 additions and 102 deletions

View File

@@ -15,21 +15,11 @@ GOVERNMENT.
UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
-------------------------------------------------------------------------*/
using Raytheon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Raytheon.Instruments;
using Raytheon.Common;
using NLog;
using System.Windows.Interop;
using ProgramLib;
using NationalInstruments.TestStand.Interop.API;
using System.Runtime.ExceptionServices;
using MeasurementManagerLib;
using Raytheon.Instruments;
namespace ProgramLib
{
@@ -41,7 +31,7 @@ namespace ProgramLib
private ProgramGuiManager _guiManager = null;
internal bool _isUutPwrOn = false;
internal PowerSupplySharedData _powerSupplySharedData = new PowerSupplySharedData();
internal PowerSupplySharedData PowerSupplySharedData { get; set; }
/// <summary>
/// Initialize power supply measurement manager
@@ -52,6 +42,7 @@ namespace ProgramLib
{
try
{
PowerSupplySharedData = new PowerSupplySharedData();
MalMeasurementLibManager.InitializePowerSupplyMeasurementManager();
}
catch (Exception ex)