mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 05:58:30 -04:00
Added a default, but low throttle cruise value
Added a clear integrator for Rate I to prevent tip ups at launch.
This commit is contained in:
parent
3c1ce315fe
commit
f65390920a
@ -1080,7 +1080,6 @@ void update_roll_pitch_mode(void)
|
||||
g.rc_2.servo_out = get_stabilize_pitch(control_pitch);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1093,6 +1092,8 @@ void update_throttle_mode(void)
|
||||
if (g.rc_3.control_in > 0){
|
||||
g.rc_3.servo_out = g.rc_3.control_in + get_angle_boost();
|
||||
}else{
|
||||
g.pi_rate_roll.reset_I();
|
||||
g.pi_rate_pitch.reset_I();
|
||||
g.rc_3.servo_out = 0;
|
||||
}
|
||||
// reset the timer to throttle so that we never get fast I term run-ups
|
||||
|
@ -25,7 +25,6 @@ get_stabilize_roll(long target_angle)
|
||||
|
||||
// output control:
|
||||
return (int)constrain(rate, -2500, 2500);
|
||||
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -317,7 +317,7 @@ public:
|
||||
throttle_fs_enabled (THROTTLE_FAILSAFE, k_param_throttle_fs_enabled, PSTR("THR_FAILSAFE")),
|
||||
throttle_fs_action (THROTTLE_FAILSAFE_ACTION, k_param_throttle_fs_action, PSTR("THR_FS_ACTION")),
|
||||
throttle_fs_value (THROTTLE_FS_VALUE, k_param_throttle_fs_value, PSTR("THR_FS_VALUE")),
|
||||
throttle_cruise (100, k_param_throttle_cruise, PSTR("TRIM_THROTTLE")),
|
||||
throttle_cruise (THROTTLE_CRUISE, k_param_throttle_cruise, PSTR("TRIM_THROTTLE")),
|
||||
|
||||
flight_mode1 (FLIGHT_MODE_1, k_param_flight_mode1, PSTR("FLTMODE1")),
|
||||
flight_mode2 (FLIGHT_MODE_2, k_param_flight_mode2, PSTR("FLTMODE2")),
|
||||
|
@ -509,6 +509,12 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Throttle control gains
|
||||
//
|
||||
|
||||
|
||||
#ifndef THROTTLE_CRUISE
|
||||
# define THROTTLE_CRUISE 350 //
|
||||
#endif
|
||||
|
||||
#ifndef THROTTLE_P
|
||||
# define THROTTLE_P 0.6 //
|
||||
#endif
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
static void output_motors_armed()
|
||||
{
|
||||
|
||||
int roll_out, pitch_out;
|
||||
int out_min = g.rc_3.radio_min;
|
||||
int out_max = g.rc_3.radio_max;
|
||||
|
Loading…
Reference in New Issue
Block a user