mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-29 06:44:07 +08:00
Adds ability for generate_listener.py to process out-of-tree uORB message definitions as well (#9097)
This commit is contained in:
parent
34dd68bee1
commit
6d445cf5a6
@ -32,7 +32,7 @@
|
||||
############################################################################
|
||||
|
||||
add_custom_command(OUTPUT topic_listener.cpp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generate_listener.py ${PX4_SOURCE_DIR} > topic_listener.cpp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generate_listener.py ${PX4_SOURCE_DIR} ${EXTERNAL_MODULES_LOCATION} > topic_listener.cpp
|
||||
DEPENDS generate_listener.py uorb_msgs
|
||||
)
|
||||
|
||||
|
||||
@ -8,8 +8,12 @@ import re
|
||||
# This script is run from Build/<target>_default.build/$(PX4_BASE)/Firmware/src/systemcmds/topic_listener
|
||||
|
||||
# argv[1] must be the full path of the top Firmware dir
|
||||
# argv[2] (optional) is the full path to the EXTERNAL_MODULES_LOCATION
|
||||
|
||||
raw_messages = glob.glob(sys.argv[1]+"/msg/*.msg")
|
||||
if len(sys.argv) > 2:
|
||||
external_raw_messages = glob.glob(sys.argv[2]+"/msg/*.msg")
|
||||
raw_messages += external_raw_messages # Append the msgs defined in the EXTERNAL_MODULES_LOCATION to the normal msg list
|
||||
messages = []
|
||||
topics = []
|
||||
message_elements = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user