Commit fa87d975 authored by oberion's avatar oberion

UASWaypointManager: Fixed windows specific sleep function. Cosmetic changes on the coding style

parent 21840a53
......@@ -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);
}
......@@ -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<Waypoint> currentWaypointEditable; ///< The currently used waypoint
QList<mavlink_mission_item_t *> 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment