| | |
| | | PHM6000Profiler.RegisterAcquisitionCompletedCallback(_cameraHandle, _acquisitionCompletedCallback, new IntPtr()); |
| | | |
| | | // 强制应用当前配置(确保触发模式等参数正确,避免相机处于未知状态) |
| | | UpdateSensorConfig(_sensorConfig); |
| | | //UpdateSensorConfig(_sensorConfig); |
| | | |
| | | AsyncLogHelper.Info($"LBCamera[{SN}]: Connected and initialized successfully (Manual Data Mode)"); |
| | | |
| | |
| | | |
| | | private void CreateAndFireBitmap() |
| | | { |
| | | if (!isProcess.Equals("0") && !_isProcess) |
| | | { |
| | | _isProcess = true; |
| | | } |
| | | Bitmap bmp = null; |
| | | BitmapData bmpData = null; |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!isProcess.Equals("0") && _isProcess) |
| | | { |
| | | _isProcess = false; |
| | | } |
| | | // 关键:事件传递克隆对象,绝对安全,不传递原资源 |
| | | using (Bitmap clone = (Bitmap)bitmap.Clone()) |
| | | { |
| | |
| | | // 触发模式判断 |
| | | if (GetTriggerMode(out TriggerMode mode, out TriggerSource source)) |
| | | { |
| | | if (mode == TriggerMode.On && source != TriggerSource.Software) |
| | | if (mode == TriggerMode.On && source != TriggerSource.Software && (isProcess.Equals("0") || !_isProcess)) |
| | | { |
| | | TriggerRunMessageReceived?.Invoke(SN, source.ToString()); |
| | | AsyncLogHelper.Info($"LBCamera[{SN}]: 硬触发事件 - {source}"); |