Index: main.cpp =================================================================== diff -u -r13d6a4fae2f910ab6e289ac9280258a94f734405 -r2bc6542cebc264eb343f791f75223a1ca151465e --- main.cpp (.../main.cpp) (revision 13d6a4fae2f910ab6e289ac9280258a94f734405) +++ main.cpp (.../main.cpp) (revision 2bc6542cebc264eb343f791f75223a1ca151465e) @@ -37,6 +37,9 @@ #include #include +// FW +#include "Compatible.h" + // Project #include "MainTimer.h" #include "CanInterface.h" @@ -138,15 +141,15 @@ QCoreApplication::translate("main", "Show the Message Output")); parser.addOption(optionConsoleoutFrameInterface); - // --- -m : msgOut + // --- -l : logOut QCommandLineOption optionConsoleoutLogs( QStringList() << "l" << "logOut", QCoreApplication::translate("main", "Show the Logs Output")); parser.addOption(optionConsoleoutLogs); // --- -0 : enable-keep-awake (the fast mode) QCommandLineOption optionSendEmptyKeepAwake(QStringList() << "0" << "enable-keep-awake", - QCoreApplication::translate("main", "Enable send low priority, empty message on the CANBus just to keep UI board CAN driver awake")); + QCoreApplication::translate("main", "Enable send low priority, empty message on the CANBus just to keep UI board CAN driver awake")); parser.addOption(optionSendEmptyKeepAwake); // --- -i : fake-interval @@ -173,12 +176,12 @@ // --- -u : disable-unhandled-report QCommandLineOption optionDisableUnhandledReport(QStringList() << "u" << "disable-unhandled-report", - QCoreApplication::translate("main", "Disable unhandled messages report as an error in the log")); + QCoreApplication::translate("main", "Disable unhandled messages report as an error in the log")); parser.addOption(optionDisableUnhandledReport); - // --- -u : disable-unhandled-report + // --- -q : disable-timeout QCommandLineOption optionDisableTimeout(QStringList() << "q" << "disable-timeout", - QCoreApplication::translate("main", "Disables HD communication timeout")); + QCoreApplication::translate("main", "Disables HD communication timeout")); parser.addOption(optionDisableTimeout); // --- parse command lines @@ -217,38 +220,44 @@ * and revision(build) version will be set to current date/time. */ void setApplicationVersion() { - bool ver_revis_empty = false; + bool isOnServer = true; QString ver_major = QString("%1").arg(VER_MAJOR ); QString ver_minor = QString("%1").arg(VER_MINOR ); QString ver_micro = QString("%1").arg(VER_MICRO ); QString ver_revis = QString("%1").arg(VER_REVIS ); QString ver_branch = QString("%1").arg(VER_BRANCH ); + QString ver_comp = QString("%1").arg(SW_COMPATIBILITY_REV ); if (ver_revis.isEmpty()) { ver_revis = VER_REVIS_DEV; - ver_revis_empty = true; + isOnServer = false; } - const char * masterbranch = "master"; - bool isOnMaster = !ver_branch.compare(masterbranch); - if (isOnMaster) { - ver_branch = ver_revis_empty ? masterbranch : ""; - ver_major += '.'; - ver_minor += '.'; - ver_micro += '.'; + bool isOnMaster = ver_branch == "master"; + bool isNotStory = isOnMaster + || ver_branch == "staging" + || ver_branch == "develop"; + if (isNotStory) { + if (isOnServer) { + if (isOnMaster ) { + ver_branch = ""; // if only is built on server master branch don't show branch + } + ver_major += '.'; + ver_minor += '.'; + ver_micro += '.'; + } } - else { - ver_branch = VER_BRANCH ; - ver_revis = VER_REVIS_DEV ; - } + if ( ! ver_branch.isEmpty()) ver_branch += '.'; QCoreApplication::setApplicationVersion( - QString("%1%2%3%4%5") + QString("%1%2%3%4%5.%6") .arg(ver_branch) .arg(ver_major) .arg(ver_minor) .arg(ver_micro) - .arg(ver_revis)); + .arg(ver_revis) + .arg(ver_comp ) + ); } #ifdef UNIT_TEST @@ -355,6 +364,7 @@ LOG_DEBUG("UI Initializing"); if ( startGui() ) { LOG_DEBUG("UI Initialized"); + _ApplicationController.startPOST(); app_exec = app.exec(); }