From e85c10a84a5add8fb5c1ecb69ecb0750f82ee597 Mon Sep 17 00:00:00 2001 From: vivek-shankar Date: Fri, 27 Jan 2017 13:00:11 -0500 Subject: [PATCH] stable version of xbee with ros buzz but has lots of things to fix --- src/CommunicationManager.cpp | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/CommunicationManager.cpp b/src/CommunicationManager.cpp index e056226..2bbeb1b 100644 --- a/src/CommunicationManager.cpp +++ b/src/CommunicationManager.cpp @@ -372,7 +372,7 @@ inline void CommunicationManager::Check_In_Messages_and_Transfer_To_Topics() sscanf(in_message->c_str(), "%" PRIu64 " ", ¤t_int64); header = u64_cvt_u16(current_int64); - std::cout << "Received header" <1 && header[2]==1){ for (std::size_t i = 1; i < in_message->size()-1; i++) { @@ -385,15 +385,15 @@ inline void CommunicationManager::Check_In_Messages_and_Transfer_To_Topics() } } - std::cout << "Single packet message received" << std::endl; + //std::cout << "Single packet message received" << std::endl; mavlink_publisher_.publish(mavlink_msg); //delete[] header; } else if (header[3]>1 && header[0]==0 && header[1]>1){ - std::cout << "Multi packet: check_cur:"<first << "Size of current map" <second->size()<< std::endl; - std::cout << "received Frame:"<<(void *) it->second->c_str() << std::endl; - std::cout<<"Size of map : "<< multi_msgs.size()<< std::endl; + //std::cout<<"Transfering to topic chunk no. :"<first << "Size of current map" <second->size()<< std::endl; + //std::cout << "received Frame:"<<(void *) it->second->c_str() << std::endl; + //std::cout<<"Size of map : "<< multi_msgs.size()<< std::endl; for (std::size_t j = 1; j < it->second->size()-1; j++) { @@ -425,14 +425,14 @@ inline void CommunicationManager::Check_In_Messages_and_Transfer_To_Topics() { sscanf(it->second->c_str() + j, "%" PRIu64 " ", ¤t_int64); - std::cout << "received Frame:" << current_int64 << std::endl; + //std::cout << "received Frame:" << current_int64 << std::endl; mavlink_msg.payload64.push_back(current_int64); } } } - std::cout << "one multi message published in topic with size :" <payload64.size()/(double)10)); - std::cout <<"Payload size" <payload64.size() << std::endl; + //std::cout <<"Payload size" <payload64.size() << std::endl; uint64_t header = (uint64_t)0 | ((uint64_t)check_sum << 16) | ((uint64_t)number << 32) |((uint64_t) total << 48) ; - std::cout << "Total chunks:" <payload64.at(i)); - std::cout << "Frame:"<payload64.at(i) << std::endl; + //std::cout << "Frame:"<payload64.at(i) << std::endl; } if(cnt==10) - { std::cout << "Multi frame sent no:"<