From 67a42152cbf3a03df51e50ca339499db6bbad467 Mon Sep 17 00:00:00 2001 From: vivek-shankar Date: Sat, 28 Jan 2017 04:14:33 -0500 Subject: [PATCH] Corruption by data buffer overwrite overcome approch with sleep --- src/CommunicationManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CommunicationManager.cpp b/src/CommunicationManager.cpp index 8bb5498..a7f82b4 100644 --- a/src/CommunicationManager.cpp +++ b/src/CommunicationManager.cpp @@ -33,7 +33,7 @@ namespace Xbee //***************************************************************************** CommunicationManager::CommunicationManager(): START_DLIMITER(static_cast(0x7E)), - LOOP_RATE(30) /* 10 fps */ + LOOP_RATE(10) /* 10 fps */ { } @@ -556,7 +556,7 @@ inline void CommunicationManager::Send_Mavlink_Message_Callback( Generate_Transmit_Request_Frame(temporary_buffer, &frame); serial_device_.Send_Frame(frame); /*Sleep for some time in order not to confuse Xbee, a try to reduce errors*/ - //usleep(200); + usleep(1000); //std::cout << "Frame:"<