/************************************************************************************** ** INDI is asking us to init our properties. ***************************************************************************************/ bool RadioSim::initProperties() { // Must init parent properties first! INDI::Detector::initProperties(); // We set the Detector capabilities uint32_t cap = DETECTOR_CAN_ABORT | DETECTOR_HAS_CONTINUUM; SetDetectorCapability(cap); IUFillNumber(&DetectorPropertiesN[0], "DETECTOR_SIZE", "Dish size (m)", "%4.0f", 5, MAX_DISH_SIZE_M, 1, 5.0); IUFillNumberVector(&DetectorPropertiesNP, DetectorPropertiesN, 1, getDeviceName(), "DETECTOR_PROPERTIES", "Control", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); IUFillNumber(&DetectorCoordsN[0], "DETECTOR_RA", "Position (RA)", "%2.3f", 0, FOV_DEG, 1, 0); IUFillNumber(&DetectorCoordsN[1], "DETECTOR_DEC", "Position (DEC)", "%2.3f", 0, FOV_DEG, 1, FOV_DEG/2); IUFillNumberVector(&DetectorCoordsNP, DetectorCoordsN, 2, getDeviceName(), "DETECTOR_COORDS", "Coordinates", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); PrimaryDetector.setMinMaxStep("DETECTOR_CAPTURE", "DETECTOR_CAPTURE_VALUE", 0.3, 10, 1, false); PrimaryDetector.setMinMaxStep("DETECTOR_SETTINGS", "DETECTOR_FREQUENCY", FREQUENCY, FREQUENCY, 0, false); PrimaryDetector.setMinMaxStep("DETECTOR_SETTINGS", "DETECTOR_SAMPLERATE", 0, 1.0, 0, false); PrimaryDetector.setMinMaxStep("DETECTOR_SETTINGS", "DETECTOR_BITSPERSAMPLE", 8, 8, 1, false); // Add Debug, Simulator, and Configuration controls addAuxControls(); setDefaultPollingPeriod(500); return true; }
bool INDI::GPS::initProperties() { INDI::DefaultDevice::initProperties(); IUFillNumber(&PeriodN[0], "PERIOD", "Period (s)", "%.f", 0, 3600, 60.0, 0); IUFillNumberVector(&PeriodNP, PeriodN, 1, getDeviceName(), "GPS_REFRESH_PERIOD", "Refresh", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE); IUFillSwitch(&RefreshS[0], "REFRESH", "GPS", ISS_OFF); IUFillSwitchVector(&RefreshSP, RefreshS, 1, getDeviceName(), "GPS_REFRESH", "Refresh", MAIN_CONTROL_TAB, IP_RW, ISR_ATMOST1, 0, IPS_IDLE); IUFillNumber(&LocationN[LOCATION_LATITUDE], "LAT", "Lat (dd:mm:ss)", "%010.6m", -90, 90, 0, 0.0); IUFillNumber(&LocationN[LOCATION_LONGITUDE], "LONG", "Lon (dd:mm:ss)", "%010.6m", 0, 360, 0, 0.0); IUFillNumber(&LocationN[LOCATION_ELEVATION], "ELEV", "Elevation (m)", "%g", -200, 10000, 0, 0); IUFillNumberVector(&LocationNP, LocationN, 3, getDeviceName(), "GEOGRAPHIC_COORD", "Location", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); IUFillText(&TimeT[0], "UTC", "UTC Time", nullptr); IUFillText(&TimeT[1], "OFFSET", "UTC Offset", nullptr); IUFillTextVector(&TimeTP, TimeT, 2, getDeviceName(), "TIME_UTC", "UTC", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); updatePeriodMS = PeriodN[0].value; return true; }
void FocuserInterface::initProperties(const char *groupName) { IUFillNumber(&FocusSpeedN[0], "FOCUS_SPEED_VALUE", "Focus Speed", "%3.0f", 0.0, 255.0, 1.0, 255.0); IUFillNumberVector(&FocusSpeedNP, FocusSpeedN, 1, m_defaultDevice->getDeviceName(), "FOCUS_SPEED", "Speed", groupName, IP_RW, 60, IPS_OK); IUFillNumber(&FocusTimerN[0], "FOCUS_TIMER_VALUE", "Focus Timer (ms)", "%4.0f", 0.0, 5000.0, 50.0, 1000.0); IUFillNumberVector(&FocusTimerNP, FocusTimerN, 1, m_defaultDevice->getDeviceName(), "FOCUS_TIMER", "Timer", groupName, IP_RW, 60, IPS_OK); lastTimerValue = 1000.0; IUFillSwitch(&FocusMotionS[0], "FOCUS_INWARD", "Focus In", ISS_ON); IUFillSwitch(&FocusMotionS[1], "FOCUS_OUTWARD", "Focus Out", ISS_OFF); IUFillSwitchVector(&FocusMotionSP, FocusMotionS, 2 ,m_defaultDevice->getDeviceName(), "FOCUS_MOTION", "Direction", groupName, IP_RW, ISR_1OFMANY, 60, IPS_OK); // Driver can define those to clients if there is support IUFillNumber(&FocusAbsPosN[0], "FOCUS_ABSOLUTE_POSITION", "Ticks", "%4.0f", 0.0, 100000.0, 1000.0, 0); IUFillNumberVector(&FocusAbsPosNP, FocusAbsPosN, 1, m_defaultDevice->getDeviceName(), "ABS_FOCUS_POSITION", "Absolute Position", groupName, IP_RW, 60, IPS_OK); IUFillNumber(&FocusRelPosN[0], "FOCUS_RELATIVE_POSITION", "Ticks", "%4.0f", 0.0, 100000.0, 1000.0, 0); IUFillNumberVector(&FocusRelPosNP, FocusRelPosN, 1, m_defaultDevice->getDeviceName(), "REL_FOCUS_POSITION", "Relative Position", groupName, IP_RW, 60, IPS_OK); IUFillSwitch(&AbortS[0], "ABORT", "Abort", ISS_OFF); IUFillSwitchVector(&AbortSP, AbortS, 1, m_defaultDevice->getDeviceName(), "FOCUS_ABORT_MOTION", "Abort Motion", groupName, IP_RW, ISR_ATMOST1, 60, IPS_IDLE); }
bool lacerta_mfoc::initProperties() { INDI::Focuser::initProperties(); IUFillNumber(&BacklashN[0], "BACKLASH", "step", "%4.2f", 0, 255, 1, 12); IUFillNumberVector(&BacklashNP, BacklashN, 1, getDeviceName(), "BACKLASH_SETTINGS", "Backlash", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); IUFillNumber(&TempCompN[0], "TEMPCOMP", "step/10 degC", "%4.2f", -5000, 5000, 1, 65); IUFillNumberVector(&TempCompNP, TempCompN, 1, getDeviceName(), "TEMPCOMP_SETTINGS", "T Comp.", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); FocusMaxPosN[0].min = MFOC_POSMIN_HARDWARE; FocusMaxPosN[0].max = MFOC_POSMAX_HARDWARE; FocusMaxPosN[0].step = (FocusMaxPosN[0].max - FocusMaxPosN[0].min) / 20.0; FocusMaxPosN[0].value = 8000; FocusAbsPosN[0].max = FocusAbsPosN[0].value; IUFillSwitch(&TempTrackDirS[MODE_TDIR_BOTH], "Both", "Both", ISS_ON); IUFillSwitch(&TempTrackDirS[MODE_TDIR_IN], "In", "In", ISS_ON); IUFillSwitch(&TempTrackDirS[MODE_TDIR_OUT], "Out", "Out", ISS_ON); IUFillSwitchVector(&TempTrackDirSP, TempTrackDirS, MODE_COUNT_TEMP_DIR, getDeviceName(), "Temp. dir.", "Temp. dir.", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); IUFillSwitch(&StartSavedPositionS[MODE_SAVED_ON], "Yes", "Yes", ISS_ON); IUFillSwitch(&StartSavedPositionS[MODE_SAVED_OFF], "No", "No", ISS_OFF); IUFillSwitchVector(&StartSavedPositionSP, StartSavedPositionS, MODE_COUNT_SAVED, getDeviceName(), "Start saved pos.", "Start saved pos.", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); return true; }
void INDI::LightBoxInterface::initLightBoxProperties(const char *deviceName, const char *groupName) { // Turn on/off light IUFillSwitch(&LightS[FLAT_LIGHT_ON], "FLAT_LIGHT_ON", "On", ISS_OFF); IUFillSwitch(&LightS[FLAT_LIGHT_OFF], "FLAT_LIGHT_OFF", "Off", ISS_OFF); IUFillSwitchVector(&LightSP, LightS, 2, deviceName, "FLAT_LIGHT_CONTROL", "Flat Light", groupName, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); // Light Intensity IUFillNumber(&LightIntensityN[0], "FLAT_LIGHT_INTENSITY_VALUE", "Value", "%.f", 0, 255, 10, 0); IUFillNumberVector(&LightIntensityNP, LightIntensityN, 1, deviceName, "FLAT_LIGHT_INTENSITY", "Brightness", groupName, IP_RW, 0, IPS_IDLE); // Active Devices IUFillText(&ActiveDeviceT[0], "ACTIVE_FILTER", "Filter", "Filter Simulator"); IUFillTextVector(&ActiveDeviceTP, ActiveDeviceT, 1, deviceName, "ACTIVE_DEVICES", "Snoop devices", OPTIONS_TAB, IP_RW, 60, IPS_IDLE); // Filter duration IUFillNumberVector(&FilterIntensityNP, nullptr, 0, deviceName, "FLAT_LIGHT_FILTER_INTENSITY", "Filter Intensity", "Preset", IP_RW, 60, IPS_OK); IDSnoopDevice(ActiveDeviceT[0].text, "FILTER_SLOT"); IDSnoopDevice(ActiveDeviceT[0].text, "FILTER_NAME"); }
bool SestoSenso::initProperties() { INDI::Focuser::initProperties(); // Firmware Information IUFillText(&FirmwareT[0], "VERSION", "Version", ""); IUFillTextVector(&FirmwareTP, FirmwareT, 1, getDeviceName(), "FOCUS_FIRMWARE", "Firmware", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE); // Focuser temperature IUFillNumber(&TemperatureN[0], "TEMPERATURE", "Celsius", "%6.2f", -50, 70., 0., 0.); IUFillNumberVector(&TemperatureNP, TemperatureN, 1, getDeviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE); // Sync IUFillNumber(&SyncN[0], "FOCUS_SYNC_OFFSET", "Offset", "%6.0f", 0, 60000., 0., 0.); IUFillNumberVector(&SyncNP, SyncN, 1, getDeviceName(), "FOCUS_SYNC", "Sync", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE); // Relative and absolute movement FocusRelPosN[0].min = 0.; FocusRelPosN[0].max = 50000.; FocusRelPosN[0].value = 0; FocusRelPosN[0].step = 1000; FocusAbsPosN[0].min = 0.; FocusAbsPosN[0].max = 100000.; FocusAbsPosN[0].value = 0; FocusAbsPosN[0].step = 1000; addAuxControls(); updatePeriodMS = POLLMS; return true; }
bool IpFocus::initProperties() { INDI::Focuser::initProperties(); IUFillText(&FocuserEndpointT[0], "API_ENDPOINT", "API Endpoint", "http://192.168.1.203/focuser"); IUFillTextVector(&FocuserEndpointTP, FocuserEndpointT, 1, getDeviceName(), "FOCUSER_API_ENDPOINT", "Focuser", OPTIONS_TAB, IP_RW, 60, IPS_IDLE); IUFillText(&AlwaysApproachDirection[0], "ALWAYS_APPROACH_DIR", "Always approach CW/CCW/blank", "CCW"); IUFillTextVector(&AlwaysApproachDirectionP, AlwaysApproachDirection, 1, getDeviceName(), "BACKLASH_APPROACH_SETTINGS", "Backlash Direction", OPTIONS_TAB, IP_RW, 60, IPS_IDLE); IUFillText(&BacklashSteps[0],"BACKLASH_STEPS","Backlash steps","300"); IUFillTextVector(&BacklashStepsP,BacklashSteps,1,getDeviceName(),"BACKLASH_STEPS_SETTINGS","Backlash Steps",OPTIONS_TAB,IP_RW,60,IPS_IDLE); IUFillNumber(&SeeingN[0],"SIM_SEEING","arcseconds","%4.2f",0,60,0,3.5); IUFillNumberVector(&SeeingNP,SeeingN,1,getDeviceName(),"SEEING_SETTINGS","Seeing",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE); IUFillNumber(&FWHMN[0],"SIM_FWHM","arcseconds","%4.2f",0,60,0,7.5); IUFillNumberVector(&FWHMNP,FWHMN,1,getDeviceName(), "FWHM","FWHM",MAIN_CONTROL_TAB,IP_RO,60,IPS_IDLE); ticks = initTicks = sqrt(FWHMN[0].value - SeeingN[0].value) / 0.75; /* Relative and absolute movement settings which are not set on connect*/ FocusRelPosN[0].min = 0.; FocusRelPosN[0].max = 5000.; FocusRelPosN[0].value = 0; FocusRelPosN[0].step = 1000; FocusAbsPosN[0].step = 1000; addDebugControl(); return true; }
bool IndiRpialtimu::initProperties() { // We init parent properties first INDI::DefaultDevice::initProperties(); IUFillNumber(&PositionN[0],"ROLL","Roll (arc deg)","%0.1f",-180,180,0,0.0); IUFillNumber(&PositionN[1],"PITCH","Pitch (arc deg)","%0.1f",-180,180,0,0.0 ); IUFillNumber(&PositionN[2],"YAW","Yaw (arc deg)","%0.1f",-180,180,0,0.0 ); IUFillNumberVector(&PositionNP,PositionN,3,getDeviceName(),"ORIENTATION","Orientation",MAIN_CONTROL_TAB,IP_RO,60,IPS_OK); IUFillNumber(&PressureN[0],"PRESS_VALUE","Pressure (hPa)","%0.1f",0,2000,0,0.0); IUFillNumberVector(&PressureNP,PressureN,1,getDeviceName(),"PRESS","Pressure",MAIN_CONTROL_TAB,IP_RO,60,IPS_OK); IUFillNumber(&AltitudeN[0],"ALT_VALUE","Height over see level (m)","%0.1f",0,20000,0,0.0); IUFillNumberVector(&AltitudeNP,AltitudeN,1,getDeviceName(),"ALT","Altitude",MAIN_CONTROL_TAB,IP_RO,60,IPS_OK); IUFillNumber(&TemperatureN[0],"TEMP_VALUE","Temperature (C)","%0.1f",0,100,0,0.0); IUFillNumberVector(&TemperatureNP,TemperatureN,1,getDeviceName(),"TEMP","Temperature",MAIN_CONTROL_TAB,IP_RO,60,IPS_OK); IUFillNumber(&AdjustmentN[0],"ROLL","Roll (arc deg)","%0.1f",-180,180,0,0.0); IUFillNumber(&AdjustmentN[1],"PITCH","Pitch (arc deg)","%0.1f",-180,180,0,0.0 ); IUFillNumber(&AdjustmentN[2],"YAW","Yaw (arc deg)","%0.1f",-180,180,0,0.0 ); IUFillNumberVector(&AdjustmentNP,AdjustmentN,3,getDeviceName(),"ADJUSTMENT","Adjustment",OPTIONS_TAB,IP_RW,60,IPS_OK); return true; }
bool Weather::initProperties() { DefaultDevice::initProperties(); WI::initProperties(MAIN_CONTROL_TAB, PARAMETERS_TAB); // Location IUFillNumber(&LocationN[LOCATION_LATITUDE], "LAT", "Lat (dd:mm:ss)", "%010.6m", -90, 90, 0, 0.0); IUFillNumber(&LocationN[LOCATION_LONGITUDE], "LONG", "Lon (dd:mm:ss)", "%010.6m", 0, 360, 0, 0.0); IUFillNumber(&LocationN[LOCATION_ELEVATION], "ELEV", "Elevation (m)", "%g", -200, 10000, 0, 0); IUFillNumberVector(&LocationNP, LocationN, 3, getDeviceName(), "GEOGRAPHIC_COORD", "Location", SITE_TAB, IP_RW, 60, IPS_OK); // Active Devices IUFillText(&ActiveDeviceT[0], "ACTIVE_GPS", "GPS", "GPS Simulator"); IUFillTextVector(&ActiveDeviceTP, ActiveDeviceT, 1, getDeviceName(), "ACTIVE_DEVICES", "Snoop devices", OPTIONS_TAB, IP_RW, 60, IPS_IDLE); // Update Period IUFillNumber(&UpdatePeriodN[0], "PERIOD", "Period (secs)", "%4.2f", 0, 3600, 60, 60); IUFillNumberVector(&UpdatePeriodNP, UpdatePeriodN, 1, getDeviceName(), "WEATHER_UPDATE", "Update", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); // Refresh IUFillSwitch(&RefreshS[0], "REFRESH", "Refresh", ISS_OFF); IUFillSwitchVector(&RefreshSP, RefreshS, 1, getDeviceName(), "WEATHER_REFRESH", "Weather", MAIN_CONTROL_TAB, IP_RW, ISR_ATMOST1, 0, IPS_IDLE); // Override IUFillSwitch(&OverrideS[0], "OVERRIDE", "Override Status", ISS_OFF); IUFillSwitchVector(&OverrideSP, OverrideS, 1, getDeviceName(), "WEATHER_OVERRIDE", "Safety", MAIN_CONTROL_TAB, IP_RW, ISR_NOFMANY, 0, IPS_IDLE); IDSnoopDevice(ActiveDeviceT[0].text, "GEOGRAPHIC_COORD"); if (weatherConnection & CONNECTION_SERIAL) { serialConnection = new Connection::Serial(this); serialConnection->registerHandshake([&]() { return callHandshake(); }); registerConnection(serialConnection); } if (weatherConnection & CONNECTION_TCP) { tcpConnection = new Connection::TCP(this); tcpConnection->registerHandshake([&]() { return callHandshake(); }); registerConnection(tcpConnection); } setDriverInterface(WEATHER_INTERFACE); return true; }
bool ASICCD::initProperties() { INDI::CCD::initProperties(); 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); IUFillNumberVector(&ControlNP, NULL, 0, getDeviceName(), "CCD_CONTROLS", "Controls", CONTROL_TAB, IP_RW, 60, IPS_IDLE); IUFillSwitchVector(&ControlSP, NULL, 0, getDeviceName(), "CCD_CONTROLS_MODE", "Set Auto", CONTROL_TAB, IP_RW, ISR_NOFMANY, 60, IPS_IDLE); IUFillSwitchVector(&VideoFormatSP, NULL, 0, getDeviceName(), "CCD_VIDEO_FORMAT", "Format", CONTROL_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE); IUSaveText(&BayerT[2], getBayerString()); int maxBin=1; for (int i=0; i < 16; i++) { if (m_camInfo->SupportedBins[i] != 0) maxBin = m_camInfo->SupportedBins[i]; else break; } PrimaryCCD.setResolution(m_camInfo->MaxWidth, m_camInfo->MaxHeight); PrimaryCCD.setMinMaxStep("CCD_EXPOSURE", "CCD_EXPOSURE_VALUE", MIN_DURATION, 3600, 1, false); PrimaryCCD.setMinMaxStep("CCD_BINNING", "HOR_BIN", 1, maxBin, 1, false); PrimaryCCD.setMinMaxStep("CCD_BINNING", "VER_BIN", 1, maxBin, 1, false); uint32_t cap =0; cap |= CCD_CAN_ABORT; if (maxBin > 1) cap |= CCD_CAN_BIN; cap |= CCD_CAN_SUBFRAME; if (m_camInfo->IsCoolerCam) cap |= CCD_HAS_COOLER; if (m_camInfo->MechanicalShutter) cap |= CCD_HAS_SHUTTER; if (m_camInfo->ST4Port) cap |= CCD_HAS_ST4_PORT; if (m_camInfo->IsColorCam) cap |= CCD_HAS_BAYER; #ifndef OSX_EMBEDED_MODE cap |= CCD_HAS_STREAMING; #endif SetCCDCapability(cap); addAuxControls(); return true; }
bool MoonLite::initProperties() { INDI::Focuser::initProperties(); FocusSpeedN[0].min = 1; FocusSpeedN[0].max = 5; FocusSpeedN[0].value = 1; /* Step Mode */ IUFillSwitch(&StepModeS[0], "Half Step", "", ISS_OFF); IUFillSwitch(&StepModeS[1], "Full Step", "", ISS_ON); IUFillSwitchVector(&StepModeSP, StepModeS, 2, getDeviceName(), "Step Mode", "", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); /* Focuser temperature */ IUFillNumber(&TemperatureN[0], "TEMPERATURE", "Celsius", "%6.2f", -50, 70., 0., 0.); IUFillNumberVector(&TemperatureNP, TemperatureN, 1, getDeviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE); // Maximum Travel IUFillNumber(&MaxTravelN[0], "MAXTRAVEL", "Maximum travel", "%6.0f", 1., 60000., 0., 10000.); IUFillNumberVector(&MaxTravelNP, MaxTravelN, 1, getDeviceName(), "FOCUS_MAXTRAVEL", "Max. travel", OPTIONS_TAB, IP_RW, 0, IPS_IDLE); // Temperature Settings IUFillNumber(&TemperatureSettingN[0], "Calibration", "", "%6.2f", -20, 20, 0.5, 0); IUFillNumber(&TemperatureSettingN[1], "Coefficient", "", "%6.2f", -20, 20, 0.5, 0); IUFillNumberVector(&TemperatureSettingNP, TemperatureSettingN, 2, getDeviceName(), "Temperature Settings", "", OPTIONS_TAB, IP_RW, 0, IPS_IDLE); // Compensate for temperature IUFillSwitch(&TemperatureCompensateS[0], "Enable", "", ISS_OFF); IUFillSwitch(&TemperatureCompensateS[1], "Disable", "", ISS_ON); IUFillSwitchVector(&TemperatureCompensateSP, TemperatureCompensateS, 2, getDeviceName(), "Temperature Compensate", "", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); // Sync IUFillNumber(&SyncN[0], "FOCUS_SYNC_OFFSET", "Offset", "%6.0f", 0, 60000., 0., 0.); IUFillNumberVector(&SyncNP, SyncN, 1, getDeviceName(), "FOCUS_SYNC", "Sync", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE); /* Relative and absolute movement */ FocusRelPosN[0].min = 0.; FocusRelPosN[0].max = 30000.; FocusRelPosN[0].value = 0; FocusRelPosN[0].step = 1000; FocusAbsPosN[0].min = 0.; FocusAbsPosN[0].max = 60000.; FocusAbsPosN[0].value = 0; FocusAbsPosN[0].step = 1000; setDefaultPollingPeriod(500); addDebugControl(); return true; }
bool MoonLiteDRO::initProperties() { INDI::Focuser::initProperties(); FocusSpeedN[0].min = 1; FocusSpeedN[0].max = 5; FocusSpeedN[0].value = 1; // Step Delay IUFillNumber(&StepDelayN[0], "STEP_DELAY", "Delay", "%.f", 1, 5, 1., 1.); IUFillNumberVector(&StepDelayNP, StepDelayN, 1, getDeviceName(), "FOCUS_STEP_DELAY", "Step", SETTINGS_TAB, IP_RW, 0, IPS_IDLE); // Step Mode IUFillSwitch(&StepModeS[FOCUS_HALF_STEP], "HALF_STEP", "Half Step", ISS_OFF); IUFillSwitch(&StepModeS[FOCUS_FULL_STEP], "FULL_STEP", "Full Step", ISS_ON); IUFillSwitchVector(&StepModeSP, StepModeS, 2, getDeviceName(), "FOCUS_STEP_MODE", "Step Mode", SETTINGS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); // Temperature Settings IUFillNumber(&TemperatureSettingN[0], "Calibration", "Calibration", "%6.2f", -20, 20, 0.5, 0); IUFillNumber(&TemperatureSettingN[1], "Coefficient", "Coefficient", "%6.2f", -20, 20, 0.5, 0); IUFillNumberVector(&TemperatureSettingNP, TemperatureSettingN, 2, getDeviceName(), "FOCUS_TEMPERATURE_SETTINGS", "T. Settings", SETTINGS_TAB, IP_RW, 0, IPS_IDLE); // Compensate for temperature IUFillSwitch(&TemperatureCompensateS[0], "Enable", "Enable", ISS_OFF); IUFillSwitch(&TemperatureCompensateS[1], "Disable", "Disable", ISS_ON); IUFillSwitchVector(&TemperatureCompensateSP, TemperatureCompensateS, 2, getDeviceName(), "FOCUS_TEMPERATURE_COMPENSATION", "T. Compensate", SETTINGS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); // Focuser temperature IUFillNumber(&TemperatureN[0], "TEMPERATURE", "Celsius", "%6.2f", -50, 70., 0., 0.); IUFillNumberVector(&TemperatureNP, TemperatureN, 1, getDeviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE); // Relative and absolute movement FocusRelPosN[0].min = 0.; FocusRelPosN[0].max = 50000.; FocusRelPosN[0].value = 0; FocusRelPosN[0].step = 1000; FocusAbsPosN[0].min = 0.; FocusAbsPosN[0].max = 100000.; FocusAbsPosN[0].value = 0; FocusAbsPosN[0].step = 1000; setDefaultPollingPeriod(500); addDebugControl(); return true; }
void INDI::GuiderInterface::initGuiderProperties(const char *deviceName, const char *groupName) { IUFillNumber(&GuideNSN[DIRECTION_NORTH], "TIMED_GUIDE_N", "North (ms)", "%.f", 0, 60000, 100, 0); IUFillNumber(&GuideNSN[DIRECTION_SOUTH], "TIMED_GUIDE_S", "South (ms)", "%.f", 0, 60000, 100, 0); IUFillNumberVector(&GuideNSNP, GuideNSN, 2, deviceName, "TELESCOPE_TIMED_GUIDE_NS", "Guide N/S", groupName, IP_RW, 60, IPS_IDLE); IUFillNumber(&GuideWEN[DIRECTION_WEST], "TIMED_GUIDE_W", "West (ms)", "%.f", 0, 60000, 100, 0); IUFillNumber(&GuideWEN[DIRECTION_EAST], "TIMED_GUIDE_E", "East (ms)", "%.f", 0, 60000, 100, 0); IUFillNumberVector(&GuideWENP, GuideWEN, 2, deviceName, "TELESCOPE_TIMED_GUIDE_WE", "Guide E/W", groupName, IP_RW, 60, IPS_IDLE); }
/******************************************************************************* ** INDI is asking us to init our properties. *******************************************************************************/ bool DSICCD::initProperties() { // Must init parent properties first! INDI::CCD::initProperties(); // Add Debug Control. addDebugControl(); /* Add Gain number property (gs) */ IUFillNumber(GainN, "GAIN", "Gain", "%g", 0, 100, 1, 100); IUFillNumberVector(&GainNP, GainN, 1, getDeviceName(),"GAIN", "Gain", IMAGE_SETTINGS_TAB, IP_RW, 0, IPS_IDLE); /* Add Offset number property (gs) */ IUFillNumber(OffsetN, "OFFSET", "Offset", "%g", -50, 50, 1, 0); IUFillNumberVector(&OffsetNP, OffsetN, 1, getDeviceName(),"OFFSET", "Offset", IMAGE_SETTINGS_TAB, IP_RW, 0, IPS_IDLE); /* Vdd on during exposure property (gs) Actually, Meade envisage leaves Vdd always on for DSI III during exposure. However, this results in a significant amount of amp glow. Vdd auto mode also seems not to work properly for the DSI III. Experimentally, it turned out that swiching Vdd off manually during exposure significantly reduces amp glow and also noise by some amount. Hence this strategy is used by default but can be changed to envisage default mode by setting the following switch to ON. */ IUFillSwitch(&VddExpS[0], "Vdd On", "", ISS_OFF); IUFillSwitch(&VddExpS[1], "Vdd Off", "", ISS_ON); IUFillSwitchVector(&VddExpSP, VddExpS, 2, getDeviceName(), "DSI III exposure", "", IMAGE_SETTINGS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); /* Add Temp number property (gs) */ IUFillNumber(CCDTempN, "CCDTEMP", "CCD Temperature [°C]", "%.1f", -128.5,128.5,0.1,-128.5); IUFillNumberVector(&CCDTempNP, CCDTempN, 1, getDeviceName(), "CCDTemp", "CCD Temp", IMAGE_INFO_TAB, IP_RO, 0, IPS_IDLE); /* Set exposure times according to Meade datasheets (gs) Ekos probably may limit minimum exposure time to 1/1000 s, but setting the lower limit to 1/10000 s might be useful e.g. for taking bias frames. */ PrimaryCCD.setMinMaxStep("CCD_EXPOSURE", "CCD_EXPOSURE_VALUE", 0.0001, 3600, 1, false); return true; }
void JoyStick::setupParams() { char propName[16]={0}, propLabel[16]={0}; if (driver == nullptr) return; int nAxis = driver->getNumOfAxes(); int nJoysticks = driver->getNumOfJoysticks(); int nButtons = driver->getNumrOfButtons(); JoyStickNP = new INumberVectorProperty[nJoysticks]; JoyStickN = new INumber[nJoysticks * 2]; AxisN = new INumber[nAxis]; ButtonS = new ISwitch[nButtons]; for (int i = 0; i < nJoysticks * 2; i += 2) { snprintf(propName, 16, "JOYSTICK_%d", i / 2 + 1); snprintf(propLabel, 16, "Joystick %d", i / 2 + 1); IUFillNumber(&JoyStickN[i], "JOYSTICK_MAGNITUDE", "Magnitude", "%g", -32767.0, 32767.0, 0, 0); IUFillNumber(&JoyStickN[i + 1], "JOYSTICK_ANGLE", "Angle", "%g", 0, 360.0, 0, 0); IUFillNumberVector(&JoyStickNP[i / 2], JoyStickN + i, 2, getDeviceName(), propName, propLabel, "Monitor", IP_RO, 0, IPS_IDLE); } for (int i = 0; i < nAxis; i++) { snprintf(propName, 16, "AXIS_%d", i + 1); snprintf(propLabel, 16, "Axis %d", i + 1); IUFillNumber(&AxisN[i], propName, propLabel, "%g", -32767.0, 32767.0, 0, 0); } IUFillNumberVector(&AxisNP, AxisN, nAxis, getDeviceName(), "JOYSTICK_AXES", "Axes", "Monitor", IP_RO, 0, IPS_IDLE); for (int i = 0; i < nButtons; i++) { snprintf(propName, 16, "BUTTON_%d", i + 1); snprintf(propLabel, 16, "Button %d", i + 1); IUFillSwitch(&ButtonS[i], propName, propLabel, ISS_OFF); } IUFillSwitchVector(&ButtonSP, ButtonS, nButtons, getDeviceName(), "JOYSTICK_BUTTONS", "Buttons", "Monitor", IP_RO, ISR_NOFMANY, 0, IPS_IDLE); }
bool ASIEAF::initProperties() { INDI::Focuser::initProperties(); // Focuser temperature IUFillNumber(&TemperatureN[0], "TEMPERATURE", "Celsius", "%6.2f", -50, 70., 0., 0.); IUFillNumberVector(&TemperatureNP, TemperatureN, 1, getDeviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE); // Focus motion beep IUFillSwitch(&BeepS[BEEP_ON], "ON", "On", ISS_ON); IUFillSwitch(&BeepS[BEEL_OFF], "OFF", "Off", ISS_OFF); IUFillSwitchVector(&BeepSP, BeepS, 2, getDeviceName(), "FOCUS_BEEP", "Beep", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); FocusRelPosN[0].min = 0.; FocusRelPosN[0].max = m_MaxSteps / 2.0; FocusRelPosN[0].value = 0; FocusRelPosN[0].step = FocusRelPosN[0].max / 20; FocusAbsPosN[0].min = 0.; FocusAbsPosN[0].max = m_MaxSteps; FocusAbsPosN[0].value = 0; FocusAbsPosN[0].step = m_MaxSteps / 20.0; setDefaultPollingPeriod(500); addDebugControl(); return true; }
bool INDI::CCD::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) { // Ok, lets see if this is a property wer process //IDLog("IndiTelescope got %d new text items name %s\n",n,name); // first check if it's for our device if(strcmp(dev,getDeviceName())==0) { // This is for our device // Now lets see if it's something we process here if(strcmp(name,ActiveDeviceTP->name)==0) { int rc; //IDLog("calling update text\n"); ActiveDeviceTP->s=IPS_OK; rc=IUUpdateText(ActiveDeviceTP,texts,names,n); //IDLog("update text returns %d\n",rc); // Update client display IDSetText(ActiveDeviceTP,NULL); saveConfig(); IUFillNumberVector(&EqNP,EqN,2,ActiveDeviceT[0].text,"EQUATORIAL_PEC","EQ PEC",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE); IDSnoopDevice(ActiveDeviceT[0].text,"EQUATORIAL_PEC"); IDSnoopDevice(ActiveDeviceT[0].text,"TELESCOPE_INFO"); IDSnoopDevice(ActiveDeviceT[1].text,"FWHM"); // We processed this one, so, tell the world we did it return true; } } return INDI::DefaultDevice::ISNewText(dev,name,texts,names,n); }
bool FocusMaster::initProperties() { INDI::Focuser::initProperties(); // Sync to a particular position IUFillNumber(&SyncN[0], "Ticks", "", "%.f", 0, 100000, 100., 0.); IUFillNumberVector(&SyncNP, SyncN, 1, getDeviceName(), "Sync", "", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE); // Full Forward/Reverse Motion IUFillSwitch(&FullMotionS[FOCUS_INWARD], "FULL_INWARD", "Full Inward", ISS_OFF); IUFillSwitch(&FullMotionS[FOCUS_OUTWARD], "FULL_OUTWARD", "Full Outward", ISS_OFF); IUFillSwitchVector(&FullMotionSP, FullMotionS, 2, getDeviceName(), "FULL_MOTION", "Full Motion", MAIN_CONTROL_TAB, IP_RW, ISR_ATMOST1, 0, IPS_IDLE); FocusAbsPosN[0].min = SyncN[0].min = 0; FocusAbsPosN[0].max = SyncN[0].max; FocusAbsPosN[0].step = SyncN[0].step; FocusAbsPosN[0].value = 0; FocusRelPosN[0].max = (FocusAbsPosN[0].max - FocusAbsPosN[0].min) / 2; FocusRelPosN[0].step = FocusRelPosN[0].max / 100.0; FocusRelPosN[0].value = 100; addSimulationControl(); return true; }
bool INDI::Focuser::initProperties() { DefaultDevice::initProperties(); // let the base class flesh in what it wants initFocuserProperties(getDeviceName(), MAIN_CONTROL_TAB); /* Port */ IUFillText(&PortT[0], "PORT", "Port", "/dev/ttyUSB0"); IUFillTextVector(&PortTP, PortT, 1, getDeviceName(), "DEVICE_PORT", "Ports", OPTIONS_TAB, IP_RW, 0, IPS_IDLE); // Presets IUFillNumber(&PresetN[0], "Preset 1", "", "%6.2f", 0, 60000, 1000, 0); IUFillNumber(&PresetN[1], "Preset 2", "", "%6.2f", 0, 60000, 1000, 0); IUFillNumber(&PresetN[2], "Preset 3", "", "%6.2f", 0, 60000, 1000, 0); IUFillNumberVector(&PresetNP, PresetN, 3, getDeviceName(), "Presets", "", "Presets", IP_RW, 0, IPS_IDLE); //Preset GOTO IUFillSwitch(&PresetGotoS[0], "Preset 1", "", ISS_OFF); IUFillSwitch(&PresetGotoS[1], "Preset 2", "", ISS_OFF); IUFillSwitch(&PresetGotoS[2], "Preset 3", "", ISS_OFF); IUFillSwitchVector(&PresetGotoSP, PresetGotoS, 3, getDeviceName(), "Goto", "", "Presets", IP_RW, ISR_1OFMANY, 0, IPS_IDLE); addDebugControl(); controller->mapController("Focus In", "Focus In", INDI::Controller::CONTROLLER_BUTTON, "BUTTON_1"); controller->mapController("Focus Out", "Focus Out", INDI::Controller::CONTROLLER_BUTTON, "BUTTON_2"); controller->mapController("Abort Focus", "Abort Focus", INDI::Controller::CONTROLLER_BUTTON, "BUTTON_3"); controller->initProperties(); setDriverInterface(FOCUSER_INTERFACE); return true; }
bool WatchDog::initProperties() { INDI::DefaultDevice::initProperties(); IUFillNumber(&HeartBeatN[0], "WATCHDOG_HEARTBEAT_VALUE", "Threshold (min)", "%g", 0, 180, 10, 0); IUFillNumberVector(&HeartBeatNP, HeartBeatN, 1, getDeviceName(), "WATCHDOG_HEARTBEAT", "Heart beat", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); IUFillText(&SettingsT[0], "INDISERVER_HOST", "indiserver host", "localhost"); IUFillText(&SettingsT[1], "INDISERVER_PORT", "indiserver port", "7624"); IUFillText(&SettingsT[2], "SHUTDOWN_SCRIPT", "shutdown script", nullptr); IUFillTextVector(&SettingsTP, SettingsT, 3, getDeviceName(), "WATCHDOG_SETTINGS", "Settings", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); IUFillSwitch(&ShutdownProcedureS[PARK_MOUNT], "PARK_MOUNT", "Park Mount", ISS_OFF); IUFillSwitch(&ShutdownProcedureS[PARK_DOME], "PARK_DOME", "Park Dome", ISS_OFF); IUFillSwitch(&ShutdownProcedureS[EXECUTE_SCRIPT], "EXECUTE_SCRIPT", "Execute Script", ISS_OFF); IUFillSwitchVector(&ShutdownProcedureSP, ShutdownProcedureS, 3, getDeviceName(), "WATCHDOG_SHUTDOWN", "Shutdown", MAIN_CONTROL_TAB, IP_RW, ISR_NOFMANY, 60, IPS_IDLE); IUFillText(&ActiveDeviceT[ACTIVE_TELESCOPE], "ACTIVE_TELESCOPE", "Telescope", "Telescope Simulator"); IUFillText(&ActiveDeviceT[ACTIVE_DOME], "ACTIVE_DOME", "Dome", "Dome Simulator"); IUFillTextVector(&ActiveDeviceTP, ActiveDeviceT, 2, getDeviceName(), "ACTIVE_DEVICES", "Active devices", OPTIONS_TAB, IP_RW, 60, IPS_IDLE); addDebugControl(); return true; }
/************************************************************************************** ** INDI is asking us to init our properties. ***************************************************************************************/ bool INovaCCD::initProperties() { // Must init parent properties first! INDI::CCD::initProperties(); // We init the property details. This is a stanard property of the INDI Library. IUFillText(&iNovaInformationT[0], "INOVA_NAME", "Camera Name", ""); IUFillText(&iNovaInformationT[1], "INOVA_SENSOR_NAME", "Sensor Name", ""); IUFillText(&iNovaInformationT[2], "INOVA_SN", "Serial Number", ""); IUFillText(&iNovaInformationT[3], "INOVA_ST4", "Can Guide", ""); IUFillText(&iNovaInformationT[4], "INOVA_COLOR", "Color Sensor", ""); IUFillTextVector(&iNovaInformationTP, iNovaInformationT, 5, getDeviceName(), "INOVA_INFO", "iNova Info", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); IUFillNumber(&CameraPropertiesN[CCD_GAIN_N], "CCD_GAIN_VALUE", "Gain", "%4.0f", 0, 1023, 1, 255); IUFillNumber(&CameraPropertiesN[CCD_BLACKLEVEL_N], "CCD_BLACKLEVEL_VALUE", "Black Level", "%3.0f", 0, 255, 1, 0); IUFillNumberVector(&CameraPropertiesNP, CameraPropertiesN, 2, getDeviceName(), "CCD_PROPERTIES", "Control", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); // Set minimum exposure speed to 0.001 seconds PrimaryCCD.setMinMaxStep("CCD_EXPOSURE", "CCD_EXPOSURE_VALUE", 0.0001, 1000, 1, false); setDefaultPollingPeriod(500); return true; }
bool WeatherMeta::initProperties() { INDI::DefaultDevice::initProperties(); // Active Devices IUFillText(&ActiveDeviceT[0], "ACTIVE_WEATHER_1", "Station #1", nullptr); IUFillText(&ActiveDeviceT[1], "ACTIVE_WEATHER_2", "Station #2", nullptr); IUFillText(&ActiveDeviceT[2], "ACTIVE_WEATHER_3", "Station #3", nullptr); IUFillText(&ActiveDeviceT[3], "ACTIVE_WEATHER_4", "Station #4", nullptr); IUFillTextVector(&ActiveDeviceTP, ActiveDeviceT, 4, getDeviceName(), "ACTIVE_DEVICES", "Stations", OPTIONS_TAB, IP_RW, 60, IPS_IDLE); // Station Status IUFillLight(&StationL[0], "STATION_STATUS_1", "Station #1", IPS_IDLE); IUFillLight(&StationL[1], "STATION_STATUS_2", "Station #2", IPS_IDLE); IUFillLight(&StationL[2], "STATION_STATUS_3", "Station #3", IPS_IDLE); IUFillLight(&StationL[3], "STATION_STATUS_4", "Station #4", IPS_IDLE); IUFillLightVector(&StationLP, StationL, 4, getDeviceName(), "WEATHER_STATUS", "Status", MAIN_CONTROL_TAB, IPS_IDLE); // Update Period IUFillNumber(&UpdatePeriodN[0], "PERIOD", "Period (secs)", "%4.2f", 0, 3600, 60, 60); IUFillNumberVector(&UpdatePeriodNP, UpdatePeriodN, 1, getDeviceName(), "WEATHER_UPDATE", "Update", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE); addDebugControl(); setDriverInterface(AUX_INTERFACE); return true; }
bool LX200_16::initProperties() { LX200GPS::initProperties(); IUFillSwitch(&FanStatusS[0], "On", "", ISS_OFF); IUFillSwitch(&FanStatusS[1], "Off", "", ISS_OFF); IUFillSwitchVector(&FanStatusSP, FanStatusS, 2, getDeviceName(), "Fan", "", LX16_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); IUFillSwitch(&HomeSearchS[0], "Save Home", "", ISS_OFF); IUFillSwitch(&HomeSearchS[1], "Set Home", "", ISS_OFF); IUFillSwitchVector(&HomeSearchSP, HomeSearchS, 2, getDeviceName(), "Home", "", LX16_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); IUFillSwitch(&FieldDeRotatorS[0], "On", "", ISS_OFF); IUFillSwitch(&FieldDeRotatorS[1], "Off", "", ISS_OFF); IUFillSwitchVector(&FieldDeRotatorSP, FieldDeRotatorS, 2, getDeviceName(), "Field De-Rotator", "", LX16_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); IUFillNumber(&HorizontalCoordsN[0], "ALT", "Alt D:M:S", "%10.6m", -90., 90.0, 0.0, 0); IUFillNumber(&HorizontalCoordsN[1], "AZ", "Az D:M:S", "%10.6m", 0.0, 360.0, 0.0, 0); IUFillNumberVector(&HorizontalCoordsNP, HorizontalCoordsN, 2, getDeviceName(), "HORIZONTAL_COORD", "Horizontal Coord", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE); return true; }
bool XAGYLWheel::initProperties() { INDI::FilterWheel::initProperties(); // Device port IUFillText(&PortT[0],"PORT","Port","/dev/ttyUSB0"); IUFillTextVector(&PortTP,PortT,1,getDeviceName(),"DEVICE_PORT","Ports",OPTIONS_TAB,IP_RW,60,IPS_IDLE); // Firmware info IUFillText(&FirmwareInfoT[0],"Product","",NULL); IUFillText(&FirmwareInfoT[1],"Firmware","",NULL); IUFillText(&FirmwareInfoT[2],"Serial #","",NULL); IUFillTextVector(&FirmwareInfoTP,FirmwareInfoT,3,getDeviceName(),"Info","",MAIN_CONTROL_TAB,IP_RO,60,IPS_IDLE); // Settings IUFillNumber(&SettingsN[0], "Speed", "", "%.f", 0, 100, 10., 0.); IUFillNumber(&SettingsN[1], "Jitter", "", "%.f", 0, 10, 1., 0.); IUFillNumber(&SettingsN[2], "Threshold", "", "%.f", 0, 100, 10., 0.); IUFillNumber(&SettingsN[3], "Pulse Width", "", "%.f", 100, 10000, 100., 0.); IUFillNumberVector(&SettingsNP, SettingsN, 4, getDeviceName(), "Settings", "", SETTINGS_TAB, IP_RW, 0, IPS_IDLE); // Reset IUFillSwitch(&ResetS[0], "Reboot", "", ISS_OFF); IUFillSwitch(&ResetS[1], "Initialize", "", ISS_OFF); IUFillSwitch(&ResetS[2], "Clear Calibration", "", ISS_OFF); IUFillSwitch(&ResetS[3], "Perform Calibration", "", ISS_OFF); IUFillSwitchVector(&ResetSP, ResetS, 4, getDeviceName(), "Commands", "", MAIN_CONTROL_TAB, IP_RW, ISR_ATMOST1, 0, IPS_IDLE); addAuxControls(); return true; }
bool WeatherSafetyProxy::initProperties() { INDI::Weather::initProperties(); IUFillText(&keywordT[0], "WEATHER_CONDITION", "Weather Condition", "condition"); IUFillTextVector(&keywordTP, keywordT, 1, getDeviceName(), "KEYWORD", "Keywords", OPTIONS_TAB, IP_RW, 60, IPS_IDLE); IUFillText(&ScriptsT[WSP_SCRIPT], "WEATHER_SAFETY_SCRIPT", "Weather safety script", "/usr/local/share/indi/scripts/weather_status.py"); IUFillTextVector(&ScriptsTP, ScriptsT, WSP_SCRIPT_COUNT, getDefaultName(), "WEATHER_SAFETY_SCRIPTS", "Script", OPTIONS_TAB, IP_RW, 100, IPS_IDLE); IUFillText(&UrlT[WSP_URL], "WEATHER_SAFETY_URL", "Weather safety URL", "http://0.0.0.0:5000/weather/safety"); IUFillTextVector(&UrlTP, UrlT, WSP_URL_COUNT, getDefaultName(), "WEATHER_SAFETY_URLS", "Url", OPTIONS_TAB, IP_RW, 100, IPS_IDLE); IUFillSwitch(&ScriptOrCurlS[WSP_USE_SCRIPT], "Use script", "", ISS_ON); IUFillSwitch(&ScriptOrCurlS[WSP_USE_CURL], "Use url", "", ISS_OFF); IUFillSwitchVector(&ScriptOrCurlSP, ScriptOrCurlS, WSP_USE_COUNT, getDeviceName(), "SCRIPT_OR_CURL", "Script or url", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE); IUFillNumber(&softErrorHysteresisN[WSP_SOFT_ERROR_MAX], "SOFT_ERROR_MAX", "Max soft errors", "%g", 0.0, 1000.0, 1.0, 30.0); IUFillNumber(&softErrorHysteresisN[WSP_SOFT_ERROR_RECOVERY], "SOFT_ERROR_RECOVERY", "Minumum soft error for recovery", "%g", 0.0, 1000.0, 1.0, 7.0); IUFillNumberVector(&softErrorHysteresisNP, softErrorHysteresisN, 2, getDeviceName(), "SOFT_ERROR_HYSTERESIS", "Soft error hysterese", OPTIONS_TAB, IP_RW, 0, IPS_IDLE); addParameter("WEATHER_SAFETY", "Weather Safety", 0.9, 1.1, 0); // 0 is unsafe, 1 is safe setCriticalParameter("WEATHER_SAFETY"); IUFillText(&reasonsT[0], "Reasons", "", nullptr); IUFillTextVector(&reasonsTP, reasonsT, 1, getDeviceName(), "WEATHER_SAFETY_REASONS", "Weather Safety Reasons", MAIN_CONTROL_TAB, IP_RO, 120, IPS_IDLE); addDebugControl(); return true; }
bool FocusSim::initProperties() { INDI::Focuser::initProperties(); IUFillNumber(&SeeingN[0],"SIM_SEEING","arcseconds","%4.2f",0,60,0,3.5); IUFillNumberVector(&SeeingNP,SeeingN,1,getDeviceName(),"SEEING_SETTINGS","Seeing",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE); IUFillNumber(&FWHMN[0],"SIM_FWHM","arcseconds","%4.2f",0,60,0,7.5); IUFillNumberVector(&FWHMNP,FWHMN,1,getDeviceName(), "FWHM","FWHM",MAIN_CONTROL_TAB,IP_RO,60,IPS_IDLE); ticks = initTicks = sqrt(FWHMN[0].value - SeeingN[0].value) / 0.75; FocusAbsPosN[0].value = FocusAbsPosN[0].max / 2; return true; }
/************************************************************************************** ** INDI is asking us to init our properties. ***************************************************************************************/ bool RadioSim::initProperties() { // Must init parent properties first! INDI::Detector::initProperties(); // We set the Detector capabilities uint32_t cap = DETECTOR_CAN_ABORT | DETECTOR_HAS_CONTINUUM | DETECTOR_HAS_SPECTRUM; SetDetectorCapability(cap); IUFillNumber(&DetectorPropertiesN[0], "DETECTOR_SIZE", "Dish size (m)", "%4.0f", 5, MAX_DISH_SIZE_M, 1, 5.0); IUFillNumberVector(&DetectorPropertiesNP, DetectorPropertiesN, 1, getDeviceName(), "DETECTOR_PROPERTIES", "Control", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); PrimaryDetector.setMinMaxStep("DETECTOR_CAPTURE", "DETECTOR_CAPTURE_VALUE", 1.0e-6, 86164.092, 0.001, false); PrimaryDetector.setMinMaxStep("DETECTOR_SETTINGS", "DETECTOR_FREQUENCY", 1.0e+6, 50.0e+9, 1.0, false); PrimaryDetector.setMinMaxStep("DETECTOR_SETTINGS", "DETECTOR_SAMPLERATE", 1.0e+3, 100.0e+3, 1.0, false); PrimaryDetector.setMinMaxStep("DETECTOR_SETTINGS", "DETECTOR_GAIN", 0.0, 25.0, 1.0, false); PrimaryDetector.setMinMaxStep("DETECTOR_SETTINGS", "DETECTOR_BANDWIDTH", 1.0e+3, 100.0e+6, 1.0, false); PrimaryDetector.setMinMaxStep("DETECTOR_SETTINGS", "DETECTOR_BITSPERSAMPLE", -64, -64, -64, false); PrimaryDetector.setCaptureExtension("fits"); // Add Debug, Simulator, and Configuration controls addAuxControls(); setDefaultPollingPeriod(500); 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 CCDSim::initProperties() { // Most hardware layers wont actually have indi properties defined // but the simulators are a special case INDI::CCD::initProperties(); IUFillNumber(&SimulatorSettingsN[0],"SIM_XRES","CCD X resolution","%4.0f",0,2048,0,1280); IUFillNumber(&SimulatorSettingsN[1],"SIM_YRES","CCD Y resolution","%4.0f",0,2048,0,1024); IUFillNumber(&SimulatorSettingsN[2],"SIM_XSIZE","CCD X Pixel Size","%4.2f",0,60,0,5.2); IUFillNumber(&SimulatorSettingsN[3],"SIM_YSIZE","CCD Y Pixel Size","%4.2f",0,60,0,5.2); IUFillNumber(&SimulatorSettingsN[4],"SIM_MAXVAL","CCD Maximum ADU","%4.0f",0,65000,0,65000); IUFillNumber(&SimulatorSettingsN[5],"SIM_BIAS","CCD Bias","%4.0f",0,6000,0,1500); IUFillNumber(&SimulatorSettingsN[6],"SIM_SATURATION","Saturation Mag","%4.1f",0,20,0,1.0); IUFillNumber(&SimulatorSettingsN[7],"SIM_LIMITINGMAG","Limiting Mag","%4.1f",0,20,0,20); IUFillNumber(&SimulatorSettingsN[8],"SIM_NOISE","CCD Noise","%4.0f",0,6000,0,50); IUFillNumber(&SimulatorSettingsN[9],"SIM_SKYGLOW","Sky Glow (magnitudes)","%4.1f",0,6000,0,19.5); IUFillNumber(&SimulatorSettingsN[10],"SIM_OAGOFFSET","Oag Offset (arcminutes)","%4.1f",0,6000,0,0); IUFillNumberVector(SimulatorSettingsNV,SimulatorSettingsN,11,getDeviceName(),"SIMULATOR_SETTINGS","Simulator Settings","Simulator Config",IP_RW,60,IPS_IDLE); IUFillSwitch(&TimeFactorS[0],"1X","Actual Time",ISS_ON); IUFillSwitch(&TimeFactorS[1],"10X","10x",ISS_OFF); IUFillSwitch(&TimeFactorS[2],"100X","100x",ISS_OFF); IUFillSwitchVector(TimeFactorSV,TimeFactorS,3,getDeviceName(),"ON_TIME_FACTOR","Time Factor","Simulator Config",IP_RW,ISR_1OFMANY,60,IPS_IDLE); IUFillNumber(&FWHMN[0],"SIM_FWHM","FWHM (arcseconds)","%4.2f",0,60,0,7.5); IUFillNumberVector(&FWHMNP,FWHMN,1,"Focuser Simulator", "FWHM","FWHM",OPTIONS_TAB,IP_RO,60,IPS_IDLE); IUFillNumber(&ScopeParametersN[0],"TELESCOPE_APERTURE","Aperture (mm)","%g",50,4000,0,0.0); IUFillNumber(&ScopeParametersN[1],"TELESCOPE_FOCAL_LENGTH","Focal Length (mm)","%g",100,10000,0,0.0 ); IUFillNumber(&ScopeParametersN[2],"GUIDER_APERTURE","Guider Aperture (mm)","%g",50,4000,0,0.0); IUFillNumber(&ScopeParametersN[3],"GUIDER_FOCAL_LENGTH","Guider Focal Length (mm)","%g",100,10000,0,0.0 ); IUFillNumberVector(&ScopeParametersNP,ScopeParametersN,4,"Telescope Simulator","TELESCOPE_INFO","Scope Properties",OPTIONS_TAB,IP_RW,60,IPS_OK); IUFillNumber(&EqPECN[0],"RA_PEC","Ra (hh:mm:ss)","%010.6m",0,24,0,0); IUFillNumber(&EqPECN[1],"DEC_PEC","decPEC (dd:mm:ss)","%010.6m",-90,90,0,0); IUFillNumberVector(&EqPECNP,EqPECN,2,ActiveDeviceT[0].text,"EQUATORIAL_PEC","EQ PEC","Main Control",IP_RW,60,IPS_IDLE); IDSnoopDevice(ActiveDeviceT[0].text,"EQUATORIAL_PEC"); initFilterProperties(getDeviceName(), FILTER_TAB); return true; }
bool FishCampCCD::initProperties() { // Init parent properties first INDI::CCD::initProperties(); IUFillNumber(&GainN[0], "Range", "", "%g", 1, 15, 1., 4.); IUFillNumberVector(&GainNP, GainN, 1, getDeviceName(), "Gain", "", MAIN_CONTROL_TAB, IP_RW, 60, IPS_IDLE); IUFillNumber(&CoolerN[0], "Power %", "", "%g", 1, 100, 0, 0.0); IUFillNumberVector(&CoolerNP, CoolerN, 1, getDeviceName(), "Cooler", "", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE); char *strBuf = new char[MAXINDINAME]; IUFillText(&CamInfoT[0], "Name", "", name); IUFillText(&CamInfoT[1], "Serial #", "", (char *)&camInfo.camSerialStr); snprintf(strBuf, MAXINDINAME, "%d", camInfo.boardVersion); IUFillText(&CamInfoT[2], "Board version", "", strBuf); snprintf(strBuf, MAXINDINAME, "%d", camInfo.boardRevision); IUFillText(&CamInfoT[3], "Board revision", "", strBuf); snprintf(strBuf, MAXINDINAME, "%d", camInfo.fpgaVersion); IUFillText(&CamInfoT[4], "FPGA version", "", strBuf); snprintf(strBuf, MAXINDINAME, "%d", camInfo.fpgaRevision); IUFillText(&CamInfoT[5], "FPGA revision", "", strBuf); IUFillTextVector(&CamInfoTP, CamInfoT, 6, getDeviceName(), "Camera Info", "", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE); SetCCDParams(camInfo.width, camInfo.height, 16, camInfo.pixelWidth / 10.0, camInfo.pixelHeight / 10.0); int nbuf; nbuf = PrimaryCCD.getXRes() * PrimaryCCD.getYRes() * PrimaryCCD.getBPP() / 8; // this is pixel cameraCount nbuf += 512; // leave a little extra at the end PrimaryCCD.setFrameBufferSize(nbuf); SetCCDCapability(CCD_CAN_ABORT | CCD_CAN_SUBFRAME | CCD_HAS_COOLER | CCD_HAS_ST4_PORT); delete[] strBuf; return true; }