ardupilot/libraries/AP_HAL_Linux/RCInput_UDP.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
451 B
C
Raw Normal View History

#pragma once
#include "RCInput.h"
2023-12-25 22:21:11 -04:00
#include <AP_HAL/utility/Socket_native.h>
#include "RCInput_UDP_Protocol.h"
#define RCINPUT_UDP_DEF_PORT 777
namespace Linux {
class RCInput_UDP : public RCInput
{
public:
RCInput_UDP();
void init() override;
void _timer_tick(void) override;
private:
SocketAPM _socket{true};
uint16_t _port;
struct rc_udp_packet_v3 _buf;
uint64_t _last_buf_ts;
uint16_t _last_buf_seq;
};
}