mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
f36e8d9c05
This centralized namespace header encourages centralizing things on umbrella headers that are a pain to maintain. Force each part of AP_HAL_Linux to include what is used. While at it, do some whitespace cleanups and minor changes to adhere to coding style.
26 lines
423 B
C++
26 lines
423 B
C++
#pragma once
|
|
|
|
#include "RCInput.h"
|
|
#include <AP_HAL/utility/Socket.h>
|
|
#include "RCInput_UDP_Protocol.h"
|
|
|
|
#define RCINPUT_UDP_DEF_PORT 777
|
|
|
|
namespace Linux {
|
|
|
|
class RCInput_UDP : public 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;
|
|
};
|
|
|
|
}
|