Example #1
0
bool RotatorInterface::updateProperties()
{
    if (m_defaultDevice->isConnected())
    {
        m_defaultDevice->defineNumber(&GotoRotatorNP);

        if (CanAbort())
            m_defaultDevice->defineSwitch(&AbortRotatorSP);
        if (CanSync())
            m_defaultDevice->defineNumber(&SyncRotatorNP);
        if (CanHome())
            m_defaultDevice->defineSwitch(&HomeRotatorSP);
        if (CanReverse())
            m_defaultDevice->defineSwitch(&ReverseRotatorSP);
    }
    else
    {        
        m_defaultDevice->deleteProperty(GotoRotatorNP.name);

        if (CanAbort())
            m_defaultDevice->deleteProperty(AbortRotatorSP.name);
        if (CanSync())
            m_defaultDevice->deleteProperty(SyncRotatorNP.name);
        if (CanHome())
            m_defaultDevice->deleteProperty(HomeRotatorSP.name);
        if (CanReverse())
            m_defaultDevice->deleteProperty(ReverseRotatorSP.name);
    }

    return true;
}
Example #2
0
bool FocuserInterface::updateProperties()
{
    if (m_defaultDevice->isConnected())
    {
        //  Now we add our focusser specific stuff
        m_defaultDevice->defineSwitch(&FocusMotionSP);

        if (HasVariableSpeed())
        {
            m_defaultDevice->defineNumber(&FocusSpeedNP);

            // We only define Focus Timer if we can not absolute move
            if (CanAbsMove() == false)
                m_defaultDevice->defineNumber(&FocusTimerNP);
        }
        if (CanRelMove())
            m_defaultDevice->defineNumber(&FocusRelPosNP);
        if (CanAbsMove())
        {
            m_defaultDevice->defineNumber(&FocusAbsPosNP);
            m_defaultDevice->defineNumber(&FocusMaxPosNP);
        }
        if (CanAbort())
            m_defaultDevice->defineSwitch(&FocusAbortSP);
        if (CanSync())
            m_defaultDevice->defineNumber(&FocusSyncNP);
        if (CanReverse())
            m_defaultDevice->defineSwitch(&FocusReverseSP);
    }
    else
    {
        m_defaultDevice->deleteProperty(FocusMotionSP.name);
        if (HasVariableSpeed())
        {
            m_defaultDevice->deleteProperty(FocusSpeedNP.name);

            if (CanAbsMove() == false)
                m_defaultDevice->deleteProperty(FocusTimerNP.name);
        }
        if (CanRelMove())
            m_defaultDevice->deleteProperty(FocusRelPosNP.name);
        if (CanAbsMove())
        {
            m_defaultDevice->deleteProperty(FocusAbsPosNP.name);
            m_defaultDevice->deleteProperty(FocusMaxPosNP.name);
        }
        if (CanAbort())
            m_defaultDevice->deleteProperty(FocusAbortSP.name);
        if (CanSync())
            m_defaultDevice->deleteProperty(FocusSyncNP.name);
        if (CanReverse())
            m_defaultDevice->deleteProperty(FocusReverseSP.name);
    }

    return true;
}
Example #3
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;
}
Example #4
0
bool FocuserInterface::updateProperties()
{
    if (m_defaultDevice->isConnected())
    {
        //  Now we add our focusser specific stuff
        m_defaultDevice->defineSwitch(&FocusMotionSP);

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

    return true;
}