mirror of https://github.com/ArduPilot/ardupilot
uncrustify libraries/AP_Motors/AP_MotorsTri.h
This commit is contained in:
parent
6bf09c9b48
commit
d6241b868f
|
@ -14,41 +14,44 @@
|
||||||
#include <AP_Motors.h>
|
#include <AP_Motors.h>
|
||||||
|
|
||||||
// tail servo uses channel 7
|
// tail servo uses channel 7
|
||||||
#define AP_MOTORS_CH_TRI_YAW CH_7
|
#define AP_MOTORS_CH_TRI_YAW CH_7
|
||||||
|
|
||||||
/// @class AP_MotorsTri
|
/// @class AP_MotorsTri
|
||||||
class AP_MotorsTri : public AP_Motors {
|
class AP_MotorsTri : public AP_Motors {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
AP_MotorsTri( uint8_t APM_version, APM_RC_Class* rc_out, RC_Channel* rc_roll, RC_Channel* rc_pitch, RC_Channel* rc_throttle, RC_Channel* rc_yaw, RC_Channel* rc_tail, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
|
AP_MotorsTri( uint8_t APM_version, APM_RC_Class* rc_out, RC_Channel* rc_roll, RC_Channel* rc_pitch, RC_Channel* rc_throttle, RC_Channel* rc_yaw, RC_Channel* rc_tail, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
|
||||||
AP_Motors(APM_version, rc_out, rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz),
|
AP_Motors(APM_version, rc_out, rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz),
|
||||||
_rc_tail(rc_tail) {};
|
_rc_tail(rc_tail) {
|
||||||
|
};
|
||||||
|
|
||||||
// init
|
// init
|
||||||
virtual void Init();
|
virtual void Init();
|
||||||
|
|
||||||
// set update rate to motors - a value in hertz or AP_MOTORS_SPEED_INSTANT_PWM for instant pwm
|
// set update rate to motors - a value in hertz or AP_MOTORS_SPEED_INSTANT_PWM for instant pwm
|
||||||
void set_update_rate( uint16_t speed_hz );
|
void set_update_rate( uint16_t speed_hz );
|
||||||
|
|
||||||
// enable - starts allowing signals to be sent to motors
|
// enable - starts allowing signals to be sent to motors
|
||||||
virtual void enable();
|
virtual void enable();
|
||||||
|
|
||||||
// get basic information about the platform
|
// get basic information about the platform
|
||||||
virtual uint8_t get_num_motors() { return 4; }; // 3 motors + 1 tail servo
|
virtual uint8_t get_num_motors() {
|
||||||
|
return 4;
|
||||||
|
}; // 3 motors + 1 tail servo
|
||||||
|
|
||||||
// motor test
|
// motor test
|
||||||
virtual void output_test();
|
virtual void output_test();
|
||||||
|
|
||||||
// output_min - sends minimum values out to the motors
|
// output_min - sends minimum values out to the motors
|
||||||
virtual void output_min();
|
virtual void output_min();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// output - sends commands to the motors
|
// output - sends commands to the motors
|
||||||
virtual void output_armed();
|
virtual void output_armed();
|
||||||
virtual void output_disarmed();
|
virtual void output_disarmed();
|
||||||
|
|
||||||
RC_Channel* _rc_tail; // REV parameter used from this channel to determine direction of tail servo movement
|
RC_Channel* _rc_tail; // REV parameter used from this channel to determine direction of tail servo movement
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AP_MOTORSTRI
|
#endif // AP_MOTORSTRI
|
Loading…
Reference in New Issue