feat(simu): cross-platform connection of host serial ports to simu radio (#5584)

This commit is contained in:
Nigel Williams
2024-12-16 20:00:42 +10:00
committed by GitHub
parent 8885016fd5
commit 9109d4f46f
22 changed files with 789 additions and 808 deletions
+1 -13
View File
@@ -20,20 +20,8 @@ set(SIMU_DRIVERS
bt_driver.cpp
timers_driver.cpp
abnormal_reboot.cpp
rs232-linux.c
)
option(SIMU_AUX "Allow the simulator to use the host's RS-232 port" OFF)
set(SIMU_COM_PORT "2" CACHE STRING "Set COM port number to use")
if (SIMU_AUX)
if(WIN32)
set(SIMU_DRIVERS ${SIMU_DRIVERS} rs232-win.c)
else()
set(SIMU_DRIVERS ${SIMU_DRIVERS} rs232-linux.c)
endif()
endif()
set(HW_DESC_JSON ${FLAVOUR}.json)
AddHardwareDefTarget(${HW_DESC_JSON})
AddHWGenTarget(${HW_DESC_JSON} simu_keys simu_keys.inc)
@@ -112,7 +100,7 @@ if(Qt5Widgets_FOUND)
target_compile_options(${SIMULATOR_TARGET} PRIVATE ${SIMU_SRC_OPTIONS})
target_compile_definitions(${SIMULATOR_TARGET} PUBLIC ${APP_COMMON_DEFINES})
target_link_libraries(${SIMULATOR_TARGET} ${SDL2_LIBRARIES} Qt5::Core)
target_link_libraries(${SIMULATOR_TARGET} ${SDL2_LIBRARIES} Qt5::Core Qt5::SerialPort)
# Remove debug symbols on release builds
if(NOT CLANG)