From c25b818de475d326319ee7c9b1324c3ce5f8afcc Mon Sep 17 00:00:00 2001 From: Bryan Godbolt Date: Tue, 10 Aug 2010 16:20:35 -0600 Subject: [PATCH] added scope to usleep calls to allow compilation on windows (cherry picked from commit ed0fd7c10be0dc54aa8981ef7f8ce94ea7d545aa) --- src/uas/UASWaypointManager.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index 5e7a3d644..09ebd9c5c 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -346,7 +346,7 @@ void UASWaypointManager::sendWaypointClearAll() mavlink_msg_waypoint_clear_all_encode(uas.mavlink->getSystemId(), uas.mavlink->getComponentId(), &message, &wpca); uas.sendMessage(message); - usleep(PROTOCOL_DELAY_MS * 1000); + MG::SLEEP::usleep(PROTOCOL_DELAY_MS * 1000); qDebug() << "sent waypoint clear all to ID " << wpca.target_system; } @@ -365,7 +365,7 @@ void UASWaypointManager::sendWaypointSetCurrent(quint16 seq) mavlink_msg_waypoint_set_current_encode(uas.mavlink->getSystemId(), uas.mavlink->getComponentId(), &message, &wpsc); uas.sendMessage(message); - usleep(PROTOCOL_DELAY_MS * 1000); + MG::SLEEP::usleep(PROTOCOL_DELAY_MS * 1000); qDebug() << "sent waypoint set current (" << wpsc.seq << ") to ID " << wpsc.target_system; } @@ -384,7 +384,7 @@ void UASWaypointManager::sendWaypointCount() mavlink_msg_waypoint_count_encode(uas.mavlink->getSystemId(), uas.mavlink->getComponentId(), &message, &wpc); uas.sendMessage(message); - usleep(PROTOCOL_DELAY_MS * 1000); + MG::SLEEP::usleep(PROTOCOL_DELAY_MS * 1000); qDebug() << "sent waypoint count (" << wpc.count << ") to ID " << wpc.target_system; } @@ -402,7 +402,7 @@ void UASWaypointManager::sendWaypointRequestList() mavlink_msg_waypoint_request_list_encode(uas.mavlink->getSystemId(), uas.mavlink->getComponentId(), &message, &wprl); uas.sendMessage(message); - usleep(PROTOCOL_DELAY_MS * 1000); + MG::SLEEP::usleep(PROTOCOL_DELAY_MS * 1000); qDebug() << "sent waypoint list request to ID " << wprl.target_system; } @@ -421,7 +421,7 @@ void UASWaypointManager::sendWaypointRequest(quint16 seq) mavlink_msg_waypoint_request_encode(uas.mavlink->getSystemId(), uas.mavlink->getComponentId(), &message, &wpr); uas.sendMessage(message); - usleep(PROTOCOL_DELAY_MS * 1000); + MG::SLEEP::usleep(PROTOCOL_DELAY_MS * 1000); qDebug() << "sent waypoint request (" << wpr.seq << ") to ID " << wpr.target_system; } @@ -443,7 +443,7 @@ void UASWaypointManager::sendWaypoint(quint16 seq) mavlink_msg_waypoint_encode(uas.mavlink->getSystemId(), uas.mavlink->getComponentId(), &message, wp); uas.sendMessage(message); - usleep(PROTOCOL_DELAY_MS * 1000); + MG::SLEEP::usleep(PROTOCOL_DELAY_MS * 1000); qDebug() << "sent waypoint (" << wp->seq << ") to ID " << wp->target_system; } @@ -460,7 +460,7 @@ void UASWaypointManager::sendWaypointAck(quint8 type) mavlink_msg_waypoint_ack_encode(uas.mavlink->getSystemId(), uas.mavlink->getComponentId(), &message, &wpa); uas.sendMessage(message); - usleep(PROTOCOL_DELAY_MS * 1000); + MG::SLEEP::usleep(PROTOCOL_DELAY_MS * 1000); qDebug() << "sent waypoint ack (" << wpa.type << ") to ID " << wpa.target_system; } -- 2.22.0