microRTPS: improve verbosity with the usage of px4_log types

This commit is contained in:
TSC21
2019-01-02 00:14:18 +00:00
committed by Nuno Marques
parent adbec90018
commit 3c246ce170
3 changed files with 36 additions and 35 deletions
@@ -130,7 +130,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: %" PRIu64 " messages in %d LOOPS, %" PRIu64 " bytes in %.03f seconds - %.02fKB/s\n",
PX4_INFO("SENT: %" PRIu64 " messages in %d LOOPS, %" PRIu64 " bytes in %.03f seconds - %.02fKB/s",
sent, loop, total_sent, elapsed_secs, (double)total_sent/(1000*elapsed_secs));
return nullptr;
@@ -203,7 +203,7 @@ void micrortps_start_topics(struct timespec &begin, int &total_read, uint32_t &r
break;
@[end for]@
default:
printf("Unexpected topic ID\n");
PX4_WARN("Unexpected topic ID\n");
break;
}
}