Example #1
0
IPState FlipFlat::UnParkCap()
{
    if (isSimulation())
    {
        simulationWorkCounter = 3;
        return IPS_BUSY;
    }

    char response[FLAT_RES];
    if (!sendCommand(">O000", response))
        return IPS_ALERT;

    char expectedResponse[FLAT_RES];
    snprintf(expectedResponse, FLAT_RES, "*O%02d000", productID);

    if (strcmp(response, expectedResponse) == 0)
    {
        // Set cover status to random value outside of range to force it to refresh
        prevCoverStatus = 10;

        IERmTimer(unparkTimeoutID);
        unparkTimeoutID = IEAddTimer(30000, unparkTimeoutHelper, this);

        return IPS_BUSY;
    }
    else
        return IPS_ALERT;
}
Example #2
0
void
GPhotoCCD::HideExtendedOptions(void)
{
    if (optTID)
    {
		IERmTimer(optTID);
		optTID = 0;
	}

    while (CamOptions.begin() != CamOptions.end())
    {
		cam_opt *opt = (*CamOptions.begin()).second;
        IDDelete(getDeviceName(), (*CamOptions.begin()).first.c_str(), NULL);

        switch(opt->widget->type)
        {
		case GP_WIDGET_RADIO:
		case GP_WIDGET_MENU:
		case GP_WIDGET_TOGGLE:
			free(opt->item.sw);
			break;
		case GP_WIDGET_TEXT:
		case GP_WIDGET_DATE:
			free(opt->item.text.text);
			break;
		default:
			break;
		}

		delete opt;
		CamOptions.erase(CamOptions.begin());
	}
}
Example #3
0
/////////////////////////////////////////////////////////
/// Resets N/S Guide to OK after timeout
/////////////////////////////////////////////////////////
void ATIKCCD::stopTimerNS()
{
    if (NStimerID != -1)
    {
        GuideComplete(AXIS_DE);
        IERmTimer(NStimerID);
        NStimerID = -1;
    }
}
Example #4
0
/////////////////////////////////////////////////////////
/// Stop West/East pulses
/////////////////////////////////////////////////////////
void ATIKCCD::stopTimerWE()
{
    if (WEtimerID != -1)
    {
        GuideComplete(AXIS_RA);
        IERmTimer(WEtimerID);
        WEtimerID = -1;
    }
}
Example #5
0
IPState SynscanDriver::GuideSouth(uint32_t ms)
{
    if (m_GuideNSTID)
    {
        IERmTimer(m_GuideNSTID);
        m_GuideNSTID = 0;
    }

    m_CustomGuideDE = TRACKRATE_SIDEREAL + GuideRateN[AXIS_DE].value * TRACKRATE_SIDEREAL;
    MoveNS(DIRECTION_SOUTH, MOTION_START);
    m_GuideNSTID = IEAddTimer(ms, guideTimeoutHelperNS, this);
    return IPS_BUSY;
}
Example #6
0
IPState SynscanDriver::GuideWest(uint32_t ms)
{
    if (m_GuideWETID)
    {
        IERmTimer(m_GuideWETID);
        m_GuideWETID = 0;
    }

    // Sky already going westward (or earth rotating eastward, pick your favorite)
    // So we go SID_RATE + whatever guide rate was set to.
    m_CustomGuideRA = TRACKRATE_SIDEREAL + GuideRateN[AXIS_RA].value * TRACKRATE_SIDEREAL;
    MoveWE(DIRECTION_WEST, MOTION_START);
    m_GuideWETID = IEAddTimer(ms, guideTimeoutHelperWE, this);
    return IPS_BUSY;
}
Example #7
0
IPState SynscanDriver::GuideEast(uint32_t ms)
{
    if (m_GuideWETID)
    {
        IERmTimer(m_GuideWETID);
        m_GuideWETID = 0;
    }

    // So if we SID_RATE + 0.5 * SID_RATE for example, that's 150% of sidereal rate
    // but for east we'd be going a lot faster since the stars are moving toward the west
    // in sideral rate. Just standing still we would SID_RATE moving across. So for east
    // we just go GuideRate * SID_RATE without adding any more values.
    //m_CustomGuideRA = TRACKRATE_SIDEREAL + GuideRateN[AXIS_RA].value * TRACKRATE_SIDEREAL;
    m_CustomGuideRA = GuideRateN[AXIS_RA].value * TRACKRATE_SIDEREAL;

    MoveWE(DIRECTION_EAST, MOTION_START);
    m_GuideWETID = IEAddTimer(ms, guideTimeoutHelperWE, this);
    return IPS_BUSY;
}