Upgraded to latest premium SDK and now I have problem with follwing code
private void TriggerThread()
{
try
{
while (true)
{
if (_pollEnable)
{
// Poll the trigger input
_fireEventSignal.WaitOne(50, false);
}
else
{
_fireEventSignal.WaitOne();
}
if (Trigger != null)
{
if (_triggerPin.Read())
{
if (_highRequest != null && _lastState != 1)
{
Trigger(_highRequest);
}
_lastState = 1;
}
else
{
if (_lowRequest != null && _lastState != 0)
{
Trigger(_lowRequest);
}
_lastState = 0;
}
}
}
}
catch (Exception ex)
{
Log.LogHandler.LogException(ex);
}
finally
{
if (_fireEventSignal != null)
_triggerPin.EnableInterrupt();
}
}
Problem is that _fireEventSignal.WaitOne() will freeze the main thread which started the TriggerThread method.
_triggerThread.Start();
I didn’t have this problem in 4.1.