bool ScopeScript::initProperties() { INDI::Telescope::initProperties(); #if defined(__APPLE__) IUFillText(&ScriptsT[0], "FOLDER", "Folder", "/usr/local/share/indi/scripts"); #else IUFillText(&ScriptsT[0], "FOLDER", "Folder", "/usr/share/indi/scripts"); #endif IUFillText(&ScriptsT[SCRIPT_CONNECT], "SCRIPT_CONNECT", "Connect script", "connect.py"); IUFillText(&ScriptsT[SCRIPT_DISCONNECT], "SCRIPT_DISCONNECT", "Disconnect script", "disconnect.py"); IUFillText(&ScriptsT[SCRIPT_STATUS], "SCRIPT_STATUS", "Get status script", "status.py"); IUFillText(&ScriptsT[SCRIPT_GOTO], "SCRIPT_GOTO", "Goto script", "goto.py"); IUFillText(&ScriptsT[SCRIPT_SYNC], "SCRIPT_SYNC", "Sync script", "sync.py"); IUFillText(&ScriptsT[SCRIPT_PARK], "SCRIPT_PARK", "Park script", "park.py"); IUFillText(&ScriptsT[SCRIPT_UNPARK], "SCRIPT_UNPARK", "Unpark script", "unpark.py"); IUFillText(&ScriptsT[SCRIPT_MOVE_NORTH], "SCRIPT_MOVE_NORTH", "Move north script", "move_north.py"); IUFillText(&ScriptsT[SCRIPT_MOVE_EAST], "SCRIPT_MOVE_EAST", "Move east script", "move_east.py"); IUFillText(&ScriptsT[SCRIPT_MOVE_SOUTH], "SCRIPT_MOVE_SOUTH", "Move south script", "move_south.py"); IUFillText(&ScriptsT[SCRIPT_MOVE_WEST], "SCRIPT_MOVE_WEST", "Move west script", "move_west.py"); IUFillText(&ScriptsT[SCRIPT_ABORT], "SCRIPT_ABORT", "Abort motion script", "abort.py"); IUFillTextVector(&ScriptsTP, ScriptsT, SCRIPT_COUNT, getDefaultName(), "SCRIPTS", "Scripts", OPTIONS_TAB, IP_RW, 60, IPS_IDLE); addDebugControl(); setDriverInterface(getDriverInterface()); return true; }
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; }
bool QSICCD::initProperties() { // Init parent properties first INDI::CCD::initProperties(); IUFillSwitch(&CoolerS[0], "COOLER_ON", "ON", ISS_OFF); IUFillSwitch(&CoolerS[1], "COOLER_OFF", "OFF", ISS_ON); IUFillSwitchVector(&CoolerSP, CoolerS, 2, getDeviceName(), "CCD_COOLER", "Cooler", MAIN_CONTROL_TAB, IP_WO, ISR_1OFMANY, 0, IPS_IDLE); IUFillSwitch(&ShutterS[0], "SHUTTER_ON", "Manual open", ISS_OFF); IUFillSwitch(&ShutterS[1], "SHUTTER_OFF", "Manual close", ISS_OFF); IUFillSwitchVector(&ShutterSP, ShutterS, 2, getDeviceName(), "CCD_SHUTTER", "Shutter", MAIN_CONTROL_TAB, IP_WO, ISR_1OFMANY, 0, IPS_IDLE); IUFillNumber(&CoolerN[0], "CCD_COOLER_VALUE", "Cooling Power (%)", "%+06.2f", 0., 1., .2, 0.0); IUFillNumberVector(&CoolerNP, CoolerN, 1, getDeviceName(), "CCD_COOLER_POWER", "Cooling Power", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); IUFillSwitch(&ReadOutS[0], "QUALITY_HIGH", "High Quality", ISS_ON); IUFillSwitch(&ReadOutS[1], "QUALITY_LOW", "Fast", ISS_OFF); IUFillSwitchVector(&ReadOutSP, ReadOutS, 2, getDeviceName(), "READOUT_QUALITY", "Readout Speed", OPTIONS_TAB, IP_WO, ISR_1OFMANY, 0, IPS_IDLE); IUFillSwitch(&FilterS[0], "FILTER_CW", "+", ISS_OFF); IUFillSwitch(&FilterS[1], "FILTER_CCW", "-", ISS_OFF); IUFillSwitchVector(&FilterSP, FilterS, 2, getDeviceName(), "FILTER_WHEEL_MOTION", "Turn Wheel", FILTER_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); IUFillSwitch(&GainS[GAIN_HIGH], "High", "", ISS_ON); IUFillSwitch(&GainS[GAIN_LOW], "Low", "", ISS_OFF); IUFillSwitch(&GainS[GAIN_AUTO], "Auto", "", ISS_OFF); IUFillSwitchVector(&GainSP, GainS, 3, getDeviceName(), "Gain", "", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); IUFillSwitch(&FanS[0], "Off", "", ISS_OFF); IUFillSwitch(&FanS[1], "Quiet", "", ISS_OFF); IUFillSwitch(&FanS[2], "Full", "", ISS_ON); IUFillSwitchVector(&FanSP, FanS, 3, getDeviceName(), "Fan", "", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); IUFillSwitch(&ABS[0], "Normal", "", ISS_ON); IUFillSwitch(&ABS[1], "High", "", ISS_OFF); IUFillSwitchVector(&ABSP, ABS, 2, getDeviceName(), "AntiBlooming", "", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); INDI::FilterInterface::initProperties(FILTER_TAB); addDebugControl(); setDriverInterface(getDriverInterface() | FILTER_INTERFACE); return true; }
bool MICCD::initProperties() { INDI::CCD::initProperties(); INDI::FilterInterface::initProperties(FILTER_TAB); FilterSlotN[0].min = 1; FilterSlotN[0].max = numFilters; // Temp ram IUFillNumber(&TemperatureRampN[0], "TEMP_RAMP", "Max. dT (C/min)", "%2.0f", 0, 30, 1, 2); IUFillNumberVector(&TemperatureRampNP, TemperatureRampN, 1, getDeviceName(), "CCD_TEMP_RAMP", "Temp. Ramp", MAIN_CONTROL_TAB, IP_WO, 60, IPS_IDLE); // CCD Regulation power IUFillNumber(&CoolerN[0], "CCD_COOLER_VALUE", "Cooling Power (%)", "%+6.2f", 0.0, 1.0, 0.01, 0.0); IUFillNumberVector(&CoolerNP, CoolerN, 1, getDeviceName(), "CCD_COOLER_POWER", "Cooling Power", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); // CCD Fan IUFillNumber(&FanN[0], "FAN", "Fan speed", "%2.0f", 0, maxFanValue, 1, 0); IUFillNumberVector(&FanNP, FanN, 1, getDeviceName(), "CCD_FAN", "Fan", MAIN_CONTROL_TAB, IP_WO, 60, IPS_IDLE); // CCD Window heating IUFillNumber(&WindowHeatingN[0], "WINDOW_HEATING", "Heating Intensity", "%2.0f", 0, maxHeatingValue, 1, 0); IUFillNumberVector(&WindowHeatingNP, WindowHeatingN, 1, getDeviceName(), "CCD_WINDOW_HEATING", "Window Heating", MAIN_CONTROL_TAB, IP_WO, 60, IPS_IDLE); // CCD Gain IUFillNumber(&GainN[0], "GAIN", "Gain (e-/ADU)", "%2.2f", 0, 100, 1, 0); IUFillNumberVector(&GainNP, GainN, 1, getDeviceName(), "CCD_GAIN", "Gain", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); // Noise mode IUFillSwitch(&ReadModeS[0], "PREVIEW", "Preview", ISS_OFF); IUFillSwitch(&ReadModeS[1], "LOW_NOISE", "Low noise", numReadModes == 2 ? ISS_ON : ISS_OFF); IUFillSwitch(&ReadModeS[2], "ULTA_LOW_NOISE", "Ultra low noise", numReadModes == 3 ? ISS_ON : ISS_OFF); IUFillSwitchVector(&ReadModeSP, ReadModeS, numReadModes, getDeviceName(), "CCD_READ_MODE", "Read Mode", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); // NIR Preflash IUFillNumber(&PreflashN[0], "NIR_EXPOSURE_TIME", "Preflash duration (s)", "%4.3f", 0.0, 65.535, 0.001, 0.0); IUFillNumber(&PreflashN[1], "NIR_CLEAR_NUM", "Num. clear", "%2.0f", 1, 16, 1, 3); IUFillNumberVector(&PreflashNP, PreflashN, 2, getDeviceName(), "NIR_PRE_FLASH", "NIR Preflash", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); addAuxControls(); setDriverInterface(getDriverInterface() | FILTER_INTERFACE); return true; }
bool QHYCCD::initProperties() { INDI::CCD::initProperties(); INDI::FilterInterface::initProperties(FILTER_TAB); FilterSlotN[0].min = 1; FilterSlotN[0].max = 9; // CCD Cooler Switch IUFillSwitch(&CoolerS[0], "COOLER_ON", "On", ISS_OFF); IUFillSwitch(&CoolerS[1], "COOLER_OFF", "Off", ISS_ON); IUFillSwitchVector(&CoolerSP, CoolerS, 2, getDeviceName(), "CCD_COOLER", "Cooler", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); // CCD Regulation power IUFillNumber(&CoolerN[0], "CCD_COOLER_VALUE", "Cooling Power (%)", "%+06.2f", 0., 1., .2, 0.0); IUFillNumberVector(&CoolerNP, CoolerN, 1, getDeviceName(), "CCD_COOLER_POWER", "Cooling Power", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); // CCD Gain IUFillNumber(&GainN[0], "GAIN", "Gain", "%3.0f", 0, 100, 1, 11); IUFillNumberVector(&GainNP, GainN, 1, getDeviceName(), "CCD_GAIN", "Gain", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); // CCD Offset IUFillNumber(&OffsetN[0], "Offset", "Offset", "%3.0f", 0, 0, 1, 0); IUFillNumberVector(&OffsetNP, OffsetN, 1, getDeviceName(), "CCD_OFFSET", "Offset", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); // USB Speed IUFillNumber(&SpeedN[0], "Speed", "Speed", "%3.0f", 0, 0, 1, 0); IUFillNumberVector(&SpeedNP, SpeedN, 1, getDeviceName(), "USB_SPEED", "USB Speed", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); // USB Traffic IUFillNumber(&USBTrafficN[0], "Speed", "Speed", "%3.0f", 0, 0, 1, 0); IUFillNumberVector(&USBTrafficNP, USBTrafficN, 1, getDeviceName(), "USB_TRAFFIC", "USB Traffic", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); // Set minimum exposure speed to 0.001 seconds //PrimaryCCD.setMinMaxStep("CCD_EXPOSURE", "CCD_EXPOSURE_VALUE", MINIMUM_CCD_EXPOSURE, 3600, 1, false); addAuxControls(); setDriverInterface(getDriverInterface() | FILTER_INTERFACE); return true; }
bool MICCD::initProperties() { INDI::CCD::initProperties(); initFilterProperties(getDeviceName(), FILTER_TAB); FilterSlotN[0].min = 1; FilterSlotN[0].max = numFilters; // Temp ram IUFillNumber(&TemperatureRampN[0], "TEMP_RAMP", "Max. dT (C/min)", "%2.0f", 0, 30, 1, 2); IUFillNumberVector(&TemperatureRampNP, TemperatureRampN, 1, getDeviceName(), "CCD_TEMP_RAMP", "Temp. ramp", MAIN_CONTROL_TAB, IP_WO, 60, IPS_IDLE); // CCD Regulation power IUFillNumber(&CoolerN[0], "CCD_COOLER_VALUE", "Cooling Power (%)", "%+6.2f", 0.0, 1.0, 0.01, 0.0); IUFillNumberVector(&CoolerNP, CoolerN, 1, getDeviceName(), "CCD_COOLER_POWER", "Cooling Power", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); // CCD Fan IUFillNumber(&FanN[0], "FAN", "Fan speed", "%2.0f", 0, maxFanValue, 1, 0); IUFillNumberVector(&FanNP, FanN, 1, getDeviceName(), "CCD_FAN", "Fan", MAIN_CONTROL_TAB, IP_WO, 60, IPS_IDLE); // CCD Window heating IUFillNumber(&WindowHeatingN[0], "WINDOW_HEATING", "Heating intensity", "%2.0f", 0, maxHeatingValue, 1, 0); IUFillNumberVector(&WindowHeatingNP, WindowHeatingN, 1, getDeviceName(), "CCD_WINDOW_HEATING", "Heating", MAIN_CONTROL_TAB, IP_WO, 60, IPS_IDLE); // CCD Gain IUFillNumber(&GainN[0], "GAIN", "Gain (e-/ADU)", "%2.2f", 0, 100, 1, 0); IUFillNumberVector(&GainNP, GainN, 1, getDeviceName(), "CCD_GAIN", "Gain", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); // Noise mode IUFillSwitch(&NoiseS[0], "NORMAL_NOISE", "Normal", ISS_ON); IUFillSwitch(&NoiseS[1], "LOW_NOISE", "Low", ISS_OFF); IUFillSwitch(&NoiseS[2], "ULTA_LOW_NOISE", "Ultra low", ISS_OFF); IUFillSwitchVector(&NoiseSP, NoiseS, numReadModes, getDeviceName(), "CCD_NOISE", "Noise", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); addAuxControls(); setDriverInterface(getDriverInterface() | FILTER_INTERFACE); return true; }
bool SynscanDriver::initProperties() { INDI::Telescope::initProperties(); SetTelescopeCapability(TELESCOPE_CAN_PARK | TELESCOPE_CAN_ABORT | TELESCOPE_CAN_SYNC | TELESCOPE_CAN_GOTO | TELESCOPE_HAS_TIME | TELESCOPE_HAS_LOCATION | TELESCOPE_HAS_PIER_SIDE | TELESCOPE_CAN_CONTROL_TRACK | TELESCOPE_HAS_TRACK_MODE, 10); SetParkDataType(PARK_RA_DEC_ENCODER); // Slew Rates strncpy(SlewRateS[0].label, "1x", MAXINDILABEL); strncpy(SlewRateS[1].label, "8x", MAXINDILABEL); strncpy(SlewRateS[2].label, "16x", MAXINDILABEL); strncpy(SlewRateS[3].label, "32x", MAXINDILABEL); strncpy(SlewRateS[4].label, "64x", MAXINDILABEL); strncpy(SlewRateS[5].label, "128x", MAXINDILABEL); strncpy(SlewRateS[6].label, "400x", MAXINDILABEL); strncpy(SlewRateS[7].label, "600x", MAXINDILABEL); strncpy(SlewRateS[8].label, "Max", MAXINDILABEL); strncpy(SlewRateS[9].label, "Custom", MAXINDILABEL); IUResetSwitch(&SlewRateSP); // Max is the default SlewRateS[8].s = ISS_ON; ////////////////////////////////////////////////////////////////////////////////////////////////// /// Mount Info Text Property ////////////////////////////////////////////////////////////////////////////////////////////////// IUFillText(&StatusT[MI_FW_VERSION], "MI_FW_VERSION", "Firmware", "-"); IUFillText(&StatusT[MI_MOUNT_MODEL], "MI_MOUNT_MODEL", "Model", "-"); IUFillText(&StatusT[MI_GOTO_STATUS], "MI_GOTO_STATUS", "Goto", "-"); IUFillText(&StatusT[MI_POINT_STATUS], "MI_POINT_STATUS", "Pointing", "-"); IUFillText(&StatusT[MI_TRACK_MODE], "MI_TRACK_MODE", "Tracking Mode", "-"); IUFillTextVector(&StatusTP, StatusT, 5, getDeviceName(), "MOUNT_STATUS", "Status", MOUNT_TAB, IP_RO, 60, IPS_IDLE); ////////////////////////////////////////////////////////////////////////////////////////////////// /// Custom Slew Rate ////////////////////////////////////////////////////////////////////////////////////////////////// IUFillNumber(&CustomSlewRateN[AXIS_RA], "AXIS1", "RA/AZ (arcsecs/s)", "%.2f", 0.05, 800, 10, 0); IUFillNumber(&CustomSlewRateN[AXIS_DE], "AXIS2", "DE/AL (arcsecs/s)", "%.2f", 0.05, 800, 10, 0); IUFillNumberVector(&CustomSlewRateNP, CustomSlewRateN, 2, getDeviceName(), "CUSTOM_SLEW_RATE", "Custom Slew", MOTION_TAB, IP_RW, 60, IPS_IDLE); ////////////////////////////////////////////////////////////////////////////////////////////////// /// Guide Rate ////////////////////////////////////////////////////////////////////////////////////////////////// IUFillNumber(&GuideRateN[AXIS_RA], "GUIDE_RATE_WE", "W/E Rate", "%.2f", 0, 1, 0.1, 0.5); IUFillNumber(&GuideRateN[AXIS_DE], "GUIDE_RATE_NS", "N/S Rate", "%.2f", 0, 1, 0.1, 0.5); IUFillNumberVector(&GuideRateNP, GuideRateN, 2, getDeviceName(), "GUIDE_RATE", "Guiding Rate", GUIDE_TAB, IP_RW, 0, IPS_IDLE); ////////////////////////////////////////////////////////////////////////////////////////////////// /// Horizontal Coords ////////////////////////////////////////////////////////////////////////////////////////////////// IUFillNumber(&HorizontalCoordsN[AXIS_AZ], "AZ", "Az D:M:S", "%10.6m", 0.0, 360.0, 0.0, 0); IUFillNumber(&HorizontalCoordsN[AXIS_ALT], "ALT", "Alt D:M:S", "%10.6m", -90., 90.0, 0.0, 0); IUFillNumberVector(&HorizontalCoordsNP, HorizontalCoordsN, 2, getDeviceName(), "HORIZONTAL_COORD", "Horizontal Coord", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE); AddTrackMode("TRACK_ALTAZ", "Alt/Az"); AddTrackMode("TRACK_EQ", "Equatorial", true); AddTrackMode("TRACK_PEC", "PEC Mode"); SetParkDataType(PARK_AZ_ALT); // Initialize guiding properties. initGuiderProperties(getDeviceName(), GUIDE_TAB); addAuxControls(); //GUIDE Set guider interface. setDriverInterface(getDriverInterface() | GUIDER_INTERFACE); return true; }
bool ScopeSim::initProperties() { /* Make sure to init parent properties first */ INDI::Telescope::initProperties(); /* Simulated periodic error in RA, DEC */ IUFillNumber(&EqPEN[RA_AXIS], "RA_PE", "RA (hh:mm:ss)", "%010.6m", 0, 24, 0, 15.); IUFillNumber(&EqPEN[DEC_AXIS], "DEC_PE", "DEC (dd:mm:ss)", "%010.6m", -90, 90, 0, 15.); IUFillNumberVector(&EqPENV, EqPEN, 2, getDeviceName(), "EQUATORIAL_PE", "Periodic Error", MOTION_TAB, IP_RO, 60, IPS_IDLE); /* Enable client to manually add periodic error northward or southward for simulation purposes */ IUFillSwitch(&PEErrNSS[DIRECTION_NORTH], "PE_N", "North", ISS_OFF); IUFillSwitch(&PEErrNSS[DIRECTION_SOUTH], "PE_S", "South", ISS_OFF); IUFillSwitchVector(&PEErrNSSP, PEErrNSS, 2, getDeviceName(), "PE_NS", "PE N/S", MOTION_TAB, IP_RW, ISR_ATMOST1, 60, IPS_IDLE); /* Enable client to manually add periodic error westward or easthward for simulation purposes */ IUFillSwitch(&PEErrWES[DIRECTION_WEST], "PE_W", "West", ISS_OFF); IUFillSwitch(&PEErrWES[DIRECTION_EAST], "PE_E", "East", ISS_OFF); IUFillSwitchVector(&PEErrWESP, PEErrWES, 2, getDeviceName(), "PE_WE", "PE W/E", MOTION_TAB, IP_RW, ISR_ATMOST1, 60, IPS_IDLE); /* How fast do we guide compared to sidereal rate */ IUFillNumber(&GuideRateN[RA_AXIS], "GUIDE_RATE_WE", "W/E Rate", "%g", 0, 1, 0.1, 0.3); IUFillNumber(&GuideRateN[DEC_AXIS], "GUIDE_RATE_NS", "N/S Rate", "%g", 0, 1, 0.1, 0.3); IUFillNumberVector(&GuideRateNP, GuideRateN, 2, getDeviceName(), "GUIDE_RATE", "Guiding Rate", MOTION_TAB, IP_RW, 0, IPS_IDLE); IUFillSwitch(&SlewRateS[SLEW_GUIDE], "SLEW_GUIDE", "Guide", ISS_OFF); IUFillSwitch(&SlewRateS[SLEW_CENTERING], "SLEW_CENTERING", "Centering", ISS_OFF); IUFillSwitch(&SlewRateS[SLEW_FIND], "SLEW_FIND", "Find", ISS_OFF); IUFillSwitch(&SlewRateS[SLEW_MAX], "SLEW_MAX", "Max", ISS_ON); IUFillSwitchVector(&SlewRateSP, SlewRateS, 4, getDeviceName(), "TELESCOPE_SLEW_RATE", "Slew Rate", MOTION_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); // Add Tracking Modes AddTrackMode("TRACK_SIDEREAL", "Sidereal", true); AddTrackMode("TRACK_CUSTOM", "Custom"); // Let's simulate it to be an F/7.5 120mm telescope ScopeParametersN[0].value = 120; ScopeParametersN[1].value = 900; ScopeParametersN[2].value = 120; ScopeParametersN[3].value = 900; TrackState = SCOPE_IDLE; SetParkDataType(PARK_RA_DEC); initGuiderProperties(getDeviceName(), MOTION_TAB); /* Add debug controls so we may debug driver if necessary */ addDebugControl(); setDriverInterface(getDriverInterface() | GUIDER_INTERFACE); double longitude=0, latitude=90; // Get value from config file if it exists. IUGetConfigNumber(getDeviceName(), "GEOGRAPHIC_COORD", "LONG", &longitude); currentRA = get_local_sidereal_time(longitude); IUGetConfigNumber(getDeviceName(), "GEOGRAPHIC_COORD", "LAT", &latitude); currentDEC = latitude > 0 ? 90 : -90; return true; }
bool Paramount::initProperties() { /* Make sure to init parent properties first */ INDI::Telescope::initProperties(); for (int i = 0; i < SlewRateSP.nsp-1; i++) { sprintf(SlewRateSP.sp[i].label, "%.fx", slewspeeds[i]); SlewRateSP.sp[i].aux = (void *)&slewspeeds[i]; } // Set 64x as default speed SlewRateSP.sp[5].s = ISS_ON; /* How fast do we guide compared to sidereal rate */ IUFillNumber(&JogRateN[RA_AXIS], "JOG_RATE_WE", "W/E Rate (arcmin)", "%g", 0, 600, 60, 30); IUFillNumber(&JogRateN[DEC_AXIS], "JOG_RATE_NS", "N/S Rate (arcmin)", "%g", 0, 600, 60, 30); IUFillNumberVector(&JogRateNP, JogRateN, 2, getDeviceName(), "JOG_RATE", "Jog Rate", MOTION_TAB, IP_RW, 0, IPS_IDLE); /* How fast do we guide compared to sidereal rate */ IUFillNumber(&GuideRateN[RA_AXIS], "GUIDE_RATE_WE", "W/E Rate", "%1.1f", 0.0, 1.0, 0.1, 0.5); IUFillNumber(&GuideRateN[DEC_AXIS], "GUIDE_RATE_NS", "N/S Rate", "%1.1f", 0.0, 1.0, 0.1, 0.5); IUFillNumberVector(&GuideRateNP, GuideRateN, 2, getDeviceName(), "GUIDE_RATE", "Guiding Rate", MOTION_TAB, IP_RW, 0, IPS_IDLE); // Tracking Mode #if 0 IUFillSwitch(&TrackModeS[TRACK_SIDEREAL], "TRACK_SIDEREAL", "Sidereal", ISS_OFF); IUFillSwitch(&TrackModeS[TRACK_SOLAR], "TRACK_SOLAR", "Solar", ISS_OFF); IUFillSwitch(&TrackModeS[TRACK_LUNAR], "TRACK_LUNAR", "Lunar", ISS_OFF); IUFillSwitch(&TrackModeS[TRACK_CUSTOM], "TRACK_CUSTOM", "Custom", ISS_OFF); IUFillSwitchVector(&TrackModeSP, TrackModeS, 4, getDeviceName(), "TELESCOPE_TRACK_MODE", "Track Mode", MAIN_CONTROL_TAB, IP_RW, ISR_ATMOST1, 0, IPS_IDLE); #endif AddTrackMode("TRACK_SIDEREAL", "Sidereal", true); AddTrackMode("TRACK_SOLAR", "Solar"); AddTrackMode("TRACK_LUNAR", "Lunar"); AddTrackMode("TRACK_CUSTOM", "Custom"); // Custom Tracking Rate #if 0 IUFillNumber(&TrackRateN[0], "TRACK_RATE_RA", "RA (arcsecs/s)", "%.6f", -16384.0, 16384.0, 0.000001, 15.041067); IUFillNumber(&TrackRateN[1], "TRACK_RATE_DE", "DE (arcsecs/s)", "%.6f", -16384.0, 16384.0, 0.000001, 0); IUFillNumberVector(&TrackRateNP, TrackRateN, 2, getDeviceName(), "TELESCOPE_TRACK_RATE", "Track Rates", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); #endif // Let's simulate it to be an F/7.5 120mm telescope with 50m 175mm guide scope ScopeParametersN[0].value = 120; ScopeParametersN[1].value = 900; ScopeParametersN[2].value = 50; ScopeParametersN[3].value = 175; TrackState = SCOPE_IDLE; SetParkDataType(PARK_RA_DEC); initGuiderProperties(getDeviceName(), MOTION_TAB); setDriverInterface(getDriverInterface() | GUIDER_INTERFACE); addAuxControls(); double longitude=0, latitude=90; // Get value from config file if it exists. IUGetConfigNumber(getDeviceName(), "GEOGRAPHIC_COORD", "LONG", &longitude); currentRA = get_local_sidereal_time(longitude); IUGetConfigNumber(getDeviceName(), "GEOGRAPHIC_COORD", "LAT", &latitude); currentDEC = latitude > 0 ? 90 : -90; return true; }
bool IEQPro::initProperties() { INDI::Telescope::initProperties(); /* Firmware */ IUFillText(&FirmwareT[FW_MODEL], "Model", "", 0); IUFillText(&FirmwareT[FW_BOARD], "Board", "", 0); IUFillText(&FirmwareT[FW_CONTROLLER], "Controller", "", 0); IUFillText(&FirmwareT[FW_RA], "RA", "", 0); IUFillText(&FirmwareT[FW_DEC], "DEC", "", 0); IUFillTextVector(&FirmwareTP, FirmwareT, 5, getDeviceName(), "Firmware Info", "", MOUNTINFO_TAB, IP_RO, 0, IPS_IDLE); /* Tracking Mode */ IUFillSwitch(&TrackModeS[TRACK_SIDEREAL], "TRACK_SIDEREAL", "Sidereal", ISS_ON); IUFillSwitch(&TrackModeS[TRACK_SOLAR], "TRACK_SOLAR", "Solar", ISS_OFF); IUFillSwitch(&TrackModeS[TRACK_LUNAR], "TRACK_LUNAR", "Lunar", ISS_OFF); IUFillSwitch(&TrackModeS[TRACK_CUSTOM], "TRACK_CUSTOM", "Custom", ISS_OFF); IUFillSwitchVector(&TrackModeSP, TrackModeS, 4, getDeviceName(), "TELESCOPE_TRACK_MODE", "Track Mode", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); /* Custom Tracking Rate */ IUFillNumber(&CustomTrackRateN[0],"TRACK_RATE_CUSTOM","Rate","%g",-0.0100, 0.0100, 0.005, 0); IUFillNumberVector(&CustomTrackRateNP, CustomTrackRateN,1,getDeviceName(),"TELESCOPE_TRACK_RATE","Track Rates",MOTION_TAB,IP_RW,60,IPS_IDLE); /* GPS Status */ IUFillSwitch(&GPSStatusS[GPS_OFF], "Off", "", ISS_ON); IUFillSwitch(&GPSStatusS[GPS_ON], "On", "", ISS_OFF); IUFillSwitch(&GPSStatusS[GPS_DATA_OK], "Data OK", "", ISS_OFF); IUFillSwitchVector(&GPSStatusSP, GPSStatusS, 3, getDeviceName(), "GPS_STATUS", "GPS", MOUNTINFO_TAB, IP_RO, ISR_1OFMANY, 0, IPS_IDLE); /* Time Source */ IUFillSwitch(&TimeSourceS[TS_RS232], "RS232", "", ISS_ON); IUFillSwitch(&TimeSourceS[TS_CONTROLLER], "Controller", "", ISS_OFF); IUFillSwitch(&TimeSourceS[TS_GPS], "GPS", "", ISS_OFF); IUFillSwitchVector(&TimeSourceSP, TimeSourceS, 3, getDeviceName(), "TIME_SOURCE", "Time Source", MOUNTINFO_TAB, IP_RO, ISR_1OFMANY, 0, IPS_IDLE); /* Hemisphere */ IUFillSwitch(&HemisphereS[HEMI_SOUTH], "South", "", ISS_OFF); IUFillSwitch(&HemisphereS[HEMI_NORTH], "North", "", ISS_ON); IUFillSwitchVector(&HemisphereSP, HemisphereS, 2, getDeviceName(), "HEMISPHERE", "Hemisphere", MOUNTINFO_TAB, IP_RO, ISR_1OFMANY, 0, IPS_IDLE); /* Home */ IUFillSwitch(&HomeS[IEQ_FIND_HOME], "FindHome", "Find Home", ISS_OFF); IUFillSwitch(&HomeS[IEQ_SET_HOME], "SetCurrentAsHome", "Set current as Home", ISS_OFF); IUFillSwitch(&HomeS[IEQ_GOTO_HOME], "GoToHome", "Go to Home", ISS_OFF); IUFillSwitchVector(&HomeSP, HomeS, 3, getDeviceName(), "HOME", "Home", MAIN_CONTROL_TAB, IP_RW, ISR_ATMOST1, 0, IPS_IDLE); /* How fast do we guide compared to sidereal rate */ IUFillNumber(&GuideRateN[0], "GUIDE_RATE", "x Sidereal", "%g", 0.1, 0.9, 0.1, 0.5); IUFillNumberVector(&GuideRateNP, GuideRateN, 1, getDeviceName(), "GUIDE_RATE", "Guiding Rate", MOTION_TAB, IP_RW, 0, IPS_IDLE); TrackState=SCOPE_IDLE; initGuiderProperties(getDeviceName(), MOTION_TAB); setDriverInterface(getDriverInterface() | GUIDER_INTERFACE); SetParkDataType(PARK_RA_DEC); addAuxControls(); return true; }
bool ATIKCCD::setupParams() { ARTEMISPROPERTIES pProp; int rc = ArtemisProperties(hCam, &pProp); if (rc != ARTEMIS_OK) { LOGF_ERROR("Failed to inquire camera properties (%d)", rc); return false; } // Camera & Pixel properties // FIXME is it always 16bit depth? SetCCDParams(pProp.nPixelsX, pProp.nPixelsY, 16, pProp.PixelMicronsX, pProp.PixelMicronsY); // Set frame buffer size PrimaryCCD.setFrameBufferSize(PrimaryCCD.getXRes() * PrimaryCCD.getYRes() * PrimaryCCD.getBPP() / 8, false); m_CameraFlags = pProp.cameraflags; LOGF_DEBUG("Camera flags: %d", m_CameraFlags); int binX = 1, binY = 1; rc = ArtemisGetMaxBin(hCam, &binX, &binY); if (rc != ARTEMIS_OK) { LOGF_ERROR("Failed to inquire camera max binning (%d)", rc); } PrimaryCCD.setMinMaxStep("CCD_EXPOSURE", "CCD_EXPOSURE_VALUE", 0.001, 3600, 1, false); PrimaryCCD.setMinMaxStep("CCD_BINNING", "HOR_BIN", 1, binX, 1, false); PrimaryCCD.setMinMaxStep("CCD_BINNING", "VER_BIN", 1, binY, 1, false); IUSaveText(&VersionInfoS[VERSION_FIRMWARE], std::to_string(pProp.Protocol).c_str()); LOGF_INFO("Detected camera %s %s with firmware %s", pProp.Manufacturer, pProp.Description, std::to_string(pProp.Protocol).c_str()); uint32_t cap = 0; // All Atik cameras can abort and subframe cap = CCD_CAN_ABORT | CCD_CAN_SUBFRAME; // Can we bin? if (binX > 1) { cap |= CCD_CAN_BIN; LOG_DEBUG("Camera can bin."); } // Do we have color or mono camera? ARTEMISCOLOURTYPE colorType; rc = ArtemisColourProperties(hCam, &colorType, &normalOffsetX, &normalOffsetY, &previewOffsetX, &previewOffsetY); if (rc != ARTEMIS_OK) { LOGF_ERROR("Failed to inquire camera color (%d). Assuming Mono.", rc); } if (colorType == ARTEMIS_COLOUR_RGGB) { cap |= CCD_HAS_BAYER; IUSaveText(&BayerT[0], std::to_string(normalOffsetX).c_str()); IUSaveText(&BayerT[1], std::to_string(normalOffsetY).c_str()); } LOGF_DEBUG("Camera is %s.", colorType == ARTEMIS_COLOUR_RGGB ? "Color" : "Mono"); // Do we have temperature? rc = ArtemisTemperatureSensorInfo(hCam, 0, &m_TemperatureSensorsCount); LOGF_DEBUG("Camera has %d temperature sensor(s).", m_TemperatureSensorsCount); if (m_TemperatureSensorsCount > 0) { // Do we have cooler control? int flags, level, minlvl, maxlvl, setpoint; rc = ArtemisCoolingInfo(hCam, &flags, &level, &minlvl, &maxlvl, &setpoint); if (flags & 0x1) { LOG_DEBUG("Camera supports cooling control."); cap |= CCD_HAS_COOLER; } genTimerID = SetTimer(TEMP_TIMER_MS); } // Do we have mechanical shutter? if (m_CameraFlags & ARTEMIS_PROPERTIES_CAMERAFLAGS_HAS_SHUTTER) { LOG_DEBUG("Camera has mechanical shutter."); cap |= CCD_HAS_SHUTTER; } // Do we have guide port? if (m_CameraFlags & ARTEMIS_PROPERTIES_CAMERAFLAGS_HAS_GUIDE_PORT) { LOG_DEBUG("Camera has guide port."); cap |= CCD_HAS_ST4_PORT; } // Done with the capabilities! SetCCDCapability(cap); // Check if camra has internal filter wheel if (m_CameraFlags & ARTEMIS_PROPERTIES_CAMERAFLAGS_HAS_FILTERWHEEL) { int numFilters, moving, currentPos, targetPos; rc = ArtemisFilterWheelInfo(hCam, &numFilters, &moving, ¤tPos, &targetPos); if (rc != ARTEMIS_OK) { LOGF_ERROR("Failed to inquire internal filter wheel info (%d). Filter wheel functions are disabled.", rc); } else { setDriverInterface(getDriverInterface() | FILTER_INTERFACE); FilterSlotN[0].min = 1; FilterSlotN[0].max = numFilters; LOGF_INFO("Detected %d-position internal filter wheel.", numFilters); } } // Check if we have Horizon camera m_isHorizon = ArtemisHasCameraSpecificOption(hCam, 1); if (m_isHorizon) { uint8_t data[2] = {0}; int len = 0, index = 0; ArtemisCameraSpecificOptionGetData(hCam, ID_AtikHorizonGOPresetMode, data, 2, &len); index = *(reinterpret_cast<uint16_t*>(&data)); LOGF_DEBUG("Horizon current GO mode: data[0] %d data[1] %d index %d", data[0], data[1], index); IUResetSwitch(&ControlPresetsSP); ControlPresetsS[index].s = ISS_ON; // Get Gain & Offset valuse ArtemisCameraSpecificOptionGetData(hCam, ID_AtikHorizonGOCustomGain, data, 2, &len); index = *(reinterpret_cast<uint16_t*>(&data)); LOGF_DEBUG("Horizon current gain: data[0] %d data[1] %d value %d", data[0], data[1], index); ArtemisCameraSpecificOptionGetData(hCam, ID_AtikHorizonGOCustomOffset, data, 2, &len); index = *(reinterpret_cast<uint16_t*>(&data)); LOGF_DEBUG("Horizon current offset: data[0] %d data[1] %d value %d", data[0], data[1], index); } // Create imaging thread threadRequest = StateIdle; threadState = StateNone; int stat = pthread_create(&imagingThread, nullptr, &imagingHelper, this); if (stat != 0) { LOGF_ERROR("Error creating imaging thread (%d)", stat); return false; } pthread_mutex_lock(&condMutex); while (threadState == StateNone) { pthread_cond_wait(&cv, &condMutex); } pthread_mutex_unlock(&condMutex); return true; }