mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Fixes CEvent in InitializeSystem() to properly wait for initialization until all devices are registered, if the system is a DMPS. This fixes an issue where HDBaseT type endpoints were not working on a DMPS3 non-4K unit.
This commit is contained in:
@@ -46,28 +46,29 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void InitializeSystem()
|
public override void InitializeSystem()
|
||||||
{
|
{
|
||||||
_startTimer = new CTimer(StartSystem,StartupTime);
|
|
||||||
|
|
||||||
|
|
||||||
// If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate
|
// If the control system is a DMPS type, we need to wait to exit this method until all devices have had time to activate
|
||||||
// to allow any HD-BaseT DM endpoints to register first.
|
// to allow any HD-BaseT DM endpoints to register first.
|
||||||
if (Global.ControlSystemIsDmpsType)
|
bool preventInitializationComplete = Global.ControlSystemIsDmpsType;
|
||||||
|
if (preventInitializationComplete)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "******************* InitializeSystem() Entering **********************");
|
Debug.Console(1, "******************* InitializeSystem() Entering **********************");
|
||||||
|
_startTimer = new CTimer(StartSystem, preventInitializationComplete, StartupTime);
|
||||||
_initializeEvent = new CEvent();
|
_initializeEvent = new CEvent(true, false);
|
||||||
|
|
||||||
DeviceManager.AllDevicesRegistered += (o, a) =>
|
DeviceManager.AllDevicesRegistered += (o, a) =>
|
||||||
{
|
{
|
||||||
_initializeEvent.Set();
|
_initializeEvent.Set();
|
||||||
Debug.Console(1, "******************* InitializeSystem() Exiting **********************");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_initializeEvent.Wait(30000);
|
_initializeEvent.Wait(30000);
|
||||||
|
Debug.Console(1, "******************* InitializeSystem() Exiting **********************");
|
||||||
|
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_startTimer = new CTimer(StartSystem, preventInitializationComplete, StartupTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartSystem(object obj)
|
private void StartSystem(object preventInitialization)
|
||||||
{
|
{
|
||||||
DeterminePlatform();
|
DeterminePlatform();
|
||||||
|
|
||||||
@@ -124,7 +125,10 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
if (!(bool)preventInitialization)
|
||||||
|
{
|
||||||
|
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user