diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index eb594b9b6..63b374062 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -565,7 +565,6 @@ QPixmap makePixMap(const QImage & image) return QPixmap::fromImage(result); } - int version2index(const QString & version) { int result = 999; diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 2c230000b..4753e0b71 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -360,7 +360,6 @@ void MainWindow::checkForCompanionUpdateFinished(QNetworkReply * reply) return onUpdatesError(tr("Companion update check failed, new version information not found.")); int webVersion = version2index(version); - int ownVersion = version2index(VERSION); if (ownVersion < webVersion) { diff --git a/companion/src/storage/firmwareinterface.cpp b/companion/src/storage/firmwareinterface.cpp index 369af6504..f480ae527 100644 --- a/companion/src/storage/firmwareinterface.cpp +++ b/companion/src/storage/firmwareinterface.cpp @@ -36,7 +36,6 @@ FirmwareInterface::FirmwareInterface(const QString & filename): flash(FSIZE_MAX, 0), flashSize(0), - versionId(0), eepromVersion(0), eepromVariant(0), splashOffset(0), @@ -80,7 +79,6 @@ FirmwareInterface::FirmwareInterface(const QString & filename): eepromVersion = eepromId.toInt(); } - versionId = version2index(version); seekSplash(); isValidFlag = !version.isEmpty(); } diff --git a/companion/src/storage/firmwareinterface.h b/companion/src/storage/firmwareinterface.h index ce9aa994a..2912ec6ff 100644 --- a/companion/src/storage/firmwareinterface.h +++ b/companion/src/storage/firmwareinterface.h @@ -46,7 +46,6 @@ class FirmwareInterface QString getFlavour() const; bool isHardwareCompatible(const FirmwareInterface &previousFirmware) const; inline QString getVersion() { return version; } - unsigned int getVersionId() { return versionId; } inline int getEEpromVersion() { return eepromVersion; } inline int getEEpromVariant() { return eepromVariant; } inline QString getEEpromId() { return eepromId; } @@ -72,7 +71,6 @@ class FirmwareInterface QString time; QString flavour; QString version; - int versionId; QString eepromId; int eepromVersion; int eepromVariant; diff --git a/radio/src/CMakeLists.txt b/radio/src/CMakeLists.txt index 989457f92..61db95377 100644 --- a/radio/src/CMakeLists.txt +++ b/radio/src/CMakeLists.txt @@ -52,6 +52,7 @@ option(MODULE_PROTOCOL_FCC "Add support for FCC modules" ON) option(MODULE_PROTOCOL_LBT "Add support for EU/LBT modules" ON) option(MODULE_PROTOCOL_FLEX "Add support for non certified FLEX modules" OFF) option(MODULE_PROTOCOL_D8 "Add support for D8 modules" ON) +option(OTX_RELEASE "Used to build OpenTX released firmware" OFF) option(FRSKY_RELEASE "Used to build FrSky released firmware" OFF) option(TBS_RELEASE "Used to build TBS released firmware" OFF) option(ALLOW_TRAINER_MULTI "Allow multi trainer" OFF) @@ -336,6 +337,10 @@ if(MODULE_PROTOCOL_D8) add_definitions(-DMODULE_PROTOCOL_D8) endif() +if(OTX_RELEASE) + add_definitions(-DOTX_RELEASE) +endif() + if(JUMPER_RELEASE) add_definitions(-DJUMPER_RELEASE) endif() diff --git a/radio/src/stamp.cpp b/radio/src/stamp.cpp index f4f8b836a..06b601b69 100644 --- a/radio/src/stamp.cpp +++ b/radio/src/stamp.cpp @@ -33,26 +33,28 @@ #endif #if defined(FRSKY_RELEASE) -#define DISPLAY_VERSION "FrSky" +#define DISPLAY_VERSION "-frsky" #elif defined(JUMPER_RELEASE) -#define DISPLAY_VERSION "JumperRC" +#define DISPLAY_VERSION "-jumper" #elif defined(RADIOMASTER_RELEASE) -#define DISPLAY_VERSION "Radiomaster" +#define DISPLAY_VERSION "-radiomaster" #elif defined(TBS_RELEASE) -#define DISPLAY_VERSION "TBS" +#define DISPLAY_VERSION "-tbs" +#elif defined(OTX_RELEASE) +#define DISPLAY_VERSION "-otx" #else -#define DISPLAY_VERSION VERSION +#define DISPLAY_VERSION #endif #if defined(COLORLCD) - const char vers_stamp[] = "VERS" TAB ": " "opentx-" FLAVOUR "-" DISPLAY_VERSION " (" GIT_STR ")"; + const char vers_stamp[] = "VERS" TAB ": " "opentx-" FLAVOUR "-" VERSION DISPLAY_VERSION " (" GIT_STR ")"; const char date_stamp[] = "DATE" TAB ": " DATE; const char time_stamp[] = "TIME" TAB ": " TIME; const char eeprom_stamp[] = "EEPR" TAB ": " EEPROM_STR; #elif defined(BOARD_NAME) - const char vers_stamp[] = "FW" TAB ": opentx-" BOARD_NAME "\036VERS" TAB ": " DISPLAY_VERSION " (" GIT_STR ")" "\036DATE" TAB ": " DATE " " TIME "\036EEPR" TAB ": " EEPROM_STR; + const char vers_stamp[] = "FW" TAB ": opentx-" BOARD_NAME "\036VERS" TAB ": " VERSION DISPLAY_VERSION " (" GIT_STR ")" "\036DATE" TAB ": " DATE " " TIME "\036EEPR" TAB ": " EEPROM_STR; #else - const char vers_stamp[] = "FW" TAB ": opentx-" FLAVOUR "\036VERS" TAB ": " DISPLAY_VERSION " (" GIT_STR ")" "\036DATE" TAB ": " DATE " " TIME "\036EEPR" TAB ": " EEPROM_STR; + const char vers_stamp[] = "FW" TAB ": opentx-" FLAVOUR "\036VERS" TAB ": " VERSION DISPLAY_VERSION " (" GIT_STR ")" "\036DATE" TAB ": " DATE " " TIME "\036EEPR" TAB ": " EEPROM_STR; #endif /**