mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-26 01:00:36 +08:00
fix(uxrce_dds_client): enable UDP only on NuttX boards with Ethernet
The NuttX UDP MTU is taken from ETH_UDP_MSS(), which NuttX only defines with CONFIG_NET_ETHERNET. Boards that enable CONFIG_NET for SocketCAN alone, such as the MR-NavQ95, failed to compile. Gate the UDP transport on CONFIG_NET_ETHERNET in both the header and the library build. Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
This commit is contained in:
1 parent
fec5cf5d14
commit
db2a8ce3cb
2 files changed
+4
-3
No files matched your search
@@ -75,8 +75,8 @@ else()
|
||||
set(c_flags_with_includes "${c_flags_with_includes} -Wno-cast-align -D__PX4_NUTTX")
|
||||
endif()
|
||||
|
||||
# Match UXRCE_DDS_CLIENT_UDP in uxrce_dds_client.h: NuttX targets without networking have no UDP transport
|
||||
if(PX4_PLATFORM STREQUAL "nuttx" AND NOT CONFIG_NET)
|
||||
# Match UXRCE_DDS_CLIENT_UDP in uxrce_dds_client.h: NuttX targets without Ethernet have no UDP transport
|
||||
if(PX4_PLATFORM STREQUAL "nuttx" AND NOT CONFIG_NET_ETHERNET)
|
||||
set(uclient_profile_udp OFF)
|
||||
else()
|
||||
set(uclient_profile_udp ON)
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
#include <lib/perf/perf_counter.h>
|
||||
#include <systemlib/system_time_source.h>
|
||||
|
||||
#if defined(CONFIG_NET) || defined(__PX4_POSIX)
|
||||
// The NuttX UDP MTU is taken from ETH_UDP_MSS(), which NuttX only defines with Ethernet
|
||||
#if defined(CONFIG_NET_ETHERNET) || defined(__PX4_POSIX)
|
||||
# define UXRCE_DDS_CLIENT_UDP 1
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user