bool GPhotoCCD::initProperties() { // Init parent properties first INDI::CCD::initProperties(); initFocuserProperties(getDeviceName(), FOCUS_TAB); IUFillText(&mPortT[0], "PORT" , "Port", ""); IUFillTextVector(&PortTP, mPortT, NARRAY(mPortT), getDeviceName(), "DEVICE_PORT" , "Shutter Release", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE); IUFillNumber(&mMirrorLockN[0], "MIRROR_LOCK_SECONDS" , "Seconds", "%1.0f", 0, 10, 1, 0); IUFillNumberVector(&mMirrorLockNP, mMirrorLockN, 1, getDeviceName(), "MIRROR_LOCK" , "Mirror Lock", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); //We don't know how many items will be in the switch yet IUFillSwitchVector(&mIsoSP, NULL, 0, getDeviceName(), "CCD_ISO", "ISO", IMAGE_SETTINGS_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); IUFillSwitchVector(&mFormatSP, NULL, 0, getDeviceName(), "CAPTURE_FORMAT", "Capture Format", IMAGE_SETTINGS_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); IUFillSwitch(&autoFocusS[0], "Set", "", ISS_OFF); IUFillSwitchVector(&autoFocusSP, autoFocusS, 1, getDeviceName(), "Auto Focus", "", FOCUS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); IUFillSwitch(&transferFormatS[0], "FITS", "", ISS_ON); IUFillSwitch(&transferFormatS[1], "Native", "", ISS_OFF); IUFillSwitchVector(&transferFormatSP, transferFormatS, 2, getDeviceName(), "Transfer Format", "", IMAGE_SETTINGS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); IUFillSwitch(&livePreviewS[0], "Enable", "", ISS_OFF); IUFillSwitch(&livePreviewS[1], "Disable", "", ISS_ON); IUFillSwitchVector(&livePreviewSP, livePreviewS, 2, getDeviceName(), "VIDEO_STREAM", "Preview", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); PrimaryCCD.setMinMaxStep("CCD_EXPOSURE", "CCD_EXPOSURE_VALUE", 0.001, 3600, 1, false); // Most cameras have this by default, so let's set it as default. IUSaveText(&BayerT[2], "RGGB"); SetCCDCapability(CCD_CAN_SUBFRAME | CCD_HAS_BAYER); SetFocuserCapability(FOCUSER_HAS_VARIABLE_SPEED); FocusSpeedN[0].min=0; FocusSpeedN[0].max=3; FocusSpeedN[0].step=1; FocusSpeedN[0].value=1; /* JM 2014-05-20 Make PrimaryCCD.ImagePixelSizeNP writable since we can't know for now the pixel size and bit depth from gphoto */ PrimaryCCD.getCCDInfo()->p = IP_RW; setDriverInterface(getDriverInterface() | FOCUSER_INTERFACE); gphoto_set_debug(getDeviceName()); gphoto_read_set_debug(getDeviceName()); return true; }
void GPhotoCCD::debugTriggered(bool enable) { gphoto_set_debug(enable ? 1 : 0); gphoto_read_set_debug(enable ? 1 : 0); }