mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-19 15:29:07 +08:00
microRTPS: move buffer size to transport
This commit is contained in:
parent
407bd8860f
commit
b2845c60d3
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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:
|
||||
|
||||
protected:
|
||||
uint32_t rx_buff_pos;
|
||||
char rx_buffer[1024] = {};
|
||||
char rx_buffer[BUFFER_SIZE] = {};
|
||||
|
||||
private:
|
||||
struct __attribute__((packed)) Header {
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user