Esempio n. 1
0
        public void StopBulbCapture()
        {
            // Terminate capture
            NkMAIDTerminateCapture terminate = new NkMAIDTerminateCapture();

            terminate.ulParameter1 = 0;
            terminate.ulParameter2 = 0;

            unsafe
            {
                IntPtr terminatePointer = new IntPtr(&terminate);

                Start(
                    eNkMAIDCapability.kNkMAIDCapability_TerminateCapture,
                    eNkMAIDDataType.kNkMAIDDataType_GenericPtr,
                    terminatePointer);
            }

            // Restore original shutter speed
            NikonEnum shutterSpeed = GetEnum(eNkMAIDCapability.kNkMAIDCapability_ShutterSpeed);

            shutterSpeed.Index = _bulbCaptureShutterSpeedBackup;
            SetEnum(eNkMAIDCapability.kNkMAIDCapability_ShutterSpeed, shutterSpeed);

            // Unlock camera
            SetBoolean(
                eNkMAIDCapability.kNkMAIDCapability_LockCamera,
                false);
        }
Esempio n. 2
0
        public void StopBulbCapture()
        {
            // Terminate capture
            NkMAIDTerminateCapture terminate = new NkMAIDTerminateCapture();
            terminate.ulParameter1 = 0;
            terminate.ulParameter2 = 0;

            unsafe
            {
                IntPtr terminatePointer = new IntPtr(&terminate);

                Start(
                    eNkMAIDCapability.kNkMAIDCapability_TerminateCapture,
                    eNkMAIDDataType.kNkMAIDDataType_GenericPtr,
                    terminatePointer.ToInt32());
            }

            // Restore original shutter speed
            NikonEnum shutterSpeed = GetEnum(eNkMAIDCapability.kNkMAIDCapability_ShutterSpeed);
            shutterSpeed.Index = _bulbCaptureShutterSpeedBackup;
            SetEnum(eNkMAIDCapability.kNkMAIDCapability_ShutterSpeed, shutterSpeed);

            // Unlock camera
            SetBoolean(
                eNkMAIDCapability.kNkMAIDCapability_LockCamera,
                false);
        }