Fix bug where multiple threads modify same variable at the same time. Perform some refactoring
This commit is contained in:
@@ -1,28 +1,23 @@
|
||||
using Raytheon.Instruments.PowerSupply;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProgramLib
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Stores voltage and current reading
|
||||
/// </summary>
|
||||
internal class PowerSupplyData
|
||||
{
|
||||
public double _voltage;
|
||||
public double _current;
|
||||
public PowerSupplyModuleInfo _powerSupplyModuleInfo;
|
||||
public bool _initialized;
|
||||
public double Voltage { get; set; }
|
||||
public double Current { get; set; }
|
||||
public PowerSupplyModuleInfo PowerSupplyModuleInfo { get; set; }
|
||||
public bool Initialized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set data to unitialized
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
_initialized = false;
|
||||
Initialized = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user