You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
415 B
21 lines
415 B
#pragma once |
|
|
|
#include "RCInput.h" |
|
#include <AP_HAL/utility/Socket.h> |
|
#include "RCInput_UDP_Protocol.h" |
|
|
|
#define RCINPUT_UDP_DEF_PORT 777 |
|
|
|
class Linux::RCInput_UDP : public Linux::RCInput |
|
{ |
|
public: |
|
RCInput_UDP(); |
|
void init(); |
|
void _timer_tick(void); |
|
private: |
|
SocketAPM _socket{true}; |
|
uint16_t _port; |
|
struct rc_udp_packet _buf; |
|
uint64_t _last_buf_ts; |
|
uint16_t _last_buf_seq; |
|
};
|
|
|