Commit Graph
1409 Commits
Author SHA1 Message Date
Peter BarkerandClaude Opus 4.8 5810830961 AP_Scripting: retry stale reads in rangefinder_quality_test
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>
2026-07-07 09:59:00 +10:00
Yuri Rage 4eabe72949 AP_Scripting: add is_crashed binding and applet 2026-07-07 08:33:58 +09:00
Iampete1 419538c761 AP_Scripting: applets: revert_param: add new fixedwing params to revert list 2026-07-07 00:29:57 +01:00
Randy Mackay 628db8cef0 AP_Scripting: failsafe detector example script 2026-07-03 17:23:55 -04:00
Marek S. Łukasiewicz 808b0d4f26 AP_Scripting: fix typo in parameter name in EFI driver docs 2026-07-03 16:24:36 +01:00
Pierre Kancir 9f5c45853e Tools: add LoggedNamedValueInt test 2026-06-27 08:07:35 +10:00
Ben ButterworthandPierre Kancir 81f23dbd75 AP_Scripting: add send_named_int function
Co-authored-by: Pierre Kancir <pierre.kancir.emn@gmail.com>
2026-06-27 08:07:35 +10:00
Andrew Tridgell 48644320dc AP_Scripting: revert_param: cover MOT_THST_EXPO and Q_M_THST_EXPO
pre-commit / ci (push) Has been cancelled
test scripts / build (astyle-cleanliness) (push) Has been cancelled
test scripts / build (check_autotest_options) (push) Has been cancelled
test scripts / build (logger_metadata) (push) Has been cancelled
test scripts / build (param-file-validation) (push) Has been cancelled
test scripts / build (param_parse) (push) Has been cancelled
test scripts / build (python-cleanliness) (push) Has been cancelled
test scripts / build (shellcheck) (push) Has been cancelled
test scripts / build (validate_board_list) (push) Has been cancelled
test scripting / test-scripting (push) Has been cancelled
This is useful when adjusting expo, allowing quick revert if becomes unstable
2026-06-21 16:42:23 +10:00
Pierre Kancir f9f4726ca4 AP_Scripting: update how generate docs 2026-06-17 14:36:22 +10:00
George Zogopoulos 7a88dc9835 AP_Scripting: Typo fix 2026-05-26 22:31:38 +10:00
George Zogopoulos c563caea6d AP_Scripting: EFI_DLA64: Fix temperature unit conversion 2026-05-26 22:31:38 +10:00
Iampete1 6883ccd2be AP_Scripting: add callback time test script 2026-05-19 10:53:31 +10:00
Iampete1 6c38e1b981 AP_Scripting: never try and delay for more than 65535ms 2026-05-19 10:53:31 +10:00
Andrew Tridgell c2e42377ce AP_Scripting: added example sending ADSB_VEHICLE
this is a useful example showing how to display an ADSB icon on the
GCS from lua. It also shows how to send mavlink messages with
string.pack()
2026-04-27 10:19:02 +01:00
Huibean 0deb22662c AP_Scripting: follow-target-send: guard poscontrol nil on non-Copter/Heli vehicles 2026-04-27 10:47:31 +10:00
Huibean ed7e99103d AP_Scripting: LTE modem: fix AP hot reboot can not process previous active connection 2026-04-24 14:30:20 +10:00
Peter Barker 664c3ebd22 AP_Scripting: correct spelling errors in markdown files 2026-04-20 19:25:51 +10:00
Peter Barker ded4eb6c95 AP_Scripting: correct URLs in markdown files 2026-04-20 19:25:51 +10:00
Peter Barker 6dd6c4e1c2 AP_Scripting: examples: copter-circle-speed.lua: parameterise groundspeed 2026-04-19 10:36:57 +10:00
Christian Clauss 3df6c1bc79 AP_Scripting: support Lua 5.2+ in luacheck test 2026-04-13 20:33:22 +01:00
Peter Barker 1d8b63e462 AP_Scripting: correct warning in mavlink_attitude.lua
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
2026-04-13 15:42:42 +01:00
Peter Barker f965d4c7fa AP_Scripting: make mount-driver.lua angles-only
we can have the C++ code make the conversions, so let it
2026-04-07 10:44:42 +10:00
Peter Barker 13ab85a5af AP_Scripting: allow script-defined gimbals to specify target types
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.
2026-04-07 10:44:42 +10:00
Bob Long a9f14a868e AP_Scripting: fill in mount in docs.lua 2026-04-07 10:44:42 +10:00
Iampete1 124ebedfca AP_Scripting: fix language check issues 2026-04-04 09:29:55 +11:00
Randy Mackay 3e40de50b1 AP_Scripting: hobbywing datalink link fix 2026-04-03 15:25:15 +09:00
Bob Long 4bae7f6adf AP_Scripting: add mount-driver example 2026-04-02 15:46:16 +09:00
Tim Tuxworth d887c36143 AP_Scripting: plane_follow.lua fix crosstrack oscillation 2026-03-29 08:40:05 +11:00
Tim Tuxworth ca69d64f4e AP_Scripting: plane_follow.lua fix sendtext error if no target vehicle 2026-03-27 22:47:24 +11:00
Willian Galvani e6b186e12d autotest: add test for AP_Motors6DOF
This test uses a normal, non-6dof frame, and validates that it is able to do a simple mission
2026-03-25 18:32:29 +11:00
Andy Piper f06b568151 AP_Scripting: return alt frame from safe alt fence bindings
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.
2026-03-24 10:44:04 +11:00
Randy Mackay 23ee31d2b5 AP_Scripting: complete rename of param-lockdown applet 2026-03-20 12:46:45 +11:00
Randy Mackay c1094e4834 AP_Scripting: param-set applet renamed to param-lockdown 2026-03-20 12:46:45 +11:00
Tim Tuxworth 237b049f37 AP_Scripting: plane follow fix lowercase value in SIM_TLF_FN parameter 2026-03-20 09:34:08 +11:00
Andrew Tridgell 446ecaedb9 AP_Scripting: RTSP video relay example
shows relaying using TCP interleave between a RTSP camera and a RTSP
server such as mediamtx
2026-03-17 12:24:16 +13:00
Randy Mackay 2da686bb74 AP_Scripting: config_profiles example update for ATC rename 2026-03-04 20:00:01 +09:00
Randy Mackay f9fcf06c61 AP_Scripting: copter-deadreckon-home minor format fix 2026-02-24 14:50:55 +09:00
Randy Mackay c074cfbaf7 AP_Scripting: wall climber example update to use WP params 2026-02-24 14:50:55 +09:00
Randy Mackay 83d9c3abce AP_Scripting: copter-deadreckon update to use WP params 2026-02-24 14:50:55 +09:00
Peter Barker 04cbe9451a AP_Scripting: enclose _ and * not intended as markup in backticks
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!
2026-02-18 23:16:36 +11:00
Peter Barker f0767d24d3 AP_Scripting: remove dollar signs from bash blocks (MD014)
this will make copy/paste easier
2026-02-16 08:16:17 +11:00
Peter Barker faf3d5b2e1 AP_Scripting: fix trailing punctuation in markdown headers (MD026)
makes a lot of these headings consistent with other headings at the same level in these files!
2026-02-14 12:02:51 +11:00
Peter Barker 3849de2569 AP_Scripting: correct us of emphasis in place of headings (MD036) 2026-02-13 11:13:01 +11:00
Peter Barker 5630ed535b AP_Scripting: add type to code blocks
required by the linter, and allows renderers to do syntax highlighting
2026-02-12 19:31:55 +11:00
Peter Barker a402f8a882 AP_Scripting: correct MD001 in all markdown files (incorrect header levels) 2026-02-12 10:18:06 +11:00
Peter Barker b16a064207 AP_Scripting: fix MD041 (single # header at top of file) in all markdown 2026-02-12 10:18:06 +11:00
Iampete1 3b43db2e8d AP_Scripting: applets: plane package place: update Q_LAND_SPEED reference 2026-02-11 18:34:29 +11:00
Iampete1 ce6d78c653 AP_Scripting: Add bindings to allow updating servo telem 2026-02-10 10:21:16 +11:00
Peter BarkerandClaude Opus 4.6 f55940ad7d AP_Scripting: fix MD004 inconsistent unordered list style
Standardize on dash (-) for all unordered list markers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 09:30:32 +11:00
Peter BarkerandClaude Opus 4.5 27be9675db AP_Scripting: convert bare URLs to proper markdown links
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>
2026-02-07 15:38:01 +11:00