Commit 477602f5 authored by DonLakeFlyer's avatar DonLakeFlyer

parent 1b2cdb0a
...@@ -387,10 +387,7 @@ QGCCameraControl::takePhoto() ...@@ -387,10 +387,7 @@ QGCCameraControl::takePhoto()
_captureInfoRetries = 0; _captureInfoRetries = 0;
//-- Capture local image as well //-- Capture local image as well
if(qgcApp()->toolbox()->videoManager()) { if(qgcApp()->toolbox()->videoManager()) {
QString photoPath = qgcApp()->toolbox()->settingsManager()->appSettings()->savePath()->rawValue().toString() + QStringLiteral("/Photo"); qgcApp()->toolbox()->videoManager()->grabImage();
QDir().mkpath(photoPath);
photoPath += + "/" + QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss.zzz") + ".jpg";
qgcApp()->toolbox()->videoManager()->grabImage(photoPath);
} }
return true; return true;
} }
......
...@@ -350,7 +350,12 @@ VideoManager::grabImage(const QString& imageFile) ...@@ -350,7 +350,12 @@ VideoManager::grabImage(const QString& imageFile)
return; return;
} }
if (imageFile.isEmpty()) {
_imageFile = qgcApp()->toolbox()->settingsManager()->appSettings()->photoSavePath();
_imageFile += + "/" + QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss.zzz") + ".jpg";
} else {
_imageFile = imageFile; _imageFile = imageFile;
}
emit imageFileChanged(); emit imageFileChanged();
......
...@@ -109,7 +109,7 @@ public: ...@@ -109,7 +109,7 @@ public:
Q_INVOKABLE void startRecording (const QString& videoFile = QString()); Q_INVOKABLE void startRecording (const QString& videoFile = QString());
Q_INVOKABLE void stopRecording (); Q_INVOKABLE void stopRecording ();
Q_INVOKABLE void grabImage(const QString& imageFile); Q_INVOKABLE void grabImage(const QString& imageFile = QString());
signals: signals:
void hasVideoChanged (); 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