mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-504 Attempt to fix the Rescue/Boot issue, and bugfix in firmware version display in UPloader gadget.
This commit is contained in:
parent
b69402b7ab
commit
5b787272f5
@ -268,12 +268,7 @@ void deviceWidget::uploadFirmware()
|
||||
if (firmwareBoard != board) {
|
||||
status("Error: firmware does not match board", STATUSICON_FAIL);
|
||||
return;
|
||||
} else {
|
||||
// Not a structured description: warn user
|
||||
myDevice->buildDate->setText("Warning: development firmware");
|
||||
myDevice->commitTag->setText("");
|
||||
}
|
||||
|
||||
// Check the firmware embedded in the file:
|
||||
QByteArray firmwareHash = desc.mid(40,20);
|
||||
QByteArray fileHash = QCryptographicHash::hash(arr.left(arr.length()-100), QCryptographicHash::Sha1);
|
||||
@ -281,9 +276,6 @@ void deviceWidget::uploadFirmware()
|
||||
status("Error: firmware file corrupt", STATUSICON_FAIL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
// The firmware is not packaged, just upload the text in the description field
|
||||
// if it is there.
|
||||
@ -291,8 +283,6 @@ void deviceWidget::uploadFirmware()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
status("Starting firmware upload", STATUSICON_RUNNING);
|
||||
// We don't know which device was used previously, so we
|
||||
// are cautious and reenter DFU for this deviceID:
|
||||
|
@ -291,7 +291,10 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
|
||||
/*
|
||||
m_config->haltButton->setEnabled(false);
|
||||
m_config->resetButton->setEnabled(false);
|
||||
*/
|
||||
// Need to re-enable in case we were not connected
|
||||
m_config->bootButton->setEnabled(true);
|
||||
/*
|
||||
m_config->telemetryLink->setEnabled(false);
|
||||
m_config->rescueButton->setEnabled(false);
|
||||
*/
|
||||
@ -359,6 +362,7 @@ void UploaderGadgetWidget::systemBoot()
|
||||
delete dfu;
|
||||
dfu = NULL;
|
||||
m_config->bootButton->setEnabled(true);
|
||||
m_config->rescueButton->setEnabled(true); // Boot not possible, maybe Rescue OK?
|
||||
return;
|
||||
}
|
||||
log("Booting system...");
|
||||
@ -503,7 +507,7 @@ void UploaderGadgetWidget::systemRescue()
|
||||
}
|
||||
m_config->haltButton->setEnabled(false);
|
||||
m_config->resetButton->setEnabled(false);
|
||||
//m_config->bootButton->setEnabled(true);
|
||||
m_config->bootButton->setEnabled(true);
|
||||
m_config->rescueButton->setEnabled(false);
|
||||
currentStep = IAP_STATE_BOOTLOADER; // So that we can boot from the GUI afterwards.
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user