diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index 9bd5db316cf8c2cc47548a567110d7be17785ca3..13740bd0196bd1a9bda9633a0068b065b01a66d4 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 2a2ddf2956e3974b6eab8179e19485ddf74ecf10..a9555e7beb322046f66a42370de2ce2cffcbd10c 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.