mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-15 14:53:32 +08:00
HAL_Linux: support direct UDP output from UART drivers
this allows safe operation over WiFi links without MAVProxy
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,7 @@ private:
|
||||
char *_ip;
|
||||
char *_flag;
|
||||
bool _connected; // true if a client has connected
|
||||
bool _packetise; // true if writes should try to be on mavlink boundaries
|
||||
|
||||
// we use in-task ring buffers to reduce the system call cost
|
||||
// of ::read() and ::write() in the main loop
|
||||
@@ -60,7 +61,16 @@ private:
|
||||
int _write_fd(const uint8_t *buf, uint16_t n);
|
||||
int _read_fd(uint8_t *buf, uint16_t n);
|
||||
void _tcp_start_connection(bool wait_for_connection);
|
||||
int _parseDevicePath(char* arg);
|
||||
void _udp_start_connection(void);
|
||||
|
||||
enum device_type {
|
||||
DEVICE_TCP,
|
||||
DEVICE_UDP,
|
||||
DEVICE_SERIAL,
|
||||
DEVICE_UNKNOWN
|
||||
};
|
||||
|
||||
enum device_type _parseDevicePath(const char *arg);
|
||||
uint64_t _last_write_time;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user