I want to add a radar distance sensor based on CAN communication. I want to use the driver provided by the src/drivers/uavcan library as the underlying communication driver of CAN. This error message appears when making dependencies. Does anyone know how to solve this error?
src/distance_sensor/radar_can/CMakeLists.txt:
px4_add_module(
MODULE drivers__distance_sensor__radar_can
MAIN radar_can
COMPILE_FLAGS
-Wno-cast-align # TODO: fix and enable
INCLUDES
${PX4_SOURCE_DIR}/src/drivers/uavcan
SRCS
radar_can.cpp
radar_can_main.cpp
DEPENDS
px4_work_queue
drivers_rangefinder
drivers__uavcan
)
could it simply be the double underscore?
try: drivers_uavcan
instead of drivers__uavcan
I tried it, still the same error!Because there is a related definition in the uavcan driver:
px4_add_module(
MODULE drivers__uavcan
MAIN uavcan
STACK_MAIN 4096
COMPILE_FLAGS
-Wno-format-security # logmessage.hpp
#-O0
#-DDEBUG_BUILD
INCLUDES
${DSDLC_OUTPUT}
${LIBUAVCAN_DIR}/libuavcan/include
${LIBUAVCAN_DIR}/libuavcan/include/dsdlc_generated
${LIBUAVCAN_DIR}/libuavcan_drivers/posix/include
${LIBUAVCAN_DIR_DRIVERS}/${UAVCAN_DRIVER}/driver/include
SRCS
arming_status.cpp
arming_status.hpp
beep.cpp
beep.hpp
rgbled.cpp
rgbled.hpp
safety_state.cpp
safety_state.hpp
# Main
uavcan_main.cpp
uavcan_servers.cpp
# Actuators
actuators/esc.cpp
actuators/hardpoint.cpp
actuators/servo.cpp
# Sensors
sensors/sensor_bridge.cpp
sensors/differential_pressure.cpp
sensors/baro.cpp
sensors/battery.cpp
sensors/airspeed.cpp
sensors/flow.cpp
sensors/gnss_relative.cpp
sensors/gnss.cpp
sensors/mag.cpp
sensors/rangefinder.cpp
sensors/accel.cpp
sensors/gyro.cpp
sensors/ice_status.cpp
sensors/hygrometer.cpp
sensors/safety_button.cpp
MODULE_CONFIG
module.yaml
DEPENDS
px4_uavcan_dsdlc
button_publisher
drivers_rangefinder
led
mixer_module
version
git_uavcan
uavcan_${UAVCAN_DRIVER}_driver
drivers_rangefinder # Fix undefined reference when no distance sensors are selected
# within libuavcan
uavcan
)