Copter: set_accel_throttle_I_from_pilot_throttle uses 0 to 1 range

This commit is contained in:
Leonard Hall 2016-01-02 11:43:21 +09:00 committed by Randy Mackay
parent c3403a128c
commit 74983669be
2 changed files with 3 additions and 3 deletions

View File

@ -287,10 +287,10 @@ float Copter::get_surface_tracking_climb_rate(int16_t target_rate, float current
} }
// set_accel_throttle_I_from_pilot_throttle - smoothes transition from pilot controlled throttle to autopilot throttle // set_accel_throttle_I_from_pilot_throttle - smoothes transition from pilot controlled throttle to autopilot throttle
void Copter::set_accel_throttle_I_from_pilot_throttle(int16_t pilot_throttle) void Copter::set_accel_throttle_I_from_pilot_throttle(float pilot_throttle)
{ {
// shift difference between pilot's throttle and hover throttle into accelerometer I // shift difference between pilot's throttle and hover throttle into accelerometer I
g.pid_accel_z.set_integrator(pilot_throttle-throttle_average); g.pid_accel_z.set_integrator((pilot_throttle-throttle_average) * 1000.0f);
} }
// updates position controller's maximum altitude using fence and EKF limits // updates position controller's maximum altitude using fence and EKF limits

View File

@ -616,7 +616,7 @@ private:
float get_takeoff_trigger_throttle(); float get_takeoff_trigger_throttle();
float get_throttle_pre_takeoff(float input_thr); float get_throttle_pre_takeoff(float input_thr);
float get_surface_tracking_climb_rate(int16_t target_rate, float current_alt_target, float dt); float get_surface_tracking_climb_rate(int16_t target_rate, float current_alt_target, float dt);
void set_accel_throttle_I_from_pilot_throttle(int16_t pilot_throttle); void set_accel_throttle_I_from_pilot_throttle(float pilot_throttle);
void update_poscon_alt_max(); void update_poscon_alt_max();
void rotate_body_frame_to_NE(float &x, float &y); void rotate_body_frame_to_NE(float &x, float &y);
void gcs_send_heartbeat(void); void gcs_send_heartbeat(void);