mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 09:10:34 +08:00
Linux: in printf cast uint64_t to unsigned long long
When printing a uint64_t type using %llu, this works on a 32bit system, but on a 64bit machine uint64_t is an unsigned long. The compiler complains about unmatching types. The time times in PX4 should likely have been unsigned long long and not uint64_t as that type changes per architecture. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -1657,7 +1657,7 @@ Mavlink::display_status()
|
||||
{
|
||||
|
||||
if (_rstatus.heartbeat_time > 0) {
|
||||
printf("\tGCS heartbeat:\t%llu us ago\n", hrt_elapsed_time(&_rstatus.heartbeat_time));
|
||||
printf("\tGCS heartbeat:\t%llu us ago\n", (unsigned long long)hrt_elapsed_time(&_rstatus.heartbeat_time));
|
||||
}
|
||||
|
||||
printf("\tmavlink chan: #%u\n", _channel);
|
||||
|
||||
Reference in New Issue
Block a user