Minor changes

This commit is contained in:
Duc
2025-01-06 11:29:57 -07:00
parent d8d73197a9
commit c689fcb7f9
6 changed files with 22 additions and 28 deletions

View File

@@ -131,7 +131,6 @@ namespace ProgramLib
EventGroup<Events, EventWaitHandle> eventGroup = new EventGroup<Events, EventWaitHandle>(eventDict);
Random rnd = new Random();
while (true)
{
Events id = eventGroup.WaitAny(pollRateMs);
@@ -140,7 +139,7 @@ namespace ProgramLib
{
PowerSupplyData data = Program.Instance()._powerSupplySharedData.GetData(PowerSupplyConstants.POWER_DEVICE.STE_PVM_5V.ToString());
if (data._initialized)
if (data != null && data._initialized)
{
_powerModuleToPowerDataModelDict["UUT_P20V"].ActualVoltage = data._voltage.ToString("0.00");
_powerModuleToPowerDataModelDict["UUT_P20V"].ExpectedVoltage = data._powerSupplyModuleInfo.voltageSetpoint_.ToString("0.00");