public override bool Init(DeviceDescriptor deviceDescriptor) { StillImageDevice = new StillImageDevice(deviceDescriptor.WpdId); StillImageDevice.ConnectToDevice(AppName, AppMajorVersionNumber, AppMinorVersionNumber); StillImageDevice.DeviceEvent += StillImageDevice_DeviceEvent; IsConnected = true; return true; }
public override bool Init(DeviceDescriptor deviceDescriptor) { StillImageDevice = new StillImageDevice(deviceDescriptor.WpdId); StillImageDevice.ConnectToDevice(AppName, AppMajorVersionNumber, AppMinorVersionNumber); StillImageDevice.DeviceEvent += _stillImageDevice_DeviceEvent; DeviceName = StillImageDevice.Model; Manufacturer = StillImageDevice.Manufacturer; Capabilities.Add(CapabilityEnum.Bulb); Capabilities.Add(CapabilityEnum.LiveView); InitShutterSpeed(); IsConnected = true; ExecuteWithNoData(CONST_CMD_CANON_EOS_SetRemoteMode, 1); ExecuteWithNoData(CONST_CMD_CANON_EOS_SetEventMode, 1); _timer.Start(); return true; }
public override bool Init(DeviceDescriptor deviceDescriptor) { try { IsBusy = true; Capabilities.Add(CapabilityEnum.CaptureInRam); Capabilities.Add(CapabilityEnum.CaptureNoAf); StillImageDevice = new StillImageDevice(deviceDescriptor.WpdId); StillImageDevice.ConnectToDevice(AppName, AppMajorVersionNumber, AppMinorVersionNumber); StillImageDevice.DeviceEvent += _stillImageDevice_DeviceEvent; HaveLiveView = true; DeviceReady(); DeviceName = StillImageDevice.Model; Manufacturer = StillImageDevice.Manufacturer; IsConnected = true; CaptureInSdRam = true; PropertyChanged += NikonBase_PropertyChanged; var ser = StillImageDevice.SerialNumber; if (ser != null && ser.Length >= 7) { SerialNumber = StillImageDevice.SerialNumber.Substring(0, 7); } // load advanced properties in a separated thread to speed up camera connection var thread = new Thread(LoadProperties) {Priority = ThreadPriority.Lowest}; thread.Start(); } catch (Exception exception) { Log.Error("Error initialize device", exception); } return true; }