Browse Source

microRTPS: move buffer size to transport

sbg
TSC21 5 years ago committed by Nuno Marques
parent
commit
b2845c60d3
  1. 2
      msg/templates/urtps/microRTPS_agent.cpp.em
  2. 2
      msg/templates/urtps/microRTPS_transport.cpp
  3. 5
      msg/templates/urtps/microRTPS_transport.h
  4. 1
      src/modules/micrortps_bridge/micrortps_client/microRTPS_client.h

2
msg/templates/urtps/microRTPS_agent.cpp.em

@ -73,8 +73,6 @@ recv_topics = [(alias[idx] if alias[idx] else s.short_name) for idx, s in enumer @@ -73,8 +73,6 @@ recv_topics = [(alias[idx] if alias[idx] else s.short_name) for idx, s in enumer
#include "microRTPS_timesync.h"
#include "RtpsTopics.h"
#define BUFFER_SIZE 1024
// Default values
#define DEVICE "/dev/ttyACM0"
#define SLEEP_US 1

2
msg/templates/urtps/microRTPS_transport.cpp

@ -43,8 +43,6 @@ @@ -43,8 +43,6 @@
#include "microRTPS_transport.h"
#define DEFAULT_UART "/dev/ttyACM0"
/** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */
uint16_t const crc16_table[256] = {
0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,

5
msg/templates/urtps/microRTPS_transport.h

@ -38,6 +38,9 @@ @@ -38,6 +38,9 @@
#include <poll.h>
#include <termios.h>
#define BUFFER_SIZE 1024
#define DEFAULT_UART "/dev/ttyACM0"
class Transport_node
{
public:
@ -74,7 +77,7 @@ protected: @@ -74,7 +77,7 @@ protected:
protected:
uint32_t rx_buff_pos;
char rx_buffer[1024] = {};
char rx_buffer[BUFFER_SIZE] = {};
private:
struct __attribute__((packed)) Header {

1
src/modules/micrortps_bridge/micrortps_client/microRTPS_client.h

@ -49,7 +49,6 @@ @@ -49,7 +49,6 @@
#include <px4_platform_common/time.h>
#include <uORB/uORB.h>
#define BUFFER_SIZE 1024
#define LOOPS -1
#define SLEEP_MS 1
#define BAUDRATE 460800

Loading…
Cancel
Save