Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transport/can: Rename UXR_CONFIG_CAN_TRANSPORT_MTU #371

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/PublishHelloWorldCAN/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions include/uxr/client/profile/transport/can/can_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/c/profile/transport/can/can_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading