ardupilot/libraries/AP_HAL_Linux/RCInput_UART.h
Lucas De Marchi f36e8d9c05 AP_HAL_Linux: remove AP_HAL_Linux_Namespace header
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.
2016-07-29 20:25:03 -03:00

32 lines
465 B
C++

#pragma once
#include <AP_Common/AP_Common.h>
#include "AP_HAL_Linux.h"
#include "RCInput.h"
#define CHANNELS 8
namespace Linux {
class RCInput_UART : public RCInput
{
public:
RCInput_UART(const char *path);
~RCInput_UART();
void init() override;
void _timer_tick(void) override;
private:
int _fd;
uint8_t *_pdata;
ssize_t _remain;
struct PACKED {
uint16_t magic;
uint16_t values[CHANNELS];
} _data;
};
}