diff --git a/CMakeLists.txt b/CMakeLists.txt index d256bb7d..e7e0258e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,7 +92,7 @@ list(APPEND _deps "microcdr\;${_microcdr_version}") ############################################################################### set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) if(NOT UCLIENT_SUPERBUILD) - project(microxrcedds_client VERSION "2.4.1" LANGUAGES C) + project(microxrcedds_client VERSION "2.4.2" LANGUAGES C) else() project(uclient_superbuild NONE) include(${PROJECT_SOURCE_DIR}/cmake/SuperBuild.cmake) diff --git a/examples/PublishHelloWorldCAN/main.c b/examples/PublishHelloWorldCAN/main.c index f6f45b47..ae98a17a 100644 --- a/examples/PublishHelloWorldCAN/main.c +++ b/examples/PublishHelloWorldCAN/main.c @@ -22,7 +22,7 @@ #include //atoi #define STREAM_HISTORY 8 -#define BUFFER_SIZE UXR_CONFIG_CAN_TRANSPORT_MTU* STREAM_HISTORY +#define BUFFER_SIZE UXR_CAN_TRANSPORT_MTU* STREAM_HISTORY int main( int args, diff --git a/include/uxr/client/profile/transport/can/can_transport.h b/include/uxr/client/profile/transport/can/can_transport.h index 3bc36af0..cb77dc30 100644 --- a/include/uxr/client/profile/transport/can/can_transport.h +++ b/include/uxr/client/profile/transport/can/can_transport.h @@ -29,11 +29,12 @@ extern "C" #include #include -#define UXR_CONFIG_CAN_TRANSPORT_MTU 63 +/* For CAN-FD, MTU is fixed value */ +#define UXR_CAN_TRANSPORT_MTU 63 typedef struct uxrCANTransport { - uint8_t buffer[UXR_CONFIG_CAN_TRANSPORT_MTU]; + uint8_t buffer[UXR_CAN_TRANSPORT_MTU]; uxrCommunication comm; struct uxrCANPlatform platform; } uxrCANTransport; diff --git a/src/c/profile/transport/can/can_transport.c b/src/c/profile/transport/can/can_transport.c index 97fe09b5..c781ef21 100644 --- a/src/c/profile/transport/can/can_transport.c +++ b/src/c/profile/transport/can/can_transport.c @@ -103,7 +103,7 @@ bool uxr_init_can_transport( transport->comm.send_msg = send_can_msg; transport->comm.recv_msg = recv_can_msg; transport->comm.comm_error = get_can_error; - transport->comm.mtu = UXR_CONFIG_CAN_TRANSPORT_MTU; + transport->comm.mtu = UXR_CAN_TRANSPORT_MTU; UXR_INIT_LOCK(&transport->comm.mutex); rv = true; }