AP_Motors: make init_targets_on_arming global

This commit is contained in:
Bill Geyer 2019-09-30 16:54:29 -04:00 committed by Randy Mackay
parent d1a0635ec2
commit 63d9b47530
2 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,7 @@ public:
float get_throttle_hover() const override { return 0.5f; }
// support passing init_targets_on_arming flag to greater code
bool init_targets_on_arming() const { return _heliflags.init_targets_on_arming; }
bool init_targets_on_arming() const override { return _heliflags.init_targets_on_arming; }
// var_info for holding Parameter information
static const struct AP_Param::GroupInfo var_info[];

View File

@ -182,6 +182,10 @@ public:
// using copter motors for forward flight
virtual float get_roll_factor(uint8_t i) { return 0.0f; }
// This function required for tradheli. Tradheli initializes targets when going from unarmed to armed state.
// This function is overriden in motors_heli class. Always true for multicopters.
virtual bool init_targets_on_arming() const { return true; }
enum pwm_type { PWM_TYPE_NORMAL = 0,
PWM_TYPE_ONESHOT = 1,
PWM_TYPE_ONESHOT125 = 2,