mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Check return value after firmware updates
This reports back a error to the user if the firmware update failed. We should re-wire this to have a log-function that gets called from libdivecomputer via the context to get an actual error message. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
eebb335a0c
commit
7afc65b99b
1 changed files with 4 additions and 2 deletions
|
@ -695,11 +695,11 @@ void FirmwareUpdateThread::run()
|
||||||
case DC_FAMILY_HW_OSTC3:
|
case DC_FAMILY_HW_OSTC3:
|
||||||
//Not Yet supported
|
//Not Yet supported
|
||||||
//supported = true;
|
//supported = true;
|
||||||
//hw_ostc3_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
|
//rc = hw_ostc3_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
|
||||||
break;
|
break;
|
||||||
case DC_FAMILY_HW_OSTC:
|
case DC_FAMILY_HW_OSTC:
|
||||||
supported = true;
|
supported = true;
|
||||||
hw_ostc_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
|
rc = hw_ostc_device_fwupdate(m_data->device, m_fileName.toUtf8().data());
|
||||||
break;
|
break;
|
||||||
#endif // divecomputer 0.5.0
|
#endif // divecomputer 0.5.0
|
||||||
default:
|
default:
|
||||||
|
@ -711,6 +711,8 @@ void FirmwareUpdateThread::run()
|
||||||
if (!supported) {
|
if (!supported) {
|
||||||
lastError = tr("This feature is not yet available for the selected dive computer.");
|
lastError = tr("This feature is not yet available for the selected dive computer.");
|
||||||
emit error(lastError);
|
emit error(lastError);
|
||||||
|
} else if (rc != DC_STATUS_SUCCESS) {
|
||||||
|
lastError = tr("Firmware update failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue