diff --git a/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp b/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp index 226bf7b89..c68ae4a0e 100644 --- a/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp @@ -233,7 +233,7 @@ void deviceWidget::downloadFirmware() } myDevice->retrieveButton->setEnabled(false); - filename = setOpenFileName(); + filename = setSaveFileName(); if (filename.isEmpty()) { status("Empty filename", STATUSICON_FAIL); @@ -315,3 +315,15 @@ QString deviceWidget::setOpenFileName() options); return fileName; } +QString deviceWidget::setSaveFileName() +{ + QFileDialog::Options options; + QString selectedFilter; + QString fileName = QFileDialog::getSaveFileName(this, + tr("Select firmware file"), + "", + tr("Firmware Files (*.bin)"), + &selectedFilter, + options); + return fileName; +} diff --git a/ground/openpilotgcs/src/plugins/uploader/devicewidget.h b/ground/openpilotgcs/src/plugins/uploader/devicewidget.h index 5510a5cd4..16c4f7f93 100644 --- a/ground/openpilotgcs/src/plugins/uploader/devicewidget.h +++ b/ground/openpilotgcs/src/plugins/uploader/devicewidget.h @@ -49,7 +49,7 @@ public: void freeze(); typedef enum { STATUSICON_OK, STATUSICON_RUNNING, STATUSICON_FAIL, STATUSICON_INFO} StatusIcon; QString setOpenFileName(); - + QString setSaveFileName(); private: Ui_deviceWidget *myDevice; int deviceID;