Skip to content

Pr port 4.5.7.5 rc1 rc2 to 4.6.3 - #116

Open
vigneshm-debug wants to merge 4 commits into
airbound-develop-4.6.3from
pr-port-4.5.7.5-rc1-rc2-to-4.6.3
Open

Pr port 4.5.7.5 rc1 rc2 to 4.6.3#116
vigneshm-debug wants to merge 4 commits into
airbound-develop-4.6.3from
pr-port-4.5.7.5-rc1-rc2-to-4.6.3

Conversation

@vigneshm-debug

Copy link
Copy Markdown

akshar-airbound and others added 4 commits June 16, 2026 09:29
* Airbound 4.5.7.2 - hf1 stable release (#37)

* [AIRB-76] Plane: Handle tailsitter back transition abort with force transition complete (#2)

* Plane: Handle tailsitter back transition abort with force transition complete

* Add logs for stabilize controller output for rpy

* Update version to dev and add force backtrans abort in string

* github: update workflows to use actions/upload-artifact@v4

* Always weathervane for tailsitters in RTL pos1 (#4)

* Freeze climb rate pos controller (#12)

* Freeze climb rate during RTL phases

* Expose time to freeze crt before land descent as param

* Add current timestamp to logging

* Disable vh power if negative

* Add desphi logging

* Remove unused fixed wing attitude logs

* Fix unit in docstring for param

* Add weathervane checks in firmware basis pitch (#15)

* Add airbound lua scripts in firmware

* Update init log of airbound lua scripts

* Add gps, vfgain, wvane lua scripts

* Update init test lua script log

* Update version string to 4.5.7.1

* Add ahrs pitch to PHID logging to check

* Add setter for weathervane gain

* Change weathervaning gain basis pitch.

* Change variable names for wvane gain setting

* Remove wvane autochange lua script from firmware

* Fix tailsitter fw transition timeout issue by resampling initial pitch

* Change wvane gain upper pitch limit to 91

* Rename version to 4.5.7.1 - rc1

* Revert fw transition timeout discontinuity check

* Increase AHRS_PITCH_HI_WVANE_DEG to 95

* Initial pitch discontinuity bug fix, by checking the difference

* Expose wvane gain pitch consts as params

* Add check for pitch error to freeze crt during land descent

* Add break statement for pitch error crt freezing

* Change version to rc7

* Add a third segment for wvane gain/2 basis ahrs pitch wvane mid param

* Change versiont to rc8

* Scale weathervane gain linearly between mid and low ahrs pitch limits

* Change version to rc9

* Remove pitch based crt freezing

* Change version to rc10

* Update parachute lua script default channel and expose servo min max

* Update version to rc11

---------

Co-authored-by: Manuraj P M <manurajp@airbound.co>

* Update version to 4.5.7.1

* Update last_pos2_ms time for non-rtl modes to freeze climb rate (#19)

* Update last_pos2_ms time for non-rtl modes to freeze climb rate

* Move set climb rate 0 for pos2 height control out of tailsitter check

* Ardupilot 4.5.7: Change Synthetic airspeed estimation algorithm from EK3 to DCM (#25)

* Add control surface checks lua script

* Update parachute lua script log

* Add door auto control script

* Update version.h

* Add wvane lo threshold to pix6c defaults param file

* Add all airbound params to defaults.parm with q_tailsit_wv ones as readonly

* Reduce default param list basis recent flights

* Update version.h

* Change EK3 airspeed estimate source from EK3 to DCM
Update version.h

---------

Co-authored-by: Mayank Joneja <mayankj@airbound.co>

* Handle pitch beyond +/- 90 degrees by mapping to 180 degree (#32)

* Modify Pixhawk6C-bdshot default parameter list

- Update version.h to rc4
- Update default params in lua scripts

* Handle gimbal lock singularity specifically for pitch in ahrs view

* Update version to rc5

* Add simple ahrs pitch based check to correct att pitch beyond 90

* Add rot matrix based check for nose down belly up/down

* Swap pitch corrections in ahrs view

---------

Co-authored-by: akshar-airbound <aksharp@airbound.co>

* Update version to 4.5.7.2

* Add attitude logging and fix doors script for extreme pitch (#33)

* Modify Pixhawk6C-bdshot default parameter list

- Update version.h to rc4
- Update default params in lua scripts

* Handle gimbal lock singularity specifically for pitch in ahrs view

* Update version to rc5

* Add simple ahrs pitch based check to correct att pitch beyond 90

* Add rot matrix based check for nose down belly up/down

* Swap pitch corrections in ahrs view

* Add logging for ahrs view compensation

* Fix logging of pitch before and after compensation

* Add logging for att target axis angle

* Add logging of att body and error quat as axis angle

* Add flags for belly up/down and nose down in logs

* Update version to rc6

* Change version to 4.5.7.3 rc1

* Change mode check for landing phase for doors script

* Check valid landing mission commands

* Add check for vtol land descent from quadplane

* Force doors open under takeoff alt_trig_m and don't check for transitions during takeoff

* Add a landing latch flag to only trigger doors basis modes

* Initialize servo pwm open close based on specific defaults

* Update version to 4.5.7.2 hf1

* Update version to v4.5.7.2 - hf1

* Fix vtol flight check logic basis latch

* Add global override param for doors auto logic

* Fix num params for door script

* Fix docstring for ATPC logging

---------

Co-authored-by: akshar-airbound <aksharp@airbound.co>

---------

Co-authored-by: Manuraj P M <manurajp@airbound.co>
Co-authored-by: akshar-airbound <aksharp@airbound.co>

* Update airbound-stable to 4.5.7.4-hf3 (#97)

* Add 4.5.7.4 hf1 with PWM to RPM conversion factor as a parameter. (#79)

* Expose the PWM to RPM conversion factor as a parameter

* Update the version to V4.5.7.4 -hf1

* default.param:Update the parameter

---------

Co-authored-by: Manuraj P M <manurajp@airbound.co>

* Update autobailout and autoparadeploy parameters to ensure effective bailout and paradeploy behaviour (#81)

* autobailout.lua: Changed default parameter values of AUTOB_PIT_TOUT, AUTOB_PARA_ANG, AUTOB_PARA_TOUT
AUTOB_PIT_TOUT = 500 -> 200
AUTOB_PARA_ANG = -45 -> -15
AUTOB_PARA_TOUT = 200 -> 100

* Changed version name: V4.5.7.4 -hf1 + autob parm chg

* autobailout.lua: modified valid AUTOB_PARA_ANG thresholds from (-50,-40) to (-50,-10)

* autobailout.lua: Fix gcs message

---------

Co-authored-by: akshar-airbound <aksharp@airbound.com>

* Change version.h to 4.5.7.4 hf1

* Fix weathervane control slope based scale calculation error when control effort is between Q_TAILSIT_CE_LO and Q_TAILSIT_CE_HI (#82)

* Fix weathervane control slope based scale calculation error when control effort is between Q_TAILSIT_CE_LO and Q_TAILSIT_CE_HI

* Pixhawk6C-bdshot/scripts: Add vibration monitoring script and rename autobailout script filename

---------

Co-authored-by: akshar-airbound <aksharp@airbound.com>

* Update version to 4.5.7.4 hf2

* Rename ab_autobailout.lua back to autobailout.lua for hf3 (#84)

* Update version.h to 4.5.7.4 hf3

---------

Co-authored-by: Manuraj-PM <91936659+Manuraj-PM@users.noreply.github.com>
Co-authored-by: Manuraj P M <manurajp@airbound.co>
Co-authored-by: akshar-airbound <aksharp@airbound.com>
Co-authored-by: Mayank Joneja <mayankj@airbound.co>

* Remove redundant control surface check script (#98)

Co-authored-by: akshar-airbound <aksharp@airbound.com>

* Add thrust vectoring desaturation and halved PID gain parameters (#99)

* Fix weathervane control slope based scale calculation error when control effort is between Q_TAILSIT_CE_LO and Q_TAILSIT_CE_HI (#82)

* Fix weathervane control slope based scale calculation error when control effort is between Q_TAILSIT_CE_LO and Q_TAILSIT_CE_HI

* Pixhawk6C-bdshot/scripts: Add vibration monitoring script and rename autobailout script filename

---------

Co-authored-by: akshar-airbound <aksharp@airbound.com>

* Rename ab_autobailout.lua back to autobailout.lua for hf3 (#84)

* Update the version to V4.5.7.4 -hf1

* /AP_MotorsTailsitter.cpp:Update the desaturation logic

* Update the version to Airbound ArduPlane V4.5.7.5 -rc1 - Controller desaturation

* Update version to V4.5.7.4 -hf4 - Controller desaturation

* Reset yaw I term when disabling yaw control

* Update the angle p gains of roll and yaw axes

* Update the version to Airbound ArduPlane V4.5.7.4 -hf4 - Controller desat+ Half gain

* Update the fixed wing parameters

---------

Co-authored-by: akshar-airbound <aksharp@airbound.com>
Co-authored-by: Mayank Joneja <mayankj@airbound.co>
Co-authored-by: Manuraj P M <manurajp@airbound.co>

* Add function to check tailsitter backtransition in quadplane class
Add lua bindings exposing above function for lua scripting

* autobailout.lua:Removed debug gcs strings

* Changed version to 4.5.7.4-hf3 + new autobailout
changed default value of parameter AUTOB_BTRN_DLY to 2500

* autobailout.lua: remove unused variables

* quadplane.cpp: add time argument to vtol transition function

* autobailout.lua: increase loop rate from 10 to 20 Hz
defaults.parm: Change param name TECS_SPD_WEIGHT to TECS_SPDWEIGHT

* Changed version name

* autobailoout.lua:Renamed variable

* Remove hardcoded yaw controller disabling when thrust angle exceeds 60deg

* introduced parameter LND_DET_TIM that controls how many milliseconds before disarm is detected

* add disarm watchdog and disable weathervane after touchdown

* Weathervane disable logic changed

* fixed a bug

* Reduce weathervane gain during pos1 pos2 repositioning

* Change version name to Airbound V4.5.7.5 - stabfixB

* Change parameter value TECS_SYNAIRSPEED 0 -> 1

* Revert yaw rate controller disabling based on thrust error angle threshold

* Changed Q_LAND_ALTCHG: 1.5 and Q_LND_DET_TIM: 200

---------

Co-authored-by: Mayank Joneja <mayankj@airbound.co>
Co-authored-by: Manuraj P M <manurajp@airbound.co>
Co-authored-by: Manuraj-PM <91936659+Manuraj-PM@users.noreply.github.com>
Co-authored-by: akshar-airbound <aksharp@airbound.com>
Co-authored-by: Stefard100 <airbound@LAPTOP-OVE24MET.localdomain>
Co-authored-by: vigneshm <vigneshm@airbound.co>
* Add configuration options for the embedded parameter struct

* Modify the GPS auto switching script for more robust checks
- Use the vertical accuracy along with the satellite count for switching between GPS instances
- Use separate minimum and maximum thresholds for switching as a form of hysteresis
- Check for VTOL/landing mission commands in Auto mode
- Set the run interval to 1 second

* Add check to make sure both GPS instances exist
- Check for the existance of both GPS instances before running the GPS instance switching logic

* Remove unnecesary guard from the numsats assignment
Replace mentions of hacc in the comments

* Fix auto disarm parameters and disable autodisarm monitor after motor disarm

* Add code to restore desired pitch to 0 when actual pitch exceeds Q_A_RELX_HI

* In Copter Attitude controller
Change yaw control disable thrust angle error limit from 60 to 90
Change linear scale yaw control thrust angle error limit from (45, 60) to (60, 90)

* Change version to 4.5.7.5 - rc2-fixes

---------

Co-authored-by: Atharva Sawant <atharvas@airbound.com>
Co-authored-by: akshar-airbound <aksharp@airbound.com>
@vigneshm-debug vigneshm-debug self-assigned this Jun 18, 2026
@greptile-apps

greptile-apps Bot commented Jun 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR backports several ArduPlane 4.5.7.5 features onto the 4.6.3 base: a configurable land-detection timeout with a disarm watchdog, a redesigned pitch-relaxation controller with hysteresis, yaw-priority clamping in the tailsitter motor mixer, autobailout logic reworked around back-transition timing, and GPS switching improvements with dual sat/vacc hysteresis thresholds.

  • AC_AttitudeControl: the old roll+pitch setpoint relaxation is replaced with a pitch-only LPF+hysteresis scheme; two new AP_Float params (RELX_LO/RELX_HI) replace RELX_ANG, and the thrust-error yaw reset threshold is widened from 2× to 3× AC_ATTITUDE_THRUST_ERROR_ANGLE.
  • QuadPlane: land_detector() now uses the new Q_LND_DET_TIM parameter (default 200 ms, documented range 1000–4000 ms) instead of the old hardcoded 4000/6000 ms values; a disarm watchdog fires emergency GCS messages if the vehicle stays armed after final-landing detection starts.
  • Lua scripts: autobailout.lua now triggers on back-transition completion rather than landing phase; ab_gps_mode.lua adds asymmetric switch-away/switch-back thresholds and extends VTOL phase detection into Auto mode.

Confidence Score: 3/5

Two behavioural changes need resolution before merge: the static LPF state in the attitude controller carries over across arm cycles, and the land-detector timeout default is 20-30× shorter than the values it replaced.

The attitude controller now stores relaxation state in static locals instead of member variables, so a flight that ends with relaxation active leaves non-zero state that immediately attenuates pitch commands on the next arming. Separately, Q_LND_DET_TIM defaults to 200 ms against a documented floor of 1000 ms and the old hardcoded 4–6 s thresholds, making premature landing completion significantly more likely. Both issues sit on frequently-executed control paths. The remaining changes — GPS hysteresis, yaw-priority clamping, autobailout rework, and hwdef expansion — look correct and self-consistent.

AC_AttitudeControl.cpp (static locals and orphaned RELX_TC param), quadplane.cpp (LND_DET_TIM default and range annotation).

Important Files Changed

Filename Overview
ArduPlane/quadplane.cpp Adds configurable land-detector timeout (LND_DET_TIM, default 200 ms — inconsistent with documented range 1000–4000 ms and 20-30× shorter than old hardcoded values), a disarm watchdog (DARM_WDG_T), weathervane gain override during VTOL position hold, and exposes tailsitter_in_vtol_transition to scripting.
ArduPlane/quadplane.h Adds AP_Float timeout_ms, wdg_timeout_s, and wdg_start_ms to landing_detect struct; moves Log_Write_AttRate to private; adds tailsitter_in_vtol_transition public accessor.
libraries/AC_AttitudeControl/AC_AttitudeControl.cpp Replaces the old roll+pitch attitude relaxation with a pitch-only hysteresis LPF; introduces two static locals that won't reset across arm cycles; reindexes RELX_ANG→RELX_LO/RELX_HI which breaks EEPROM backward compatibility; leaves RELX_TC as an orphaned parameter.
libraries/AC_AttitudeControl/AC_AttitudeControl.h Replaces _max_tilt_relax/_relax_time_constant with _high_tilt_relax/_low_tilt_relax/_tc_tilt_relax; removes _relaxed_roll/pitch member state and _ts_back_transition_done flag; _relax_time_constant is now a dead member.
ArduPlane/tailsitter.cpp Removes the call to set_tailsitter_back_transition_done(true) on VTOL transition complete, consistent with the removal of that flag from the attitude controller.
libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C-bdshot/scripts/autobailout.lua Replaces landing-phase trigger with a proper in_vtol_flight() check using back-transition timing; renames MODE_DLY to BTRN_DLY with a longer default (2500 ms); increases loop rate to 20 Hz; leaves is_vehicle_landing() as dead code.
libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C-bdshot/scripts/ab_gps_mode.lua Adds hysteresis to GPS switching (dual SAT/VACC thresholds), extends VTOL phase detection to Auto mode with loiter nav commands, and fixes the return interval to use milliseconds correctly.
libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C-bdshot/defaults.parm Tunes several flight parameters (pitch limits, roll/yaw P gains halved, RELX_EN enabled by default, LAND_ALTCHG increased 5× to 1.5 m, TRIM_THROTTLE reduced); adds new params Q_LND_DET_TIM and Q_DARM_WDG_T.
libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C-bdshot/hwdef.dat Enables FORCE_APJ_DEFAULT_PARAMETERS and increases AP_PARAM_MAX_EMBEDDED_PARAM to 16384 to embed the expanded defaults.parm in firmware.
libraries/AP_Motors/AP_MotorsTailsitter.cpp Adds yaw priority clamping for tilt servos: constrains yaw thrust to the headroom left after pitch, sets limit.yaw flag when clamped, preventing pitch+yaw from exceeding servo range.
libraries/AP_Scripting/docs/docs.lua Adds Lua binding documentation stub for quadplane:tailsitter_in_vtol_transition().
libraries/AP_Scripting/generator/description/bindings.desc Registers tailsitter_in_vtol_transition as a Lua-accessible singleton method on QuadPlane.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[QPOS_LAND_DESCEND] --> B[check_land_final]
    B -->|land_detector passes ≥200ms + 1000ms| C[QPOS_LAND_FINAL]
    C --> D[check_land_complete]
    D --> E{motors armed?}
    E -->|No| F[return false]
    E -->|Yes| G{lower_limit_start_ms != 0 and wdg_start_ms == 0?}
    G -->|Yes| H[Start DISARM_WDG timer]
    H --> I{elapsed >= wdg_timeout_s?}
    I -->|Yes| J[MAV_SEVERITY_EMERGENCY message + restart timer]
    I -->|No| K[land_detector check]
    G -->|No| K
    K -->|passes| L[QPOS_LAND_COMPLETE]
    K -->|fails| M[return false]
    N[set_armed=true] -->|reset wdg_start_ms=0| D
    subgraph AC_AttitudeControl
        O[attitude_controller_run_quat] --> P{_ts_enabled and _att_relax_enabled and not _ts_in_transition?}
        P -->|Yes| Q[Compute pitch_tilt from attitude_body]
        Q --> R{pitch_tilt > RELX_HI?}
        R -->|Yes| S[_att_relax_active = true]
        R -->|No: pitch_tilt < RELX_LO?| T[_att_relax_active = false]
        S --> U[LPF: relaxation_factor_lpf toward 1]
        T --> V[LPF: relaxation_factor_lpf toward 0]
        U & V --> W[euler_sp.y *= 1 - relaxation_factor_lpf]
        W --> X[thrust_heading_rotation_angles]
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[QPOS_LAND_DESCEND] --> B[check_land_final]
    B -->|land_detector passes ≥200ms + 1000ms| C[QPOS_LAND_FINAL]
    C --> D[check_land_complete]
    D --> E{motors armed?}
    E -->|No| F[return false]
    E -->|Yes| G{lower_limit_start_ms != 0 and wdg_start_ms == 0?}
    G -->|Yes| H[Start DISARM_WDG timer]
    H --> I{elapsed >= wdg_timeout_s?}
    I -->|Yes| J[MAV_SEVERITY_EMERGENCY message + restart timer]
    I -->|No| K[land_detector check]
    G -->|No| K
    K -->|passes| L[QPOS_LAND_COMPLETE]
    K -->|fails| M[return false]
    N[set_armed=true] -->|reset wdg_start_ms=0| D
    subgraph AC_AttitudeControl
        O[attitude_controller_run_quat] --> P{_ts_enabled and _att_relax_enabled and not _ts_in_transition?}
        P -->|Yes| Q[Compute pitch_tilt from attitude_body]
        Q --> R{pitch_tilt > RELX_HI?}
        R -->|Yes| S[_att_relax_active = true]
        R -->|No: pitch_tilt < RELX_LO?| T[_att_relax_active = false]
        S --> U[LPF: relaxation_factor_lpf toward 1]
        T --> V[LPF: relaxation_factor_lpf toward 0]
        U & V --> W[euler_sp.y *= 1 - relaxation_factor_lpf]
        W --> X[thrust_heading_rotation_angles]
    end
Loading

Comments Outside Diff (2)

  1. libraries/AC_AttitudeControl/AC_AttitudeControl.cpp, line 196-280 (link)

    P2 Parameter index reordering breaks EEPROM backward compatibility

    The old RELX_ANG at group index 25 is replaced by RELX_LO at index 25, and the new RELX_HI takes index 26 (previously RELX_EN). On any vehicle upgrading from the prior firmware, the flash/EEPROM key for index 25 carries the old RELX_ANG value (typically 45.0) which will now be loaded into _low_tilt_relax. Worse, the old RELX_EN value stored at index 26 will overwrite _high_tilt_relax, setting the upper hysteresis threshold to 0 or 1 (the old enable flag). With _high_tilt_relax ≈ 0, the relaxation activates at essentially any pitch deviation. This does not affect clean deployments, but field operators must perform a full parameter reset on upgrade.

  2. libraries/AC_AttitudeControl/AC_AttitudeControl.cpp, line 244 (link)

    P2 RELX_TC / _relax_time_constant is an orphaned parameter

    RELX_TC (index 24, field _relax_time_constant) remains in the var_info table and in the header, but is no longer referenced anywhere in attitude_controller_run_quat(). The new time-constant used by the LPF is _tc_tilt_relax (exposed as RELX_TLT_TC). Leaving RELX_TC in the table consumes a parameter slot and will confuse operators — changes to it will have no effect.

Reviews (1): Last reviewed commit: "fix duplicate AP_GROUPINFO indices" | Re-trigger Greptile

Comment on lines +915 to +917
static float relaxation_factor_lpf = 0.0f;
float alpha_relax = _dt / (_dt + _tc_tilt_relax);
static bool _att_relax_active = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Static locals persist across arm/disarm cycles

relaxation_factor_lpf and _att_relax_active are declared static inside a member function called at ~400 Hz. Static locals in C++ are initialized once at program load and never reset. If the vehicle lands with relaxation active (relaxation_factor_lpf > 0), disarms, then re-arms without a full power cycle, the filter state carries over and the attitude controller immediately applies pitch attenuation the moment the motors are armed again. These variables should be member fields of AC_AttitudeControl (initialized in the constructor and optionally reset on arm) so their lifecycle is tied to the object rather than to the process.

Comment thread ArduPlane/quadplane.cpp
Comment on lines 564 to +575
// @User: Advanced
AP_GROUPINFO("LND_FRZ_TIM", 40, QuadPlane, q_land_freeze_time, 7.0f),

// @Param: LND_DET_TIM
// @DisplayName: Qmode Land detection timeout
// @Description: The maximum time allowed for land detection in milliseconds
// @Units: ms
// @Range: 1000 4000
// @Increment: 100
// @User: Standard
AP_GROUPINFO("LND_DET_TIM", 43, QuadPlane, landing_detect.timeout_ms, 200),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 LND_DET_TIM default (200 ms) is outside its documented range and 20-30× shorter than the previous hardcoded timeout

The @Range annotation says 1000–4000 ms, but the default is 200 ms. More critically, the old land_detector() was hardcoded to 4000 ms in check_land_complete() and 6000 ms in check_land_final(); now both use the same parameter that defaults to 200 ms. With a 200 ms timeout the landing condition clears in roughly 1.2 s (200 ms for land_start_ms + 1000 ms for lower_limit_start_ms), down from 5–7 s previously. Combined with the Q_LAND_ALTCHG increase to 1.5 m in defaults.parm, this dramatically lowers the bar for declaring a landing complete, risking premature disarm sequences. The documented range should be corrected to reflect the actual intended operating window, or the default should be raised to something within that range.

Comment on lines 63 to 69
function is_vehicle_landing()
local current_mode = vehicle:get_mode()
if current_mode == MODE_QLAND then
return true
elseif quadplane:in_vtol_land_descent() then
if quadplane:in_vtol_land_descent() then
return true
else
return false
end
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 is_vehicle_landing() is now dead code

The function is defined but no longer called anywhere in the script. The old call site in update() has been replaced by if in_vtol_flight(). The function can be removed to avoid confusion.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants