2012-12-17 23:56:21 -04:00
|
|
|
|
2016-01-03 17:22:02 -04:00
|
|
|
#pragma once
|
2012-12-17 23:56:21 -04:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include <AP_HAL/AP_HAL.h>
|
2015-05-04 03:15:12 -03:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
2016-01-03 17:22:02 -04:00
|
|
|
#define SITL_RC_INPUT_CHANNELS 16
|
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include "AP_HAL_SITL.h"
|
2012-12-17 23:56:21 -04:00
|
|
|
|
2016-01-10 02:23:32 -04:00
|
|
|
class HALSITL::RCInput : public AP_HAL::RCInput {
|
2012-12-17 23:56:21 -04:00
|
|
|
public:
|
2017-01-09 08:28:35 -04:00
|
|
|
explicit RCInput(SITL_State *sitlState): _sitlState(sitlState) {}
|
2016-01-03 17:22:02 -04:00
|
|
|
void init() override;
|
2017-01-09 08:28:35 -04:00
|
|
|
bool new_input() override;
|
2018-07-23 23:46:31 -03:00
|
|
|
uint8_t num_channels() override;
|
2016-01-03 17:22:02 -04:00
|
|
|
uint16_t read(uint8_t ch) override;
|
|
|
|
uint8_t read(uint16_t* periods, uint8_t len) override;
|
2012-12-17 23:56:21 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
SITL_State *_sitlState;
|
|
|
|
};
|
|
|
|
|
2012-12-18 05:04:47 -04:00
|
|
|
#endif
|
2012-12-17 23:56:21 -04:00
|
|
|
|