*** gphoto_driver.cpp,original 2016-10-21 11:29:17.793875060 +0200 --- gphoto_driver.cpp 2016-10-20 18:19:03.089383358 +0200 *************** *** 610,615 **** --- 610,631 ---- } // TODO add support for remote serial shutter and other camera types + //BEGIN CAS + if (gphoto->bulb_port[0]) { + DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Locking mirror by opening remote serial shutter port: %s ...", gphoto->bulb_port); + gphoto->bulb_fd = open(gphoto->bulb_port, O_RDWR, O_NONBLOCK); + if(gphoto->bulb_fd < 0) { + DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Failed to open serial port: %s", gphoto->bulb_port); + //pthread_mutex_unlock(&gphoto->mutex); + return -1; + } + usleep(20000); + close(gphoto->bulb_fd); + gphoto->bulb_fd = -1; + usleep(msec*1000 - 20000); + return 0; + } + //END CAS // Otherwise fail gracefully DEBUGDEVICE(device, INDI::Logger::DBG_ERROR,"Mirror lock feature is not yet implemented for this camera model."); *************** *** 651,657 **** //if (exptime_msec > 5000 || (gphoto->autoexposuremode_widget != NULL && gphoto->autoexposuremode_widget->value.index == 4)) // If exposure time is more than 1 second AND we have BULB widget OR we have bulb in exposure widget then do bulb ! if ((exptime_msec > 1000) && ( (gphoto->bulb_port[0]) || (gphoto->bulb_widget != NULL)) ) { //Bulb mode is supported --- 667,673 ---- //if (exptime_msec > 5000 || (gphoto->autoexposuremode_widget != NULL && gphoto->autoexposuremode_widget->value.index == 4)) // If exposure time is more than 1 second AND we have BULB widget OR we have bulb in exposure widget then do bulb ! if ( /*CAS: (exptime_msec > 1000) &&*/ ( (gphoto->bulb_port[0]) || (gphoto->bulb_widget != NULL)) ) { //Bulb mode is supported