Beispiel #1
0
bool QHYCCD::StartStreaming()
{
    /*if (PrimaryCCD.getBPP() != 8)
    {
        DEBUG(INDI::Logger::DBG_ERROR, "Streaming only supported for 8 bit images.");
        return false;
    }

    DEBUGF(INDI::Logger::DBG_SESSION, "Starting streaming with a period of %g seconds.",
           PrimaryCCD.getExposureDuration());*/

    ExposureRequest = 1.0 / Streamer->getTargetFPS();

    // N.B. There is no corresponding value for GBGR. It is odd that QHY selects this as the default as no one seems to process it
    const std::map<const char *, INDI_PIXEL_FORMAT> formats = { { "GBGR", INDI_MONO },
                                                                { "GRGB", INDI_BAYER_GRBG },
                                                                { "BGGR", INDI_BAYER_BGGR },
                                                                { "RGGB", INDI_BAYER_RGGB } };

    INDI_PIXEL_FORMAT qhyFormat = INDI_MONO;
    if (BayerT[2].text && formats.count(BayerT[2].text) != 0)
        qhyFormat = formats.at(BayerT[2].text);

    Streamer->setPixelFormat(qhyFormat, PrimaryCCD.getBPP());

    SetQHYCCDParam(camhandle, CONTROL_EXPOSURE, ExposureRequest * 1000 * 1000);
    SetQHYCCDStreamMode(camhandle, 0x01);
    BeginQHYCCDLive(camhandle);
    pthread_mutex_lock(&condMutex);
    streamPredicate = 1;
    pthread_mutex_unlock(&condMutex);
    pthread_cond_signal(&cv);

    return true;
}
Beispiel #2
0
bool QHYCCD::StartStreaming()
{
    if (PrimaryCCD.getBPP() != 8)
    {
        DEBUG(INDI::Logger::DBG_ERROR, "Streaming only supported for 8 bit images.");
        return false;
    }

    DEBUGF(INDI::Logger::DBG_SESSION, "Starting streaming with a period of %g seconds.",
           PrimaryCCD.getExposureDuration());

    // N.B. There is no corresponding value for GBGR. It is odd that QHY selects this as the default as no one seems to process it
    const std::map<const char *, uint32_t> formats = { { "GBGR", V4L2_PIX_FMT_GREY },
                                                       { "GRGB", V4L2_PIX_FMT_SGRBG8 },
                                                       { "BGGR", V4L2_PIX_FMT_SBGGR8 },
                                                       { "RGGB", V4L2_PIX_FMT_SRGGB8 } };

    uint32_t qhyFormat = V4L2_PIX_FMT_GREY;
    if (BayerT[2].text && formats.count(BayerT[2].text) != 0)
        qhyFormat = formats.at(BayerT[2].text);

    Streamer->setPixelFormat(qhyFormat);

    SetQHYCCDStreamMode(camhandle, 0x01);
    BeginQHYCCDLive(camhandle);
    pthread_mutex_lock(&condMutex);
    streamPredicate = 1;
    pthread_mutex_unlock(&condMutex);
    pthread_cond_signal(&cv);

    return true;
}
Beispiel #3
0
bool QHYCCD::StartStreaming()
{
    if (PrimaryCCD.getBPP() != 8)
    {
        DEBUG(INDI::Logger::DBG_ERROR, "Streaming only supported for 8 bit images.");
        return false;
    }

    DEBUGF(INDI::Logger::DBG_SESSION, "Starting streaming with a period of %g seconds.", PrimaryCCD.getExposureDuration());

    SetQHYCCDStreamMode(camhandle, 0x01);
    BeginQHYCCDLive(camhandle);
    pthread_mutex_lock(&condMutex);
    streamPredicate = 1;
    pthread_mutex_unlock(&condMutex);
    pthread_cond_signal(&cv);


    return true;
}