mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 05:11:36 +08:00
microRTPS: move buffer size to transport
This commit is contained in:
@@ -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 "microRTPS_timesync.h"
|
||||||
#include "RtpsTopics.h"
|
#include "RtpsTopics.h"
|
||||||
|
|
||||||
#define BUFFER_SIZE 1024
|
|
||||||
|
|
||||||
// Default values
|
// Default values
|
||||||
#define DEVICE "/dev/ttyACM0"
|
#define DEVICE "/dev/ttyACM0"
|
||||||
#define SLEEP_US 1
|
#define SLEEP_US 1
|
||||||
|
|||||||
@@ -43,8 +43,6 @@
|
|||||||
|
|
||||||
#include "microRTPS_transport.h"
|
#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) */
|
/** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */
|
||||||
uint16_t const crc16_table[256] = {
|
uint16_t const crc16_table[256] = {
|
||||||
0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
|
0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
|
||||||
|
|||||||
@@ -38,6 +38,9 @@
|
|||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
|
#define BUFFER_SIZE 1024
|
||||||
|
#define DEFAULT_UART "/dev/ttyACM0"
|
||||||
|
|
||||||
class Transport_node
|
class Transport_node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -74,7 +77,7 @@ protected:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
uint32_t rx_buff_pos;
|
uint32_t rx_buff_pos;
|
||||||
char rx_buffer[1024] = {};
|
char rx_buffer[BUFFER_SIZE] = {};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct __attribute__((packed)) Header {
|
struct __attribute__((packed)) Header {
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
#include <px4_platform_common/time.h>
|
#include <px4_platform_common/time.h>
|
||||||
#include <uORB/uORB.h>
|
#include <uORB/uORB.h>
|
||||||
|
|
||||||
#define BUFFER_SIZE 1024
|
|
||||||
#define LOOPS -1
|
#define LOOPS -1
|
||||||
#define SLEEP_MS 1
|
#define SLEEP_MS 1
|
||||||
#define BAUDRATE 460800
|
#define BAUDRATE 460800
|
||||||
|
|||||||
Reference in New Issue
Block a user