Files
PX4-Autopilot/test/mavsdk_tests
Balduin 317a681cae fix(airspeed_selector): do not invalidate a sensor on the cycle it is detected (#29214)
* fix(airspeed_selector): do not invalidate a sensor on the cycle it is detected

A sensor that starts publishing after the selector's init (e.g. the SITL
airspeed sim, which waits for a global position) was flagged stale on the
first cycle after detection: its last-update timestamp was still zero, so
the 1 s missing-data timeout fired before a single sample was read. With
ASPD_FS_T_START at its default of -1 the validator never recovers, the
selected source stays DISABLED and preflight reports "Airspeed invalid".

Seed the timestamp when a new sensor index is detected so the timeout
counts from detection. Also silence the DISABLED-to-sensor transition
message, which otherwise reports a spurious "healthy, start using again".

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Balduin <balduin@auterion.com>

* fix(airspeed_selector): only silence reporting when new sensor added

* fix(airspeed_selector): remove newly dead line

 - this time is always set check_for_connected_airspeed_sensors
 - there it depends on:
     - primary index set - otherwise nothing really happens
     - i >= _number_of_airspeed_sensors: always true on init

* test(mavsdk_tests): give the VTOL return with approaches 180 s to disarm

The flight from the end of the approach check to disarm takes about 155 s
of autopilot time, over the 150 s budget. The test only passed because
poll_condition_with_timeout checks elapsed time once per 15 s of autopilot
time and usually landed a check before the budget ran out; when the
lockstep sim ran slightly faster than the speed factor the disarm fell
inside a poll sleep and the test timed out at 158 s.

Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Balduin <balduin@auterion.com>

---------

Signed-off-by: Balduin <balduin@auterion.com>
2026-10-14 13:20:58 +02:00
..