diff --git a/libs/mavlink/include/mavlink/v2.0 b/libs/mavlink/include/mavlink/v2.0 index 646c3f4eeae648ffb2cc7dca041d414c4b42c88a..8aea2f7207f37841ede0a01d79724bfd03caf99c 160000 --- a/libs/mavlink/include/mavlink/v2.0 +++ b/libs/mavlink/include/mavlink/v2.0 @@ -1 +1 @@ -Subproject commit 646c3f4eeae648ffb2cc7dca041d414c4b42c88a +Subproject commit 8aea2f7207f37841ede0a01d79724bfd03caf99c diff --git a/src/Camera/QGCCameraIO.cc b/src/Camera/QGCCameraIO.cc index 524cb5edf04dbba745eac4a7cab7f18a01e2cbbd..c42d26bf6a702d4b4e3bd798dc8e235126c943b6 100644 --- a/src/Camera/QGCCameraIO.cc +++ b/src/Camera/QGCCameraIO.cc @@ -187,7 +187,7 @@ QGCCameraParamIO::handleParamAck(const mavlink_param_ext_ack_t& ack) _paramWriteTimer.start(); } else { if(ack.param_result == PARAM_ACK_FAILED) { - if(++_sentRetries > 3) { + if(++_sentRetries < 3) { //-- Try again qCWarning(CameraIOLog) << "Param set failed:" << _fact->name() << _sentRetries; _paramWriteTimer.start(); diff --git a/src/QmlControls/ScreenTools.qml b/src/QmlControls/ScreenTools.qml index 2dccb42b822b68e221d9d6676e7c01961f35c6b9..d6df6c25f5e085dc8fde7b0dc956602f2a3472ce 100644 --- a/src/QmlControls/ScreenTools.qml +++ b/src/QmlControls/ScreenTools.qml @@ -56,6 +56,7 @@ Item { property bool isAndroid: ScreenToolsController.isAndroid property bool isiOS: ScreenToolsController.isiOS property bool isMobile: ScreenToolsController.isMobile + property bool isWindows: ScreenToolsController.isWindows property bool isDebug: ScreenToolsController.isDebug property bool isTinyScreen: (Screen.width / Screen.pixelDensity) < 120 // 120mm property bool isShortScreen: ScreenToolsController.isMobile && ((Screen.height / Screen.width) < 0.6) // Nexus 7 for example diff --git a/src/QmlControls/ScreenToolsController.h b/src/QmlControls/ScreenToolsController.h index e44d983e47873dc5540f20768242e6bd8e537785..670b9980603d149fd82694d8d13a068532a8884d 100644 --- a/src/QmlControls/ScreenToolsController.h +++ b/src/QmlControls/ScreenToolsController.h @@ -36,6 +36,7 @@ public: Q_PROPERTY(bool isDebug READ isDebug CONSTANT) Q_PROPERTY(bool isMacOS READ isMacOS CONSTANT) Q_PROPERTY(bool isLinux READ isLinux CONSTANT) + Q_PROPERTY(bool isWindows READ isWindows CONSTANT) Q_PROPERTY(QString iOSDevice READ iOSDevice CONSTANT) Q_PROPERTY(QString fixedFontFamily READ fixedFontFamily CONSTANT) @@ -54,26 +55,37 @@ public: bool isiOS () { return false; } bool isLinux () { return false; } bool isMacOS () { return false; } + bool isWindows () { return false; } #elif defined(__ios__) bool isAndroid () { return false; } bool isiOS () { return true; } bool isLinux () { return false; } bool isMacOS () { return false; } + bool isWindows () { return false; } #elif defined(__macos__) bool isAndroid () { return false; } bool isiOS () { return false; } bool isLinux () { return false; } bool isMacOS () { return true; } + bool isWindows () { return false; } #elif defined(Q_OS_LINUX) bool isAndroid () { return false; } bool isiOS () { return false; } bool isLinux () { return true; } bool isMacOS () { return false; } + bool isWindows () { return false; } +#elif defined(Q_OS_WIN) + bool isAndroid () { return false; } + bool isiOS () { return false; } + bool isLinux () { return false; } + bool isMacOS () { return false; } + bool isWindows () { return true; } #else bool isAndroid () { return false; } bool isiOS () { return false; } bool isLinux () { return false; } bool isMacOS () { return false; } + bool isWindows () { return false; } #endif #ifdef QT_DEBUG diff --git a/src/ui/MainWindowInner.qml b/src/ui/MainWindowInner.qml index c0841eff6126841c956ed4c4a6b02d6f169a0483..c9c25a9113d59a6dbe077229670cfc6c982c4229 100644 --- a/src/ui/MainWindowInner.qml +++ b/src/ui/MainWindowInner.qml @@ -141,7 +141,11 @@ Item { // The above shutdown causes a flurry of activity as the vehicle components are removed. This in turn // causes the Windows Version of Qt to crash if you allow the close event to be accepted. In order to prevent // the crash, we ignore the close event and setup a delayed timer to close the window after things settle down. - delayedWindowCloseTimer.start() + if(ScreenTools.isWindows) { + delayedWindowCloseTimer.start() + } else { + mainWindow.reallyClose() + } } MessageDialog {