1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-26 17:55:12 +03:00

New version format (mandatory for small screens)

This commit is contained in:
Bertrand Songis 2015-07-23 19:07:06 +02:00
parent c90bf43d17
commit 8f96f50a84
3 changed files with 9 additions and 4 deletions

View file

@ -20,6 +20,7 @@
#include "firmwareinterface.h"
#include "helpers.h"
#define FW_MARK "FW"
#define VERS_MARK "VERS"
#define DATE_MARK "DATE"
#define TIME_MARK "TIME"
@ -66,8 +67,10 @@ FirmwareInterface::FirmwareInterface(const QString &filename):
}
if (flash_size > 0) {
flavour = seekLabel(FW_MARK);
version = seekLabel(VERS_MARK);
if (version.startsWith("opentx-")) {
// old version format
int index = version.lastIndexOf('-');
flavour = version.mid(0, index);
version = version.mid(index+1);