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 Weather::updateProperties()
{
    DefaultDevice::updateProperties();

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

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

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

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

    return true;
}
Example #3
0
bool lacerta_mfoc::updateProperties()
{
    // Get Initial Position before we define it in the INDI::Focuser class
    FocusAbsPosN[0].value = GetAbsFocuserPosition();

    INDI::Focuser::updateProperties();

    if (isConnected())
    {
        defineNumber(&BacklashNP);
        defineNumber(&TempCompNP);
        defineSwitch(&TempTrackDirSP);
        defineSwitch(&StartSavedPositionSP);

    }
    else
    {
        deleteProperty(BacklashNP.name);
        deleteProperty(TempCompNP.name);
        deleteProperty(TempTrackDirSP.name);
        deleteProperty(StartSavedPositionSP.name);
    }

    return true;
}
Example #4
0
bool MaxDomeII::updateProperties()
{
    INDI::Dome::updateProperties();

    if (isConnected())
    {
        defineNumber(&HomeAzimuthNP);
        defineNumber(&TicksPerTurnNP);
        defineNumber(&ShutterOperationAzimuthNP);
        defineSwitch(&ShutterConflictSP);
        defineSwitch(&ShutterModeSP);
        defineSwitch(&HomeSP);
        defineNumber(&WatchDogNP);

        SetupParms();
    }
    else
    {
        deleteProperty(HomeAzimuthNP.name);
        deleteProperty(TicksPerTurnNP.name);
        deleteProperty(ShutterOperationAzimuthNP.name);
        deleteProperty(ShutterConflictSP.name);
        deleteProperty(ShutterModeSP.name);
        deleteProperty(HomeSP.name);
        deleteProperty(WatchDogNP.name);
    }

    return true;
}
Example #5
0
File: tcfs.cpp Project: djibb/indi
bool TCFS::updateProperties()
{
//LOGF_DEBUG("%s %s",__FUNCTION__, me);
    INDI::Focuser::updateProperties();

    if (isConnected())
    {
        defineSwitch(&FocusGotoSP);
        defineNumber(&FocusTemperatureNP);
        defineSwitch(&FocusPowerSP);
        defineSwitch(&FocusModeSP);
        defineSwitch(&FocusTelemetrySP);
        defineNumber(&FocusModeANP);
        defineNumber(&FocusModeBNP);;
        GetFocusParams();
    }
    else
    {
        deleteProperty(FocusGotoSP.name);
        deleteProperty(FocusTemperatureNP.name);
        deleteProperty(FocusPowerSP.name);
        deleteProperty(FocusModeSP.name);
        deleteProperty(FocusTelemetrySP.name);
        deleteProperty(FocusModeANP.name);
        deleteProperty(FocusModeBNP.name);;
    }

    return true;
}
Example #6
0
bool MoonLite::updateProperties()
{
    INDI::Focuser::updateProperties();

    if (isConnected())
    {
        defineNumber(&TemperatureNP);
        defineNumber(&MaxTravelNP);
        defineSwitch(&StepModeSP);
        defineNumber(&TemperatureSettingNP);
        defineSwitch(&TemperatureCompensateSP);
        defineNumber(&SyncNP);

        GetFocusParams();

        loadConfig(true);

        DEBUG(INDI::Logger::DBG_SESSION, "MoonLite paramaters updated, focuser ready for use.");
    }
    else
    {

        deleteProperty(TemperatureNP.name);
        deleteProperty(MaxTravelNP.name);
        deleteProperty(StepModeSP.name);
        deleteProperty(TemperatureSettingNP.name);
        deleteProperty(TemperatureCompensateSP.name);
        deleteProperty(SyncNP.name);
    }

    return true;

}
Example #7
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 #8
0
bool LX200GPS::updateProperties()
{
    LX200Autostar::updateProperties();

    if (isConnected())
    {
        defineSwitch(&GPSPowerSP);
        defineSwitch(&GPSStatusSP);
        defineSwitch(&GPSUpdateSP);
        defineSwitch(&AltDecPecSP);
        defineSwitch(&AzRaPecSP);
        defineSwitch(&SelenSyncSP);
        defineSwitch(&AltDecBacklashSP);
        defineSwitch(&AzRaBacklashSP);
        defineNumber(&OTATempNP);
        defineSwitch(&OTAUpdateSP);
    }
    else
    {
        deleteProperty(GPSPowerSP.name);
        deleteProperty(GPSStatusSP.name);
        deleteProperty(GPSUpdateSP.name);
        deleteProperty(AltDecPecSP.name);
        deleteProperty(AzRaPecSP.name);
        deleteProperty(SelenSyncSP.name);
        deleteProperty(AltDecBacklashSP.name);
        deleteProperty(AzRaBacklashSP.name);
        deleteProperty(OTATempNP.name);
        deleteProperty(OTAUpdateSP.name);
    }

    return true;
}
Example #9
0
bool ScopeSim::updateProperties()
{
    INDI::Telescope::updateProperties();

    if (isConnected())
    {
        defineNumber(&GuideNSNP);
        defineNumber(&GuideWENP);
        defineNumber(&GuideRateNP);

        #ifdef USE_EQUATORIAL_PE
        defineNumber(&EqPENV);
        defineSwitch(&PEErrNSSP);
        defineSwitch(&PEErrWESP);
        #endif

        if (InitPark())
        {
            // If loading parking data is successful, we just set the default parking values.
            SetAxis1ParkDefault(currentRA);
            SetAxis2ParkDefault(currentDEC);

            if (isParked())
            {
                currentRA = ParkPositionN[AXIS_RA].value;
                currentDEC= ParkPositionN[AXIS_DE].value;
            }
        }
        else
        {
            // Otherwise, we set all parking data to default in case no parking data is found.
            SetAxis1Park(currentRA);
            SetAxis2Park(currentDEC);
            SetAxis1ParkDefault(currentRA);
            SetAxis2ParkDefault(currentDEC);
        }

        sendTimeFromSystem();
    }
    else
    {
        deleteProperty(GuideNSNP.name);
        deleteProperty(GuideWENP.name);

        #ifdef USE_EQUATORIAL_PE
        deleteProperty(EqPENV.name);
        deleteProperty(PEErrNSSP.name);
        deleteProperty(PEErrWESP.name);
        #endif
        deleteProperty(GuideRateNP.name);
    }

    return true;
}
Example #10
0
bool ASICCD::updateProperties()
{
  INDI::CCD::updateProperties();

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

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

    if (ControlNP.nnp > 0)
     defineNumber(&ControlNP);

    if (ControlSP.nsp > 0)
        defineSwitch(&ControlSP);

    if (VideoFormatSP.nsp > 0)
        defineSwitch(&VideoFormatSP);

    SetTimer(POLLMS);
  } else
  {

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

    if (ControlNP.nnp > 0)
        deleteProperty(ControlNP.name);

    if (ControlSP.nsp > 0)
        deleteProperty(ControlSP.name);

    if (VideoFormatSP.nsp > 0)
        deleteProperty(VideoFormatSP.name);
  }

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

    INDI::Focuser::ISGetProperties(dev);

    defineSwitch(&TempTrackDirSP);
    loadConfig(true, TempTrackDirSP.name);

    defineSwitch(&StartSavedPositionSP);
    loadConfig(true, StartSavedPositionSP.name);
}
Example #12
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 #13
0
void ScopeSim::ISGetProperties(const char *dev)
{
    /* First we let our parent populate */
    INDI::Telescope::ISGetProperties(dev);

    if (isConnected())
    {
        defineNumber(&GuideNSNP);
        defineNumber(&GuideWENP);
        defineNumber(&GuideRateNP);
        defineNumber(&EqPENV);
        defineSwitch(&PEErrNSSP);
        defineSwitch(&PEErrWESP);
    }
}
Example #14
0
bool NStep::updateProperties()
{
    if (isConnected())
    {
        // Read these values before defining focuser interface properties
        readPosition();
        readSpeedInfo();
    }

    INDI::Focuser::updateProperties();

    if (isConnected())
    {
        if (readTemperature())
            defineNumber(&TemperatureNP);

        bool rc = getStartupValues();

        // Settings
        defineNumber(&MaxSpeedNP);
        defineSwitch(&CompensationModeSP);
        defineSwitch(&PrimeManualSP);
        defineNumber(&CompensationSettingsNP);
        defineSwitch(&SteppingModeSP);
        defineNumber(&SteppingPhaseNP);
        defineSwitch(&CoilStatusSP);

        if (rc)
            LOG_INFO("NStep is ready.");
        else
            LOG_WARN("Failed to query startup values.");
    }
    else
    {
        if (TemperatureNP.s == IPS_OK)
            deleteProperty(TemperatureNP.name);

        deleteProperty(MaxSpeedNP.name);
        deleteProperty(CompensationModeSP.name);
        deleteProperty(PrimeManualSP.name);
        deleteProperty(CompensationSettingsNP.name);
        deleteProperty(SteppingModeSP.name);
        deleteProperty(SteppingPhaseNP.name);
        deleteProperty(CoilStatusSP.name);
    }

    return true;
}
Example #15
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 #16
0
void MICCD::ISGetProperties(const char *dev)
{
    INDI::CCD::ISGetProperties(dev);

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

        defineSwitch(&ReadModeSP);

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

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

        if (hasGain)
            defineNumber(&GainNP);

        if (canDoPreflash)
            defineNumber(&PreflashNP);

        if (numFilters > 0)
        {
            INDI::FilterInterface::updateProperties();
        }
    }
}
Example #17
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);
    }
}
Example #18
0
void LX200_16::ISGetProperties (const char *dev)
{
    if(dev && strcmp(dev,getDeviceName()))
        return;

  // process parent first
  LX200GPS::ISGetProperties(dev);

  if (isConnected())
  {
      defineNumber(&HorizontalCoordsNP);
      defineSwitch(&FanStatusSP);
      defineSwitch(&HomeSearchSP);
      defineSwitch(&FieldDeRotatorSP);
  }
}
Example #19
0
bool ASIEAF::updateProperties()
{
    INDI::Focuser::updateProperties();

    if (isConnected())
    {
        float temperature = -273;
        EAFGetTemp(m_ID, &temperature);

        if (temperature != -273)
        {
            TemperatureN[0].value = temperature;
            TemperatureNP.s = IPS_OK;
            defineNumber(&TemperatureNP);
        }

        defineSwitch(&BeepSP);

        GetFocusParams();

        LOG_INFO("ASI EAF paramaters updated, focuser ready for use.");

        SetTimer(POLLMS);
    }
    else
    {
        if (TemperatureNP.s != IPS_IDLE)
            deleteProperty(TemperatureNP.name);
        deleteProperty(BeepSP.name);
    }

    return true;
}
Example #20
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 DSICCD::updateProperties()
{
    // Call parent update properties first
    INDI::CCD::updateProperties();

    if (isConnected())
    {

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

        // Start the timer
        SetTimer(POLLMS);
        defineNumber(&GainNP);
        defineNumber(&OffsetNP);
        defineNumber(&CCDTempNP);
	defineSwitch(&VddExpSP);
    }
    else
    {
        deleteProperty(GainNP.name);
        deleteProperty(OffsetNP.name);
        deleteProperty(CCDTempNP.name);
        deleteProperty(VddExpSP.name);
    }

    return true;
}
Example #21
0
bool INDI::Focuser::updateProperties()
{
    if(isConnected())
    {
        //  Now we add our focusser specific stuff
        defineSwitch(&FocusMotionSP);

        if (HasVariableSpeed())
        {
            defineNumber(&FocusSpeedNP);
            defineNumber(&FocusTimerNP);
        }
        if (CanRelMove())
            defineNumber(&FocusRelPosNP);
        if (CanAbsMove())
            defineNumber(&FocusAbsPosNP);
        if (CanAbort())
            defineSwitch(&AbortSP);
        if (CanAbsMove())
        {
            defineNumber(&PresetNP);
            defineSwitch(&PresetGotoSP);
        }
    } else
    {
        deleteProperty(FocusMotionSP.name);
        if (HasVariableSpeed())
        {
            deleteProperty(FocusSpeedNP.name);
            deleteProperty(FocusTimerNP.name);
        }
        if (CanRelMove())
            deleteProperty(FocusRelPosNP.name);
        if (CanAbsMove())
            deleteProperty(FocusAbsPosNP.name);
        if (CanAbort())
            deleteProperty(AbortSP.name);
        if (CanAbsMove())
        {
            deleteProperty(PresetNP.name);
            deleteProperty(PresetGotoSP.name);
        }
    }

    controller->updateProperties();
    return true;
}
bool ShelyakEshel::updateProperties()
{
    INDI::DefaultDevice::updateProperties();
    if (isConnected())
    {
        // create properties if we are connected
        defineSwitch(&MirrorSP);
        defineSwitch(&LampSP);
    }
    else
    {
        // delete properties if we aren't connected
        deleteProperty(MirrorSP.name);
        deleteProperty(LampSP.name);
    }
    return true;
}
Example #23
0
/************************************************************************************
 *
* ***********************************************************************************/
bool ScopeDome::updateProperties()
{
    INDI::Dome::updateProperties();

    if (isConnected())
    {
        defineSwitch(&FindHomeSP);
        defineSwitch(&DerotateSP);
        defineSwitch(&AutoCloseSP);
        defineSwitch(&PowerRelaysSP);
        defineSwitch(&RelaysSP);
        defineNumber(&DomeHomePositionNP);
        defineNumber(&EnvironmentSensorsNP);
        defineSwitch(&SensorsSP);
        defineSwitch(&ParkShutterSP);
        defineNumber(&FirmwareVersionsNP);
        SetupParms();
    }
    else
    {
        deleteProperty(FindHomeSP.name);
        deleteProperty(DerotateSP.name);
        deleteProperty(PowerRelaysSP.name);
        deleteProperty(RelaysSP.name);
        deleteProperty(SensorsSP.name);
        deleteProperty(AutoCloseSP.name);
        deleteProperty(DomeHomePositionNP.name);
        deleteProperty(EnvironmentSensorsNP.name);
        deleteProperty(ParkShutterSP.name);
        deleteProperty(FirmwareVersionsNP.name);
    }

    return true;
}
Example #24
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 #25
0
/************************************************************************************
 *
* ***********************************************************************************/
bool BaaderDome::updateProperties()
{
    INDI::Dome::updateProperties();

    if (isConnected())
    {
        defineSwitch(&DomeFlapSP);
        defineSwitch(&CalibrateSP);

        SetupParms();
    }
    else
    {
        deleteProperty(DomeFlapSP.name);
        deleteProperty(CalibrateSP.name);
    }

    return true;
}
Example #26
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 #27
0
File: ieqpro.cpp Project: mp77/indi
bool IEQPro::updateProperties()
{    
    INDI::Telescope::updateProperties();

    if (isConnected())
    {
        defineSwitch(&HomeSP);

        defineSwitch(&TrackModeSP);
        defineNumber(&CustomTrackRateNP);

        defineNumber(&GuideNSNP);
        defineNumber(&GuideWENP);
        defineNumber(&GuideRateNP);

        defineText(&FirmwareTP);
        defineSwitch(&GPSStatusSP);
        defineSwitch(&TimeSourceSP);
        defineSwitch(&HemisphereSP);

        getStartupData();
    }
    else
    {
        deleteProperty(HomeSP.name);

        deleteProperty(TrackModeSP.name);
        deleteProperty(CustomTrackRateNP.name);

        deleteProperty(GuideNSNP.name);
        deleteProperty(GuideWENP.name);
        deleteProperty(GuideRateNP.name);

        deleteProperty(FirmwareTP.name);
        deleteProperty(GPSStatusSP.name);
        deleteProperty(TimeSourceSP.name);
        deleteProperty(HemisphereSP.name);
    }

    return true;
}
Example #28
0
void CCDSim::ISGetProperties (const char *dev)
{
    //  First we let our parent populate

    //IDLog("CCDSim IsGetProperties with %s\n",dev);
    INDI::CCD::ISGetProperties(dev);

    defineNumber(SimulatorSettingsNV);
    defineSwitch(TimeFactorSV);

    return;
}
Example #29
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 #30
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();
}