Browse Source

AP_MotorsHeli: replace collective_mid_pwm with collective_mid_pct

master
Randy Mackay 9 years ago
parent
commit
9790245bf1
  1. 2
      libraries/AP_Motors/AP_MotorsHeli.cpp
  2. 2
      libraries/AP_Motors/AP_MotorsHeli.h

2
libraries/AP_Motors/AP_MotorsHeli.cpp

@ -261,7 +261,7 @@ void AP_MotorsHeli::output_disarmed() @@ -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:

2
libraries/AP_Motors/AP_MotorsHeli.h

@ -206,6 +206,6 @@ protected: @@ -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
};

Loading…
Cancel
Save