From fc086f0410b4cc4c949f1c1f8527a388af5e5ddb Mon Sep 17 00:00:00 2001 From: vivek-shankar Date: Thu, 26 Jan 2017 18:27:28 -0500 Subject: [PATCH] debug prints --- src/CommunicationManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CommunicationManager.cpp b/src/CommunicationManager.cpp index 3ce0abe..094b588 100644 --- a/src/CommunicationManager.cpp +++ b/src/CommunicationManager.cpp @@ -531,7 +531,7 @@ inline void CommunicationManager::Send_Mavlink_Message_Callback( uint16_t check_sum = (uint16_t)Caculate_Checksum(&frame); uint16_t cnt=0; uint16_t number=1; - uint16_t total =ceil((double)((double)mavlink_msg->payload64.size()/(double)20)); + uint16_t total =ceil((double)((double)mavlink_msg->payload64.size()/(double)10)); 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.size(); i++) { - if(cnt<20){ + if(cnt<10){ converted_bytes += sprintf( temporary_buffer+converted_bytes, "%" PRIu64 " ", (uint64_t)mavlink_msg->payload64.at(i)); @@ -560,6 +560,7 @@ inline void CommunicationManager::Send_Mavlink_Message_Callback( cnt=0; frame = ""; header = 0 | ((uint64_t)check_sum << 16) | ((uint64_t)number << 32) |((uint64_t) total << 48) ; + std::cout << "Sent header" <