Exemple #1
0
/* Downloads the image from the CCD.*/
int FishCampCCD::grabImage()
{
    uint8_t *image = PrimaryCCD.getFrameBuffer();

    UInt16 *frameBuffer = (UInt16 *)image;
    fcUsb_cmd_getRawFrame(cameraNum, PrimaryCCD.getSubW(), PrimaryCCD.getSubH(), frameBuffer);
    DEBUG(INDI::Logger::DBG_SESSION, "Download complete.");

    ExposureComplete(&PrimaryCCD);

    return 0;
}
Exemple #2
0
/* Downloads the image from the CCD.*/
int FishCampCCD::grabImage()
{
    std::unique_lock<std::mutex> guard(ccdBufferLock);
    uint8_t *image = PrimaryCCD.getFrameBuffer();
    UInt16 *frameBuffer = (UInt16 *)image;
    int numBytes = fcUsb_cmd_getRawFrame(cameraNum, PrimaryCCD.getSubW(), PrimaryCCD.getSubH(), frameBuffer);
    guard.unlock();
    if(numBytes != 0)
    {
        LOG_INFO("Download complete.");
        ExposureComplete(&PrimaryCCD);
        return 0;
    }
    else
    {
        LOG_INFO("Download error. Please check the log for details.");
        ExposureComplete(&PrimaryCCD);  //This should be an error. It is not complete, it messed up!
        return -1;
    }

}