Example #1
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 #2
0
bool FishCampCCD::updateProperties()
{
    INDI::CCD::updateProperties();

    if (isConnected())
    {
        defineText(&CamInfoTP);
        defineNumber(&CoolerNP);
        defineNumber(&GainNP);

        timerID = SetTimer(POLLMS);
    }
    else
    {
        deleteProperty(CamInfoTP.name);
        deleteProperty(CoolerNP.name);
        deleteProperty(GainNP.name);

        rmTimer(timerID);
    }

    return true;
}