@@ -937,27 +937,7 @@ FixedwingPositionControl::control_auto(const float control_interval, const Vecto
937
937
}
938
938
939
939
/* Copy thrust output for publication, handle special cases */
940
- if (position_sp_type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF && // launchdetector only available in auto
941
- _launch_detection_state != LAUNCHDETECTION_RES_DETECTED_ENABLEMOTORS &&
942
- !_runway_takeoff.runwayTakeoffEnabled () && !_autogyro_takeoff.autogyroTakeoffEnabled ()) {
943
-
944
- /* making sure again that the correct thrust is used,
945
- * without depending on library calls for safety reasons.
946
- the pre-takeoff throttle and the idle throttle normally map to the same parameter. */
947
- _att_sp.thrust_body [0 ] = _param_fw_thr_idle.get ();
948
-
949
- } else if (position_sp_type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF &&
950
- _runway_takeoff.runwayTakeoffEnabled ()) {
951
-
952
- _att_sp.thrust_body [0 ] = _runway_takeoff.getThrottle (control_interval, get_tecs_thrust ());
953
-
954
- } else if (pos_sp_curr.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF &&
955
- _autogyro_takeoff.autogyroTakeoffEnabled ()) {
956
-
957
- _att_sp.thrust_body [0 ] = _autogyro_takeoff.getThrottle (control_interval, min (get_tecs_thrust (),
958
- _param_fw_thr_max.get ()));
959
-
960
- } else if (pos_sp_curr.type == position_setpoint_s::SETPOINT_TYPE_IDLE) {
940
+ if (position_sp_type == position_setpoint_s::SETPOINT_TYPE_IDLE) {
961
941
962
942
_att_sp.thrust_body [0 ] = 0 .0f ;
963
943
@@ -1703,7 +1683,8 @@ FixedwingPositionControl::control_auto_takeoff(const hrt_abstime &now, const flo
1703
1683
_att_sp.apply_spoilers = vehicle_attitude_setpoint_s::SPOILERS_OFF;
1704
1684
}
1705
1685
1706
- if (_launch_detection_state != LAUNCHDETECTION_RES_DETECTED_ENABLEMOTORS && !_runway_takeoff.runwayTakeoffEnabled ()) {
1686
+ if (_launch_detection_state != LAUNCHDETECTION_RES_DETECTED_ENABLEMOTORS && !_runway_takeoff.runwayTakeoffEnabled ()
1687
+ && !_autogyro_takeoff.autogyroTakeoffEnabled ()) {
1707
1688
1708
1689
/* making sure again that the correct thrust is used,
1709
1690
* without depending on library calls for safety reasons.
@@ -1714,6 +1695,10 @@ FixedwingPositionControl::control_auto_takeoff(const hrt_abstime &now, const flo
1714
1695
1715
1696
_att_sp.thrust_body [0 ] = _runway_takeoff.getThrottle (now, get_tecs_thrust ());
1716
1697
1698
+ } else if (_autogyro_takeoff.autogyroTakeoffEnabled ()) {
1699
+ PX4_INFO (" Spoustim GETTHROTTLE" );
1700
+ _att_sp.thrust_body [0 ] = _autogyro_takeoff.getThrottle (now, get_tecs_thrust ());
1701
+
1717
1702
} else {
1718
1703
/* Copy thrust and pitch values from tecs */
1719
1704
// when we are landed state we want the motor to spin at idle speed
0 commit comments