Commit 477602f5 authored by DonLakeFlyer's avatar DonLakeFlyer

parent 1b2cdb0a
......@@ -387,10 +387,7 @@ QGCCameraControl::takePhoto()
_captureInfoRetries = 0;
//-- Capture local image as well
if(qgcApp()->toolbox()->videoManager()) {
QString photoPath = qgcApp()->toolbox()->settingsManager()->appSettings()->savePath()->rawValue().toString() + QStringLiteral("/Photo");
QDir().mkpath(photoPath);
photoPath += + "/" + QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss.zzz") + ".jpg";
qgcApp()->toolbox()->videoManager()->grabImage(photoPath);
qgcApp()->toolbox()->videoManager()->grabImage();
}
return true;
}
......
......@@ -350,7 +350,12 @@ VideoManager::grabImage(const QString& imageFile)
return;
}
_imageFile = imageFile;
if (imageFile.isEmpty()) {
_imageFile = qgcApp()->toolbox()->settingsManager()->appSettings()->photoSavePath();
_imageFile += + "/" + QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss.zzz") + ".jpg";
} else {
_imageFile = imageFile;
}
emit imageFileChanged();
......
......@@ -109,7 +109,7 @@ public:
Q_INVOKABLE void startRecording (const QString& videoFile = QString());
Q_INVOKABLE void stopRecording ();
Q_INVOKABLE void grabImage(const QString& imageFile);
Q_INVOKABLE void grabImage(const QString& imageFile = QString());
signals:
void hasVideoChanged ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment