From a5577da36d04ff26685c3b81cbbc8b2a3d315973 Mon Sep 17 00:00:00 2001 From: 3djc Date: Mon, 23 Jan 2017 10:42:31 -0800 Subject: [PATCH] Fix firmware version recognition for Horus (#4276) --- companion/src/storage/firmwareinterface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/companion/src/storage/firmwareinterface.cpp b/companion/src/storage/firmwareinterface.cpp index 86febc2f1..1f56f6577 100644 --- a/companion/src/storage/firmwareinterface.cpp +++ b/companion/src/storage/firmwareinterface.cpp @@ -110,6 +110,9 @@ QString FirmwareInterface::seekString(const QString & string) QString FirmwareInterface::seekLabel(const QString & label) { QString result = seekString(label + "\037\033:"); + if (result.isEmpty()) { + result = seekString(label + "\037\075:"); // This is for Horus + } if (!result.isEmpty()) return result; @@ -180,7 +183,7 @@ bool FirmwareInterface::SeekSplash(QByteArray sps, QByteArray spe, int size) #define OTX_SPE "SPE" #define OTX_SPE_SIZE 4 -void FirmwareInterface::SeekSplash(void) +void FirmwareInterface::SeekSplash(void) { splashSize = 0; splashOffset = 0; @@ -336,7 +339,7 @@ unsigned int FirmwareInterface::save(QString fileName) } memcpy(binflash, flash.constData(), flashSize); QFile file(fileName); - + int fileType = getStorageType(fileName); if (fileType == STORAGE_TYPE_HEX) {