diff --git a/msg/templates/uorb/microRTPS_client.cpp.template b/msg/templates/uorb/microRTPS_client.cpp.template index ad902cfa5b..01bd53ae7a 100644 --- a/msg/templates/uorb/microRTPS_client.cpp.template +++ b/msg/templates/uorb/microRTPS_client.cpp.template @@ -206,8 +206,8 @@ void* send(void*) struct timespec end; clock_gettime(0, &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, %llu bytes in %.03f seconds - %.02fKB/s\n", - (unsigned long)sent, loop, total_sent, elapsed_secs, (double)total_sent/(1000*elapsed_secs)); + printf("\nSENT: %lu messages in %d LOOPS, %lu bytes in %.03f seconds - %.02fKB/s\n", + sent, loop, total_sent, elapsed_secs, (double)total_sent/(1000*elapsed_secs)); return nullptr; } @@ -271,7 +271,7 @@ static int micrortps_start(int argc, char *argv[]) char data_buffer[BUFFER_SIZE] = {}; int read = 0; - char topic_ID = 255; + uint8_t topic_ID = 255; // Declare received topics @[for topic in recv_topics]@ diff --git a/msg/templates/urtps/microRTPS_agent.cxx.template b/msg/templates/urtps/microRTPS_agent.cxx.template index 80e3a43a85..8f0712339f 100644 --- a/msg/templates/urtps/microRTPS_agent.cxx.template +++ b/msg/templates/urtps/microRTPS_agent.cxx.template @@ -159,7 +159,7 @@ void t_send(void *data) { char data_buffer[BUFFER_SIZE] = {}; int length = 0; - char topic_ID = 255; + uint8_t topic_ID = 255; while (running) {