Example #1
0
bool FlipFlat::updateProperties()
{
    INDI::DefaultDevice::updateProperties();

    if (isConnected())
    {
        if (isFlipFlat)
            defineSwitch(&ParkCapSP);
        defineSwitch(&LightSP);
        defineNumber(&LightIntensityNP);
        defineText(&StatusTP);
        defineText(&FirmwareTP);        

        updateLightBoxProperties();

        getStartupData();
    }
    else
    {
        if (isFlipFlat)
            deleteProperty(ParkCapSP.name);
        deleteProperty(LightSP.name);
        deleteProperty(LightIntensityNP.name);
        deleteProperty(StatusTP.name);
        deleteProperty(FirmwareTP.name);

        updateLightBoxProperties();
    }

    return true;
}
Example #2
0
bool IpFocus::updateProperties()
{

    INDI::Focuser::updateProperties();

    if (isConnected())
    {
        defineNumber(&SeeingNP);
        defineNumber(&FWHMNP);
        defineText(&BacklashStepsP);
        defineText(&FocuserEndpointTP);
        defineText(&AlwaysApproachDirectionP);
        SetupParms();
    }
    else
    {
        deleteProperty(SeeingNP.name);
        deleteProperty(FWHMNP.name);
        deleteProperty(BacklashStepsP.name);
        deleteProperty(FocuserEndpointTP.name);
        deleteProperty(AlwaysApproachDirectionP.name);
    }

    return true;
}
Example #3
0
/************************************************************************************
 *
* ***********************************************************************************/
bool FocusLynxF1::updateProperties()
/* Add the HUB properties on the driver
 * Only displayed and used by the first focuser F1
 */
{
    FocusLynxBase::updateProperties();

    if (isConnected())
    {
        defineText(&HubTP);
        defineText(&WiredTP);
        defineText(&WifiTP);
        defineNumber(&LedNP);

        if (getHubConfig())
            DEBUG(INDI::Logger::DBG_SESSION, "HUB paramaters updated.");
        else
        {
            DEBUG(INDI::Logger::DBG_ERROR, "Failed to retrieve HUB configuration settings...");
            return false;
        }
    }
    else
    {
        deleteProperty(HubTP.name);
        deleteProperty(WiredTP.name);
        deleteProperty(WifiTP.name);
        deleteProperty(LedNP.name);
    }
    return true;
}
Example #4
0
void IpFocus::ISGetProperties(const char *dev)
{
    INDI::Focuser::ISGetProperties(dev);

    defineText(&FocuserEndpointTP);
    defineText(&AlwaysApproachDirectionP);
    defineText(&BacklashStepsP);

    loadConfig(true, "FOCUSER_API_ENDPOINT");
    loadConfig(true, "BACKLASH_APPROACH_SETTINGS");
    loadConfig(true, "BACKLASH_STEPS_SETTINGS");
}
Example #5
0
bool StarbookDriver::updateProperties() {
    Telescope::updateProperties();
    if (isConnected()) {
        defineText(&VersionTP);
        defineText(&StateTP);
        defineSwitch(&StartSP);
    } else {
        deleteProperty(VersionTP.name);
        deleteProperty(StateTP.name);
        deleteProperty(StartSP.name);
    }
    return true;
}
Example #6
0
void WeatherWatcher::ISGetProperties(const char *dev)
{
    INDI::Weather::ISGetProperties(dev);

    defineText(&watchFileTP);
    loadConfig(true, "WATCH_SOURCE");

    defineText(&keywordTP);
    loadConfig(true, "KEYWORD");

    defineText(&separatorTP);
    loadConfig(true, "SEPARATOR_KEYWORD");

}
Example #7
0
void QHYCCD::ISGetProperties(const char *dev)
{
    INDI::CCD::ISGetProperties(dev);

    if (isConnected())
    {
        if (HasCooler())
        {
            defineSwitch(&CoolerSP);
            defineNumber(&CoolerNP);
        }

        if (HasUSBSpeed)
            defineNumber(&SpeedNP);

        if (HasGain)
            defineNumber(&GainNP);

        if (HasOffset)
            defineNumber(&OffsetNP);

        if (HasFilters)
        {
            //Define the Filter Slot and name properties
            defineNumber(&FilterSlotNP);
            if (FilterNameT != NULL)
                defineText(FilterNameTP);
        }

        if (HasUSBTraffic)
            defineNumber(&USBTrafficNP);
    }
}
void ShelyakEshel::ISGetProperties(const char *dev)
{
    INDI::DefaultDevice::ISGetProperties(dev);
    defineText(&PortTP);
    defineNumber(&SettingsNP);
    loadConfig(true, PortTP.name);
}
Example #9
0
void GPhotoCCD::ISGetProperties(const char *dev)
{
  INDI::CCD::ISGetProperties(dev);

  defineText(&PortTP);
  loadConfig(true, "DEVICE_PORT");

  if (isConnected())
  {
      if(PortTP.tp[0].text && strlen(PortTP.tp[0].text))
      {
          defineNumber(&mMirrorLockNP);
      }

      if (mIsoSP.nsp > 0)
            defineSwitch(&mIsoSP);
      if (mFormatSP.nsp > 0)
        defineSwitch(&mFormatSP);

      defineSwitch(&transferFormatSP);
      defineSwitch(&livePreviewSP);
      defineSwitch(&autoFocusSP);

      defineSwitch(&FocusMotionSP);
      defineNumber(&FocusSpeedNP);
      defineNumber(&FocusTimerNP);

      ShowExtendedOptions();
  }

  // Add Debug, Simulator, and Configuration controls
  addAuxControls();
}
Example #10
0
void MICCD::ISGetProperties(const char *dev)
{
    INDI::CCD::ISGetProperties(dev);

    if (isConnected())
    {
        if (HasCooler())
        {
            defineNumber(&TemperatureRampNP);
            defineNumber(&CoolerNP);
        }

        defineSwitch(&NoiseSP);

        if (maxFanValue > 0)
            defineNumber(&FanNP);

        if (maxHeatingValue > 0)
            defineNumber(&WindowHeatingNP);

        if (hasGain)
            defineNumber(&GainNP);

        if (numFilters > 0)
        {
            //Define the Filter Slot and name properties
            defineNumber(&FilterSlotNP);
            if (FilterNameT != NULL)
                defineText(FilterNameTP);
        }
    }
}
Example #11
0
bool Weather::updateProperties()
{
    DefaultDevice::updateProperties();

    if (isConnected())
    {
        WI::updateProperties();

        updateTimerID = -1;
        defineSwitch(&RefreshSP);
        defineNumber(&UpdatePeriodNP);
        defineNumber(&LocationNP);
        defineText(&ActiveDeviceTP);

        DEBUG(Logger::DBG_SESSION, "Weather update is in progress...");
        TimerHit();
    }
    else
    {
        WI::updateProperties();

        deleteProperty(RefreshSP.name);
        deleteProperty(UpdatePeriodNP.name);
        deleteProperty(LocationNP.name);
        deleteProperty(ActiveDeviceTP.name);
    }

    return true;
}
Example #12
0
/********************************************************************************************
** INDI is asking us to update the properties because there is a change in CONNECTION status
** This fucntion is called whenever the device is connected or disconnected.
*********************************************************************************************/
bool INovaCCD::updateProperties()
{
    // Call parent update properties
    INDI::CCD::updateProperties();

    if (isConnected())
    {
        // Define our properties
        IUSaveText(&iNovaInformationT[0], iNovaSDK_GetName());
        IUSaveText(&iNovaInformationT[1], iNovaSDK_SensorName());
        IUSaveText(&iNovaInformationT[2], iNovaSDK_SerialNumber());
        IUSaveText(&iNovaInformationT[3], (iNovaSDK_HasST4() ? "Yes" : "No"));
        IUSaveText(&iNovaInformationT[4], (iNovaSDK_HasColorSensor() ? "Yes" : "No"));
        defineText(&iNovaInformationTP);
        defineNumber(&CameraPropertiesNP);

        // Let's get parameters now from CCD
        setupParams();

        // Start the timer
        SetTimer(POLLMS);
    }
    else
        // We're disconnected
    {
        deleteProperty(iNovaInformationTP.name);
        deleteProperty(CameraPropertiesNP.name);
    }

    return true;
}
Example #13
0
void XAGYLWheel::ISGetProperties (const char *dev)
{
    INDI::FilterWheel::ISGetProperties(dev);

    defineText(&PortTP);
    loadConfig(true, "DEVICE_PORT");
}
Example #14
0
bool INDI::FilterWheel::updateProperties()
{
    //  Define more properties after we are connected
    //  first we want to update the values to reflect our actual wheel

    if(isConnected())
    {
        //initFilterProperties(getDeviceName(), FILTER_TAB);
        defineNumber(&FilterSlotNP);

        if (FilterNameT == NULL)
            GetFilterNames(FILTER_TAB);

        if (FilterNameT)
            defineText(FilterNameTP);
    }
    else
    {
        deleteProperty(FilterSlotNP.name);
        deleteProperty(FilterNameTP->name);
    }

    controller->updateProperties();
    return true;
}
Example #15
0
void GPhotoCCD::ISGetProperties(const char *dev)
{
  INDI::CCD::ISGetProperties(dev);

  defineText(&PortTP);
  loadConfig(true, "DEVICE_PORT");

  if (isConnected())
  {
      if (mIsoSP.nsp > 0)
            defineSwitch(&mIsoSP);
      if (mFormatSP.nsp > 0)
        defineSwitch(&mFormatSP);

      defineSwitch(&transferFormatSP);
      defineSwitch(&livePreviewSP);
      defineSwitch(&autoFocusSP);

      defineSwitch(&FocusMotionSP);
      defineNumber(&FocusSpeedNP);
      defineNumber(&FocusTimerNP);

      ShowExtendedOptions();

      ITextVectorProperty *modelTP = getText("model");
      if (modelTP && !strcmp(modelTP->label, "model") && strstr(modelTP->tp[0].text, "Canon"))
          defineNumber(&mMirrorLockNP);

  }

  // Add Debug, Simulator, and Configuration controls
  addAuxControls();
}
Example #16
0
bool ATIKCCD::updateProperties()
{
    INDI::CCD::updateProperties();

    if (isConnected())
    {
        if (HasCooler())
        {
            defineNumber(&CoolerNP);
            loadConfig(true, "CCD_COOLER_POWER");
            defineSwitch(&CoolerSP);
            loadConfig(true, "CCD_COOLER");
        }
        // Even if there is no cooler, we define temperature property as READ ONLY
        else
        {
            TemperatureNP.p = IP_RO;
            defineNumber(&TemperatureNP);
        }

        if (m_isHorizon)
        {
            defineSwitch(&ControlPresetsSP);
            defineNumber(&ControlNP);
        }

        if (m_CameraFlags & ARTEMIS_PROPERTIES_CAMERAFLAGS_HAS_FILTERWHEEL)
        {
            INDI::FilterInterface::updateProperties();
        }

        defineText(&VersionInfoSP);
    }
    else
    {
        if (HasCooler())
        {
            deleteProperty(CoolerNP.name);
            deleteProperty(CoolerSP.name);
        }
        else
            deleteProperty(TemperatureNP.name);

        if (m_isHorizon)
        {
            deleteProperty(ControlPresetsSP.name);
            deleteProperty(ControlNP.name);
        }

        if (m_CameraFlags & ARTEMIS_PROPERTIES_CAMERAFLAGS_HAS_FILTERWHEEL)
        {
            INDI::FilterInterface::updateProperties();
        }

        deleteProperty(VersionInfoSP.name);
    }

    return true;
}
Example #17
0
void WeatherMeta::ISGetProperties(const char *dev)
{
    INDI::DefaultDevice::ISGetProperties(dev);

    defineText(&ActiveDeviceTP);

    loadConfig(true, "ACTIVE_DEVICES");
}
Example #18
0
void WatchDog::ISGetProperties(const char *dev)
{
    //  First we let our parent populate
    DefaultDevice::ISGetProperties(dev);

    defineNumber(&HeartBeatNP);
    defineText(&SettingsTP);
    defineSwitch(&ShutdownProcedureSP);
    defineText(&ActiveDeviceTP);

    // Only load config first time and not on subsequent client connections
    if (watchDogTimer == -1)
        loadConfig(true);

    //watchdogClient->setTelescope(ActiveDeviceT[0].text);
    //watchdogClient->setDome(ActiveDeviceT[1].text);
}
Example #19
0
void WeatherSafetyProxy::ISGetProperties(const char *dev)
{
    INDI::Weather::ISGetProperties(dev);
    static bool once = true;
    if (once)
    {
        once = false;
        defineText(&ScriptsTP);
        defineText(&UrlTP);
        defineSwitch(&ScriptOrCurlSP);
        defineNumber(&softErrorHysteresisNP);
        loadConfig(false, "WEATHER_SAFETY_SCRIPTS");
        loadConfig(false, "WEATHER_SAFETY_URLS");
        loadConfig(false, "SCRIPT_OR_CURL");
        loadConfig(false, "SOFT_ERROR_HYSTERESIS");
    }
}
Example #20
0
void WunderGround::ISGetProperties(const char *dev)
{
    INDI::Weather::ISGetProperties(dev);

    defineText(&wunderAPIKeyTP);

    loadConfig(true, "WUNDER_API_KEY");
}
Example #21
0
bool JoyStick::updateProperties()
{

    INDI::DefaultDevice::updateProperties();

    char buf[8];

    if (isConnected())
    {
        // Name
        IUSaveText(&JoystickInfoT[0], driver->getName());
        // Version
        snprintf(buf, 8, "%d", driver->getVersion());
        IUSaveText(&JoystickInfoT[1], buf);
        // # of Joysticks
        snprintf(buf, 8, "%d", driver->getNumOfJoysticks());
        IUSaveText(&JoystickInfoT[2], buf);
        // # of Axes
        snprintf(buf, 8, "%d", driver->getNumOfAxes());
        IUSaveText(&JoystickInfoT[3], buf);
        // # of buttons
        snprintf(buf, 8, "%d", driver->getNumrOfButtons());
        IUSaveText(&JoystickInfoT[4], buf);

        defineText(&JoystickInfoTP);

        for (int i=0; i < driver->getNumOfJoysticks(); i++)
            defineNumber(&JoyStickNP[i]);

        defineNumber(&AxisNP);
        defineSwitch(&ButtonSP);

        // N.B. Only set callbacks AFTER we define our properties above
        // because these calls backs otherwise can be called asynchronously
        // and they mess up INDI XML output
        driver->setJoystickCallback(joystickHelper);
        driver->setAxisCallback(axisHelper);
        driver->setButtonCallback(buttonHelper);
    }
    else
    {
        deleteProperty(JoystickInfoTP.name);

        for (int i=0; i < driver->getNumOfJoysticks(); i++)
            deleteProperty(JoyStickNP[i].name);

        deleteProperty(AxisNP.name);
        deleteProperty(ButtonSP.name);

        delete [] JoyStickNP;
        delete [] JoyStickN;
        delete [] AxisN;
        delete [] ButtonS;
    }

    return true;
}
Example #22
0
bool Starbook::updateProperties() {
    Telescope::updateProperties();
    if (isConnected()) {
        defineText(&VersionInfo);
    } else {
        deleteProperty(VersionInfo.name);
    }
    return true;
}
Example #23
0
void Vantage::ISGetProperties(const char *dev)
{
    INDI::Weather::ISGetProperties(dev);

    defineText(&PortTP);
    defineSwitch(&BaudRateSP);

    loadConfig(true, "DEVICE_PORT");
    loadConfig(true, "DEVICE_BAUD_RATE");
}
Example #24
0
void FlipFlat::ISGetProperties (const char *dev)
{
    INDI::DefaultDevice::ISGetProperties(dev);

    defineText(&PortTP);
    loadConfig(true, "DEVICE_PORT");

    // Get Light box properties
    isGetLightBoxProperties(dev);
}
Example #25
0
/**************************************************************************************
** INDI is asking us to submit list of properties for the device
***************************************************************************************/
void INovaCCD::ISGetProperties(const char *dev)
{
    INDI::CCD::ISGetProperties(dev);

    if (isConnected())
    {
        // Define our properties
        defineText(&iNovaInformationTP);
        defineNumber(&CameraPropertiesNP);
    }
}
Example #26
0
void INDI::Focuser::ISGetProperties (const char *dev)
{
    //  First we let our parent populate
    DefaultDevice::ISGetProperties(dev);

    defineText(&PortTP);
    loadConfig(true, "DEVICE_PORT");

    controller->ISGetProperties(dev);
    return;
}
Example #27
0
bool QSICCD::updateProperties()
{

    INDI::CCD::updateProperties();

    if (isConnected())
    {
        defineSwitch(&CoolerSP);
        defineSwitch(&ShutterSP);
        defineNumber(&CoolerNP);
        defineNumber(&FilterSlotNP);
        defineSwitch(&FilterSP);

        setupParams();

        if (FilterNameT != NULL)
            defineText(FilterNameTP);

        manageDefaults();

        timerID = SetTimer(POLLMS);
    }
    else
    {
        deleteProperty(CoolerSP.name);
        deleteProperty(ShutterSP.name);
        deleteProperty(CoolerNP.name);
        deleteProperty(FilterSlotNP.name);
        deleteProperty(FilterSP.name);

        if (canSetGain)
            deleteProperty(GainSP.name);

        if (canSetAB)
            deleteProperty(ABSP.name);

        if (canControlFan)
            deleteProperty(FanSP.name);

        if (canChangeReadoutSpeed)
            deleteProperty(ReadOutSP.name);

        if (FilterNameT != NULL)
            deleteProperty(FilterNameTP->name);

        rmTimer(timerID);
    }

    return true;
}
Example #28
0
void JoyStick::ISGetProperties (const char *dev)
{
    INDI::DefaultDevice::ISGetProperties(dev);

    defineText(&PortTP);

    if (isConnected())
    {
        for (int i=0; i < driver->getNumOfJoysticks(); i++)
            defineNumber(&JoyStickNP[i]);

        defineNumber(&AxisNP);
        defineSwitch(&ButtonSP);
    }
}
Example #29
0
bool WeatherSafetyProxy::updateProperties()
{
    INDI::Weather::updateProperties();

    if (isConnected())
    {
        defineText(&reasonsTP);
    }
    else
    {
        deleteProperty(reasonsTP.name);
    }

    return true;
}
Example #30
0
void LX200Autostar::ISGetProperties(const char *dev)
{
    if (dev != nullptr && strcmp(dev, getDeviceName()) != 0)
        return;

    LX200Generic::ISGetProperties(dev);

    if (isConnected())
    {
        defineText(&VersionTP);
        defineNumber(&FocusSpeedNP);

        // For Autostar, we have a different focus speed method
        // Therefore, we don't need the classical one
        deleteProperty(FocusModeSP.name);
    }
}