mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
Fix NuttX keepalive socketoption
This commit is contained in:
committed by
Beat Küng
parent
e052f35664
commit
3d30eaae5f
@@ -42,12 +42,11 @@ set(BUILD_SHARED_LIBS OFF)
|
|||||||
set(BUILD_TESTING OFF)
|
set(BUILD_TESTING OFF)
|
||||||
set(CHECK_THREADS NO)
|
set(CHECK_THREADS NO)
|
||||||
set(MESSAGE_QUIET ON)
|
set(MESSAGE_QUIET ON)
|
||||||
set(ZENOH_DEBUG ${CONFIG_ZENOH_DEBUG})
|
set(ZENOH_DEBUG ${CONFIG_ZENOH_DEBUG} CACHE STRING "Debug print level" FORCE)
|
||||||
set(PICO_STATIC ON)
|
set(PICO_STATIC ON)
|
||||||
set(Z_FEATURE_TCP_NODELAY 0)
|
if(NOT DEFINED CONFIG_NET_TCPPROTO_OPTIONS AND CONFIG_PLATFORM_NUTTX)
|
||||||
set(Z_FEATURE_MATCHING 0)
|
set(Z_FEATURE_TCP_NODELAY 0 CACHE STRING "Toggle TCP_NODELAY")
|
||||||
#set(Z_FEATURE_BATCHING 0)
|
endif()
|
||||||
#set(Z_FEATURE_INTEREST 0)
|
|
||||||
|
|
||||||
px4_add_git_submodule(TARGET git_zenoh-pico PATH "zenoh-pico")
|
px4_add_git_submodule(TARGET git_zenoh-pico PATH "zenoh-pico")
|
||||||
add_subdirectory(zenoh-pico)
|
add_subdirectory(zenoh-pico)
|
||||||
|
|||||||
@@ -207,6 +207,13 @@ int ZENOH::setupSession()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start read and lease tasks for zenoh-pico
|
||||||
|
if (zp_start_read_task(z_loan_mut(s), NULL) < 0 || zp_start_lease_task(z_loan_mut(s), NULL) < 0) {
|
||||||
|
PX4_ERR("Unable to start read and lease tasks");
|
||||||
|
z_drop(z_move(s));
|
||||||
|
ret = -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,13 +232,6 @@ int ZENOH::setupTopics(px4_pollfd_struct_t *pfds)
|
|||||||
px4_guid[2] = 0xCC;
|
px4_guid[2] = 0xCC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Start read and lease tasks for zenoh-pico
|
|
||||||
if (zp_start_read_task(z_loan_mut(s), NULL) < 0 || zp_start_lease_task(z_loan_mut(s), NULL) < 0) {
|
|
||||||
PX4_ERR("Unable to start read and lease tasks");
|
|
||||||
z_drop(z_move(s));
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_ZENOH_RMW_LIVELINESS
|
#ifdef CONFIG_ZENOH_RMW_LIVELINESS
|
||||||
z_id_t self_id = z_info_zid(z_loan(s));
|
z_id_t self_id = z_info_zid(z_loan(s));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user