2013-01-03 13:56:23 -04:00
|
|
|
|
|
|
|
#ifndef __AP_HAL_SMACCM_RCINPUT_H__
|
|
|
|
#define __AP_HAL_SMACCM_RCINPUT_H__
|
|
|
|
|
|
|
|
#include <AP_HAL_SMACCM.h>
|
|
|
|
|
2013-01-09 21:19:12 -04:00
|
|
|
#define SMACCM_RCINPUT_CHANNELS 8
|
|
|
|
|
2013-01-03 13:56:23 -04:00
|
|
|
class SMACCM::SMACCMRCInput : public AP_HAL::RCInput {
|
|
|
|
public:
|
|
|
|
SMACCMRCInput();
|
2013-01-07 14:48:56 -04:00
|
|
|
void init(void *unused);
|
2013-04-29 03:05:53 -03:00
|
|
|
uint8_t valid_channels();
|
2013-01-03 13:56:23 -04:00
|
|
|
uint16_t read(uint8_t ch);
|
|
|
|
uint8_t read(uint16_t* periods, uint8_t len);
|
|
|
|
|
|
|
|
bool set_overrides(int16_t *overrides, uint8_t len);
|
|
|
|
bool set_override(uint8_t channel, int16_t override);
|
|
|
|
void clear_overrides();
|
2013-01-07 14:48:56 -04:00
|
|
|
|
|
|
|
private:
|
2013-01-09 21:19:12 -04:00
|
|
|
uint16_t _override[SMACCM_RCINPUT_CHANNELS];
|
2013-01-03 13:56:23 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __AP_HAL_SMACCM_RCINPUT_H__
|