Ejemplo n.º 1
0
 public void SetDeviceFilter(EDeviceModel deviceModel)
 {
     deviceFilter = deviceModel;
     deviceAdapter.SetConnections(service.GetConnectionsOfModel(deviceModel));
     if (rig != null && deviceModel.AsRigType() != rig.rigType)
     {
         rig.Disconnect();
         rig = null;
     }
 }
Ejemplo n.º 2
0
        public override void OnRigFound(IRig newRig)
        {
            base.OnRigFound(newRig);

            if (rig == null)
            {
                if (newRig.rigType == deviceFilter.AsRigType())
                {
                    rig = newRig;
                }                 // Else the rig doen't match and we should ignore it
            }
            else
            {
                // Check if the old rig doesn't match the device filter.
                if (rig.rigType != deviceFilter.AsRigType())
                {
                    rig = null;
                    if (newRig.rigType == deviceFilter.AsRigType())
                    {
                        rig = newRig;
                    }
                }                 // Else we already have a rig of the proper type.
            }
        }