private void MibCheck(int cueId, ILogicalDevice device)
{
//FIXME: Doesn't check for bounce/loop
var brightnessDevice = device as IReceivesBrightness;
if (brightnessDevice == null)
return;
if (brightnessDevice.Brightness > 0)
// Not black
return;
for (int i = cueId + 1; i < this.cues.Count; i++)
{
var cue = this.cues[i];
var panTiltDevice = device as IReceivesPanTilt;
bool moved = false;
if (panTiltDevice != null)
{
if (cue.PartPan != null && cue.PartPan.MoveInBlack)
{
GetControlledObserverPan(panTiltDevice).OnNext(cue.PartPan.Destination);
moved = true;
}
if (cue.PartTilt != null && cue.PartTilt.MoveInBlack)
{
GetControlledObserverTilt(panTiltDevice).OnNext(cue.PartTilt.Destination);
moved = true;
}
}
if (moved)
break;
}
}