Commit 43629ddb authored by Don Gagne's avatar Don Gagne

Pull image size from FirmwareImage object

parent 6863dcf7
......@@ -363,12 +363,12 @@ void FirmwareUpgradeController::_downloadFinished(void)
// We can't proceed unless we have the bootloader
if (!_bootloaderFound) {
_errorCancel(QString("Bootloader not found").arg(_imageSize).arg(_bootloaderBoardFlashSize));
_errorCancel("Bootloader not found");
return;
}
if (_bootloaderBoardFlashSize != 0 && _imageSize > _bootloaderBoardFlashSize) {
_errorCancel(QString("Image size of %1 is too large for board flash size %2").arg(_imageSize).arg(_bootloaderBoardFlashSize));
if (_bootloaderBoardFlashSize != 0 && image->imageSize() > _bootloaderBoardFlashSize) {
_errorCancel(QString("Image size of %1 is too large for board flash size %2").arg(image->imageSize()).arg(_bootloaderBoardFlashSize));
return;
}
......
......@@ -154,8 +154,6 @@ private:
bool _startFlashWhenBootloaderFound;
FirmwareType_t _startFlashWhenBootloaderFoundFirmwareType;
uint32_t _imageSize; ///< Image size of firmware being flashed
QPixmap _boardIcon; ///< Icon used to display image of board
......
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