mirror of
https://github.com/RustyRaptor/Pixelpulse2.git
synced 2026-12-03 15:35:16 -07:00
Don't show the update firmware button until the firmware is downloaded
if the firmware is not downloaded when the user presses the update button the application would show an error and the user would need to replug the m1k. This change is preventing this to happen Signed-off-by: Claudiu Pop <Claudiu.Pop@analog.com>
This commit is contained in:
1 parent
e53e408a81
commit
59f7df9176
3 files changed
+7
-1
No files matched your search
@@ -167,6 +167,7 @@ void SessionItem::handleDownloadedFirmware()
|
||||
{
|
||||
FileIO f;
|
||||
f.writeRawByFilename(getTmpPathForFirmware() + "/firmware.bin", m_firmware_fd->downloadedData());
|
||||
emit firmwareDownloaded();
|
||||
disconnect(m_firmware_fd, SIGNAL(downloaded()), this, SLOT(handleDownloadedFirmware()));
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ signals:
|
||||
void finished(unsigned status);
|
||||
void attached(smu::Device* device);
|
||||
void detached(smu::Device* device);
|
||||
void firmwareDownloaded();
|
||||
|
||||
protected slots:
|
||||
void onFinished();
|
||||
|
||||
@@ -11,6 +11,7 @@ ColumnLayout {
|
||||
|
||||
property bool updateNeeded: false
|
||||
property bool justUpdated: false
|
||||
property bool firmwareDownloaded: false
|
||||
function addProgModeDeviceToList()
|
||||
{
|
||||
devicesModel.insert(devicesModel.count,
|
||||
@@ -348,6 +349,9 @@ ColumnLayout {
|
||||
onDevicesChanged: {
|
||||
deviceManagerListFill();
|
||||
}
|
||||
onFirmwareDownloaded:{
|
||||
firmwareDownloaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
@@ -360,7 +364,7 @@ ColumnLayout {
|
||||
width: 145
|
||||
radius: 4
|
||||
color: 'grey'
|
||||
visible: updateNeeded === true
|
||||
visible: updateNeeded === true && firmwareDownloaded === true
|
||||
|
||||
Rectangle {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Reference in new issue
Block a user