2010-09-06 01:47:08 -03:00
|
|
|
#ifndef AP_RC_h
|
|
|
|
#define AP_RC_h
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include "WProgram.h"
|
|
|
|
#include "RC.h"
|
|
|
|
|
|
|
|
class AP_RC : public RC
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AP_RC();
|
2010-09-06 03:14:24 -03:00
|
|
|
void init();
|
2010-09-11 16:42:49 -03:00
|
|
|
void read();
|
2010-09-06 03:14:24 -03:00
|
|
|
void output();
|
2010-09-06 01:47:08 -03:00
|
|
|
void set_ch_pwm(uint8_t ch, uint16_t pwm);
|
|
|
|
void trim();
|
2010-09-13 00:50:12 -03:00
|
|
|
void twitch_servos(uint8_t times);
|
2010-09-06 01:47:08 -03:00
|
|
|
|
|
|
|
int16_t radio_in[4];
|
|
|
|
int16_t radio_min[4];
|
|
|
|
int16_t radio_trim[4];
|
|
|
|
int16_t radio_max[4];
|
|
|
|
|
2010-09-06 03:14:24 -03:00
|
|
|
int16_t servo_in[4];
|
2010-09-06 01:47:08 -03:00
|
|
|
float servo_out[4];
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint16_t _timer_out;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|