Browse Source

AP_HAL_Linux: RCInput_UDP: Fix compiling warning

This warning happens because of the difference of datatypes between
32 and 64 bits processors.

%% libraries/AP_HAL_Linux/RCInput_UDP.o
/home/zehortigoza/dev/ardupilot/libraries/AP_HAL_Linux/RCInput_UDP.cpp: In member function 'virtual void Linux::LinuxRCInput_UDP::_timer_tick()':
/home/zehortigoza/dev/ardupilot/libraries/AP_HAL_Linux/RCInput_UDP.cpp:42:72: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t {aka long unsigned int}' [-Wformat=]
             hal.console->printf("no rc cmds received for %llu\n", delay);
mission-4.1.18
José Roberto de Souza 10 years ago committed by Andrew Tridgell
parent
commit
9889f826b3
  1. 2
      libraries/AP_HAL_Linux/RCInput_UDP.cpp

2
libraries/AP_HAL_Linux/RCInput_UDP.cpp

@ -39,7 +39,7 @@ void LinuxRCInput_UDP::_timer_tick(void) @@ -39,7 +39,7 @@ void LinuxRCInput_UDP::_timer_tick(void)
}
if (_last_buf_ts != 0 &&
(delay = _buf.timestamp_us - _last_buf_ts) > 100000) {
hal.console->printf("no rc cmds received for %llu\n", delay);
hal.console->printf("no rc cmds received for %llu\n", (unsigned long long)delay);
}
_last_buf_ts = _buf.timestamp_us;

Loading…
Cancel
Save