Skip to content

Commit

Permalink
Do not calculate download time or send image when upload mode is LOCAL
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Feb 23, 2020
1 parent 1d72ab0 commit 5632a36
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions kstars/ekos/capture/capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1560,13 +1560,17 @@ bool Capture::setCaptureComplete()

downloadProgressTimer.stop();

//This determines the time since the image started downloading
//Then it gets the estimated time left and displays it in the log.
double currentDownloadTime = downloadTimer.elapsed() / 1000.0;
downloadTimes << currentDownloadTime;
QString dLTimeString = QString::number(currentDownloadTime, 'd', 2);
QString estimatedTimeString = QString::number(getEstimatedDownloadTime(), 'd', 2);
appendLogText(i18n("Download Time: %1 s, New Download Time Estimate: %2 s.", dLTimeString, estimatedTimeString));
// Do not calculate download time for images stored on server.
if (currentCCD->getUploadMode() != ISD::CCD::UPLOAD_LOCAL)
{
//This determines the time since the image started downloading
//Then it gets the estimated time left and displays it in the log.
double currentDownloadTime = downloadTimer.elapsed() / 1000.0;
downloadTimes << currentDownloadTime;
QString dLTimeString = QString::number(currentDownloadTime, 'd', 2);
QString estimatedTimeString = QString::number(getEstimatedDownloadTime(), 'd', 2);
appendLogText(i18n("Download Time: %1 s, New Download Time Estimate: %2 s.", dLTimeString, estimatedTimeString));
}

// In case we're framing, let's start
if (m_isLooping)
Expand Down Expand Up @@ -1623,7 +1627,9 @@ bool Capture::setCaptureComplete()
inSequenceFocusCounter--;
}

sendNewImage(blobFilename, blobChip);
// Do not send new image if the image was stored on the server.
if (currentCCD->getUploadMode() != ISD::CCD::UPLOAD_LOCAL)
sendNewImage(blobFilename, blobChip);

/* If we were assigned a captured frame map, also increase the relevant counter for prepareJob */
SchedulerJob::CapturedFramesMap::iterator frame_item = capturedFramesMap.find(activeJob->getSignature());
Expand Down

0 comments on commit 5632a36

Please sign in to comment.