microRTPS_client printf format fix

This commit is contained in:
Daniel Agar
2017-07-28 11:59:45 -04:00
committed by Lorenz Meier
parent b79e682630
commit e6633da832
2 changed files with 4 additions and 4 deletions
@@ -206,8 +206,8 @@ void* send(void*)
struct timespec end; struct timespec end;
clock_gettime(0, &end); clock_gettime(0, &end);
double elapsed_secs = double(end.tv_sec - begin.tv_sec) + double(end.tv_nsec - begin.tv_nsec)/double(1000000000); 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", printf("\nSENT: %lu messages in %d LOOPS, %lu bytes in %.03f seconds - %.02fKB/s\n",
(unsigned long)sent, loop, total_sent, elapsed_secs, (double)total_sent/(1000*elapsed_secs)); sent, loop, total_sent, elapsed_secs, (double)total_sent/(1000*elapsed_secs));
return nullptr; return nullptr;
} }
@@ -271,7 +271,7 @@ static int micrortps_start(int argc, char *argv[])
char data_buffer[BUFFER_SIZE] = {}; char data_buffer[BUFFER_SIZE] = {};
int read = 0; int read = 0;
char topic_ID = 255; uint8_t topic_ID = 255;
// Declare received topics // Declare received topics
@[for topic in recv_topics]@ @[for topic in recv_topics]@
@@ -159,7 +159,7 @@ void t_send(void *data)
{ {
char data_buffer[BUFFER_SIZE] = {}; char data_buffer[BUFFER_SIZE] = {};
int length = 0; int length = 0;
char topic_ID = 255; uint8_t topic_ID = 255;
while (running) while (running)
{ {