Добавить общие графики, декодер KONOR и порт STM32 bxCAN

This commit is contained in:
2026-09-04 12:22:17 +03:00
parent af82687e42
commit e163d9ba55
51 changed files with 5040 additions and 15 deletions

View File

@@ -10,6 +10,9 @@ set(SETPROTOCOL_V2_SOURCES
src/set_can.c
src/set_firmware.c
src/set_telemetry.c
src/set_plot.c
src/set_trends.c
src/set_spectrum.c
)
# Совместимые ProtoCAN/SETGUI v1 форматы переходного периода.
@@ -32,6 +35,9 @@ set(SETPROTOCOL_SOURCES
add_library(setprotocol_static STATIC ${SETPROTOCOL_SOURCES})
target_include_directories(setprotocol_static PUBLIC include)
if(NOT MSVC)
target_link_libraries(setprotocol_static PUBLIC m)
endif()
# Совместимое имя цели для проектов, уже использовавших SET protocol v2.
add_library(set_protocol ALIAS setprotocol_static)
@@ -40,6 +46,9 @@ option(SETP_BUILD_SHARED "Build stable host ABI shared library" ON)
if(SETP_BUILD_SHARED)
add_library(setprotocol SHARED ${SETPROTOCOL_SOURCES})
target_include_directories(setprotocol PUBLIC include)
if(NOT MSVC)
target_link_libraries(setprotocol PRIVATE m)
endif()
target_compile_definitions(setprotocol PRIVATE PCAN_ABI_BUILD_DLL)
set_target_properties(setprotocol PROPERTIES
C_VISIBILITY_PRESET hidden
@@ -66,6 +75,10 @@ option(SETP_BUILD_TESTS "Build host tests" ON)
if(SETP_BUILD_TESTS)
enable_testing()
add_executable(test_plot tests/test_plot.c)
target_link_libraries(test_plot PRIVATE setprotocol_static)
add_test(NAME shared_plot COMMAND test_plot)
add_executable(test_set_protocol tests/test_set_protocol.c)
target_link_libraries(test_set_protocol PRIVATE setprotocol_static)
add_test(NAME set_protocol_v2 COMMAND test_set_protocol)
@@ -81,4 +94,10 @@ if(SETP_BUILD_TESTS)
add_executable(test_abi tests/test_abi.c)
target_link_libraries(test_abi PRIVATE setprotocol_static)
add_test(NAME stable_abi COMMAND test_abi)
add_executable(test_trends tests/test_trends.c)
target_link_libraries(test_trends PRIVATE setprotocol_static)
add_test(NAME shared_trends COMMAND test_trends)
add_executable(test_spectrum tests/test_spectrum.c)
target_link_libraries(test_spectrum PRIVATE setprotocol_static)
add_test(NAME shared_spectrum COMMAND test_spectrum)
endif()