The rangefinder_quality_test.lua example (driving the Sub RngfndQuality
autotest) pushes a distance/quality/status through the scripting range
finder driver interface, waits UPDATE_PERIOD_MS, then reads it back
through the client interface and checks it matches. The value is copied
from the driver state to the client-facing state by a periodic task on
the main loop, which is a different thread to the scripting VM. Under
host load (e.g. parallel autotest) or high SIM_SPEEDUP that copy can land
after the read, so the client still reports the previous test's value and
the script emits a spurious failure -- reproduced at --speedup=40, where
the 28m test read back 27m and reported "#complete#: !!failure!!".
Retry the read up to MAX_EVAL_RETRIES times (UPDATE_PERIOD_MS apart)
before declaring a mismatch, so a slow cross-thread copy is waited out
while a genuine mismatch still fails once the retries are exhausted.
With this RngfndQuality passes 20/20 at --speedup=40 and 100 (was ~1 in 6
failing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Checking libraries/AP_Scripting/modules/mavlink_attitude.lua 2 warnings
libraries/AP_Scripting/modules/mavlink_attitude.lua:37:43: used variable _max_lag_ms with unused hint
libraries/AP_Scripting/modules/mavlink_attitude.lua:37:56: used variable _convergence_loops with unused hint
this allows a script which converts ArduPilot targets into a wire protocol to send to a gimbal to tell ArduPilot what sorts of targets the script/gimbal can understand.
For example, if the gimbal being controlled can understand a lat/lng/alt, the script can tell ArduPilot that with the new method call.
Update get_safe_alt_min and get_safe_alt_max bindings to also return
the altitude frame as a second return value. Existing callers are not
broken as Lua silently discards extra return values.
most markdown parsers will get this not-really-markup thing correct, but it can lead to inconsistencies.
Also fixes a few places where spaces had been introduced to avoid the underscores being considered markup!
Fix MD034/no-bare-urls lint errors by converting bare URLs to proper
markdown link syntax [text](url). Link text is derived from the URL:
- GitHub repos use the repository name
- ArduPilot ecosystem URLs use descriptive names
- Vendor/product URLs use the vendor name
- Documentation sites include "documentation" suffix
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>