Index: main.cpp =================================================================== diff -u -rfc329c788fe9453983072bee937ccbc95b4ed6e4 -r2dd767833cf0cf706c457951c2d78e7e20aff768 --- main.cpp (.../main.cpp) (revision fc329c788fe9453983072bee937ccbc95b4ed6e4) +++ main.cpp (.../main.cpp) (revision 2dd767833cf0cf706c457951c2d78e7e20aff768) @@ -51,6 +51,7 @@ #include "Logger.h" #include "DeviceController.h" #include "WifiInterface.h" +#include "BluetoothInterface.h" #include "Threads.h" // #include "FileHandler.h" @@ -149,7 +150,7 @@ // --- -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 @@ -163,8 +164,8 @@ QCommandLineOption optionFakeData( QStringList() << "f" << "fake-message", QCoreApplication::translate("main", "Test fake message data\n" - "will use default sequenced long fake message if set to 00(default)\n" - "will used only if correct integer value assigned for interval option"), + "will use default sequenced long fake message if set to 00(default)\n" + "will used only if correct integer value assigned for interval option"), QCoreApplication::translate("main", "data")); parser.addOption(optionFakeData); @@ -176,12 +177,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); // --- -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 @@ -235,8 +236,8 @@ bool isOnMaster = ver_branch == "master"; bool isNotStory = isOnMaster - || ver_branch == "staging" - || ver_branch == "develop"; + || ver_branch == "staging" + || ver_branch == "develop"; if (isNotStory) { if (isOnServer) { if (isOnMaster ) { @@ -250,19 +251,19 @@ if ( ! ver_branch.isEmpty()) ver_branch += '.'; QCoreApplication::setApplicationVersion( - QString("%1%2%3%4%5.%6") - .arg(ver_branch) - .arg(ver_major) - .arg(ver_minor) - .arg(ver_micro) - .arg(ver_revis) - .arg(ver_comp ) + QString("%1%2%3%4%5.%6") + .arg(ver_branch) + .arg(ver_major) + .arg(ver_minor) + .arg(ver_micro) + .arg(ver_revis) + .arg(ver_comp ) ); } #ifdef UNIT_TEST - #include TEST_CLASS_INCLUDE - QTEST_MAIN(TEST_CLASS_NAME) +#include TEST_CLASS_INCLUDE +QTEST_MAIN(TEST_CLASS_NAME) #else /*! * \brief Application Initialization @@ -357,14 +358,20 @@ //! - Initializing WiFi Interface _WifiInterface.init(Threads::_Wifi_Thread); - _WifiInterface.start(); + _BluetoothInterface.init(Threads::_Bluetooth_Thread); + //! - Initialize the QML Viewer and starts GUI int app_exec = -1; LOG_DEBUG("UI Initializing"); if ( startGui() ) { LOG_DEBUG("UI Initialized"); - _ApplicationController.startPOST(); + _ApplicationController .startPOST(); + + // TODO: check if the POST for the interfaces below are passed do the start. + _WifiInterface .start(); + _BluetoothInterface .start(); + app_exec = app.exec(); }