From fa87d975648f8053fd05c3e740729be630732129 Mon Sep 17 00:00:00 2001 From: oberion Date: Mon, 10 Aug 2015 15:27:26 +0200 Subject: [PATCH] UASWaypointManager: Fixed windows specific sleep function. Cosmetic changes on the coding style --- src/uas/UASWaypointManager.cc | 10 +++++----- src/uas/UASWaypointManager.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index 9bd5db316..13740bd01 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -1217,9 +1217,9 @@ void UASWaypointManager::_stopProtocolTimerOnThisThread(void) void UASWaypointManager::_updateWPonTimer() { - while (current_state != WP_IDLE) - { - Sleep(100); - } - readWaypoints(true); + while (current_state != WP_IDLE) + { + QGC::SLEEP::msleep(100); + } + readWaypoints(true); } diff --git a/src/uas/UASWaypointManager.h b/src/uas/UASWaypointManager.h index 2a2ddf295..a9555e7be 100644 --- a/src/uas/UASWaypointManager.h +++ b/src/uas/UASWaypointManager.h @@ -168,7 +168,7 @@ signals: private slots: void _startProtocolTimerOnThisThread(void); ///< Starts the protocol timer void _stopProtocolTimerOnThisThread(void); ///< Starts the protocol timer - void _updateWPonTimer(void); + void _updateWPonTimer(void); ///< Starts requesting WP on timer timeout private: UAS* uas; ///< Reference to the corresponding UAS @@ -185,7 +185,7 @@ private: QPointer currentWaypointEditable; ///< The currently used waypoint QList waypoint_buffer; ///< buffer for waypoints during communication QTimer protocol_timer; ///< Timer to catch timeouts - QTimer _updateWPlist_timer; /// update WP list if modified by another instance onboard + QTimer _updateWPlist_timer; ///< update WP list if modified by another instance onboard bool standalone; ///< If standalone is set, do not write to UAS int uasid; ///< The ID of the current UAS. Retrieved via `uas->getUASID();`, stored as an `int` to match its return type. -- 2.22.0