|
|
|
@ -7,9 +7,6 @@
@@ -7,9 +7,6 @@
|
|
|
|
|
// stabilize_init - initialise stabilize controller |
|
|
|
|
static bool heli_stabilize_init(bool ignore_checks) |
|
|
|
|
{ |
|
|
|
|
// initialise filters on roll/pitch input |
|
|
|
|
reset_roll_pitch_in_filters(g.rc_1.control_in, g.rc_2.control_in); |
|
|
|
|
|
|
|
|
|
// set target altitude to zero for reporting |
|
|
|
|
// To-Do: make pos controller aware when it's active/inactive so it can always report the altitude error? |
|
|
|
|
pos_control.set_alt_target(0); |
|
|
|
@ -40,7 +37,7 @@ static void heli_stabilize_run()
@@ -40,7 +37,7 @@ static void heli_stabilize_run()
|
|
|
|
|
pilot_throttle_scaled = get_pilot_desired_throttle(g.rc_3.control_in); |
|
|
|
|
|
|
|
|
|
// call attitude controller |
|
|
|
|
attitude_control.angle_ef_roll_pitch_rate_ef_yaw(target_roll, target_pitch, target_yaw_rate); |
|
|
|
|
attitude_control.angle_ef_roll_pitch_rate_ef_yaw_smooth(target_roll, target_pitch, target_yaw_rate, get_smoothing_gain()); |
|
|
|
|
|
|
|
|
|
// output pilot's throttle - note that TradHeli does not used angle-boost |
|
|
|
|
attitude_control.set_throttle_out(pilot_throttle_scaled, false); |
|
|
|
|