From 1e3fa64eff60262ff59ee184e36e9953c7462360 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 28 Jul 2017 17:05:17 -0400 Subject: [PATCH] microRTPS_client printf PRIu64 --- .../uorb/microRTPS_client.cpp.template | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/msg/templates/uorb/microRTPS_client.cpp.template b/msg/templates/uorb/microRTPS_client.cpp.template index edb4ae8302..341482efaf 100644 --- a/msg/templates/uorb/microRTPS_client.cpp.template +++ b/msg/templates/uorb/microRTPS_client.cpp.template @@ -53,23 +53,22 @@ recv_topics = [s.short_name for idx, s in enumerate(spec) if scope[idx] == MsgSc * ****************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include +#include "microRTPS_transport.h" + +#include +#include #include #include -#include +#include #include +#include +#include +#include +#include +#include #include -#include "microRTPS_transport.h" - @[for topic in list(set(topic_names))]@ #include @[end for]@ @@ -207,7 +206,7 @@ void* send(void* /*unused*/) struct timespec end; px4_clock_gettime(CLOCK_REALTIME, &end); double elapsed_secs = double(end.tv_sec - begin.tv_sec) + double(end.tv_nsec - begin.tv_nsec)/double(1000000000); - printf("\nSENT: %lu messages in %d LOOPS, %lu bytes in %.03f seconds - %.02fKB/s\n", + printf("\nSENT: " PRIu64 " messages in %d LOOPS, " PRIu64 " bytes in %.03f seconds - %.02fKB/s\n", sent, loop, total_sent, elapsed_secs, (double)total_sent/(1000*elapsed_secs)); return nullptr;