Fixes for manual bridge generation

Fix for some forgot .cxx extensions
Fix for 'print' python 2 3 compatibility
Fix for topic ID type change
This commit is contained in:
Vicente Monge
2017-08-01 22:32:43 +02:00
committed by Lorenz Meier
parent c05ea542d9
commit c5e2745a19
8 changed files with 52 additions and 49 deletions
@@ -31,10 +31,13 @@
#
############################################################################
find_program(FASTRTPSGEN fastrtpsgen)
if(NOT FASTRTPSGEN)
message(WARNING "WARNING: Unable to find fastrtpsgen")
set(GENERATE_RTPS_BRIDGE off)
if(NOT GENERATE_RTPS_BRIDGE MATCHES "off")
find_program(FASTRTPSGEN fastrtpsgen
PATHS $ENV{FASTRTPSGEN_DIR})
if(NOT FASTRTPSGEN)
message(WARNING "WARNING: Unable to find fastrtpsgen")
set(GENERATE_RTPS_BRIDGE off)
endif()
endif()
if(GENERATE_RTPS_BRIDGE MATCHES "off")
@@ -79,28 +82,28 @@ else()
if (NOT "${config_rtps_send_topics}" STREQUAL "" OR NOT "${config_rtps_receive_topics}" STREQUAL "")
set(topic_bridge_files_out microRTPS_client.cpp microRTPS_transport.cpp microRTPS_transport.h)
set(send_topic_files_opt)
if (NOT "${send_topic_files}" STREQUAL "")
set(send_topic_opt "-s")
endif()
set(send_topic_files_opt)
if (NOT "${send_topic_files}" STREQUAL "")
set(send_topic_opt "-s")
endif()
set(receive_topic_files_opt)
if (NOT "${receive_topic_files}" STREQUAL "")
set(receive_topic_opt "-r")
endif()
set(receive_topic_files_opt)
if (NOT "${receive_topic_files}" STREQUAL "")
set(receive_topic_opt "-r")
endif()
add_custom_command(OUTPUT ${topic_bridge_files_out}
COMMAND ${PYTHON_EXECUTABLE}
${PX4_SOURCE_DIR}/Tools/generate_microRTPS_bridge.py
-f $ENV{FASTRTPSGEN_DIR}
${send_topic_opt} ${send_topic_files}
${receive_topic_opt} ${receive_topic_files}
-t ${topic_msg_path}
-u ${msg_out_path}
DEPENDS ${DEPENDS} ${send_topic_files} ${receive_topic_files}
COMMENT "Generating RTPS topic bridge"
VERBATIM
)
add_custom_command(OUTPUT ${topic_bridge_files_out}
COMMAND ${PYTHON_EXECUTABLE}
${PX4_SOURCE_DIR}/Tools/generate_microRTPS_bridge.py
-f $ENV{FASTRTPSGEN_DIR}
${send_topic_opt} ${send_topic_files}
${receive_topic_opt} ${receive_topic_files}
-t ${topic_msg_path}
-u ${msg_out_path}
DEPENDS ${DEPENDS} ${send_topic_files} ${receive_topic_files}
COMMENT "Generating RTPS topic bridge"
VERBATIM
)
endif()
px4_add_module(