AP_MotorsHeli: replace collective_mid_pwm with collective_mid_pct

This commit is contained in:
Randy Mackay 2016-02-06 10:39:20 +09:00
parent a39bbc5421
commit 9790245bf1
2 changed files with 2 additions and 2 deletions

View File

@ -261,7 +261,7 @@ void AP_MotorsHeli::output_disarmed()
// fixate mid collective
_roll_in = 0.0f;
_pitch_in = 0.0f;
_throttle_filter.reset(_collective_mid_pwm / 1000.0f);
_throttle_filter.reset(_collective_mid_pct);
_yaw_in = 0.0f;
break;
case SERVO_CONTROL_MODE_MANUAL_MAX:

View File

@ -206,6 +206,6 @@ protected:
float _rollFactor[AP_MOTORS_HELI_NUM_SWASHPLATE_SERVOS];
float _pitchFactor[AP_MOTORS_HELI_NUM_SWASHPLATE_SERVOS];
float _collectiveFactor[AP_MOTORS_HELI_NUM_SWASHPLATE_SERVOS];
int16_t _collective_mid_pwm = 0; // collective mid parameter value converted to pwm form (i.e. 0 ~ 1000)
float _collective_mid_pct = 0.0f; // collective mid parameter value converted to 0 ~ 1 range
uint8_t _servo_test_cycle_counter = 0; // number of test cycles left to run after bootup
};