Rename UXR_CONFIG_CAN_TRANSPORT_MTU (#372)

Because CAN-FD MTU is fixed, it's not configurable.
UXR_CONFIG_CAN_TRANSPORT_MTU is a bit misleading. Thus, this commit
rename it to UXR_CAN_TRANSPORT_MTU.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Co-authored-by: Yasushi SHOJI <yashi@spacecubics.com>
This commit is contained in:
Pablo Garrido 2023-09-27 10:45:37 +02:00 committed by GitHub
parent b8dbfaa775
commit 8ffecce848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -22,7 +22,7 @@
#include <stdlib.h> //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,

View File

@ -29,11 +29,12 @@ extern "C"
#include <uxr/client/visibility.h>
#include <uxr/client/transport.h>
#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;

View File

@ -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;
}