Commit Graph
1422 Commits
Author SHA1 Message Date
Andrew Tridgell c03653fb41 AP_Scripting: add CircuitStatus DroneCAN battery driver
maps uavcan.equipment.power.CircuitStatus circuits onto scripting
battery monitor instances, giving per-circuit voltage and current
monitoring from CAN power distribution nodes
2026-08-20 10:35:46 +10:00
Peter Barker 276c1338fb AP_Scripting: correct '#endif // COMMENT' comments
these should always match the opening #if
2026-08-04 11:59:14 +10:00
Peter BarkerandClaude Fable 5 8a0f0c1e4c AP_Scripting: nest parameter names one level below Parameters headings
Parameter-name headings in the driver and applet markdown docs were at
the same level as the "Parameters" heading they sit under, so they
rendered as siblings rather than being nested within that section.
Demote them one level throughout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 08:16:58 +10:00
Peter Hall 7668c24104 AP_Scripting: add airspeed driver bindings 2026-07-29 20:16:37 +01:00
Peter Barker ff67931891 AP_Scripting: use ahrs:get_wind in examples and applets
ahrs:wind_estimate() is deprecated.  Scripts which already checked the
returned value for nil now get a check which actually means something;
the rest fall back to a zero wind vector, which is what they were
already getting from an invalid estimate in most cases.
2026-07-28 13:48:28 +10:00
Peter Barker cb74bdbe83 AP_Scripting: deprecate ahrs:wind_estimate binding
ahrs:get_wind() should be used instead.  The generator can not attach a
deprecation warning to a manual binding, so the warning is emitted from
the binding itself in the same manner as the generated bindings do it.
2026-07-28 13:48:28 +10:00
Peter Barker 9d9b5c5436 AP_Scripting: add ahrs:get_wind binding
Unlike ahrs:wind_estimate() this returns nil when the vehicle has no
valid wind estimate, rather than handing out a vector which may be zero
or stale.
2026-07-28 13:48:28 +10:00
Peter Barker 630372253a AP_Scripting: add manual binding for ahrs:wind_estimate
The Vector3f-returning AP_AHRS::wind_estimate() method is about to be
removed from the AHRS interface.  Scripting has no way of receiving
both the vector and the validity flag from AP_AHRS::get_wind(), so
provide the old shape as a compatibility binding here rather than
keeping a method in AP_AHRS purely for scripting's benefit.

No change to the Lua API.
2026-07-28 13:48:28 +10:00
Andy Piper 746e90cc18 AP_Scripting: exclude OSD bindings from AP_Periph builds
pre-commit / ci (push) Canceled after 0s
test scripts / build (astyle-cleanliness) (push) Canceled after 0s
test scripts / build (check_autotest_options) (push) Canceled after 0s
test scripts / build (logger_metadata) (push) Canceled after 0s
test scripts / build (param-file-validation) (push) Canceled after 0s
test scripts / build (param_parse) (push) Canceled after 0s
test scripts / build (python-cleanliness) (push) Canceled after 0s
test scripts / build (shellcheck) (push) Canceled after 0s
test scripts / build (validate_board_list) (push) Canceled after 0s
test scripting / test-scripting (push) Canceled after 0s
AP_Periph does not build AP_OSD, but OSD_ENABLED defaults to 1 so the
generated bindings failed to link with undefined references to
AP_OSD::_singleton
2026-07-24 11:22:29 +01:00
Iampete1 2bb996f4b1 AP_Scripting: add OSD example 2026-07-24 11:22:29 +01:00
Andy PiperandIampete1 584007f865 AP_Scripting: add OSD bindings and add semaphore protection for scripting bindings
Co-Authored-By: Iampete1 <iampete@hotmail.co.uk>
2026-07-24 11:22:29 +01:00
Andy PiperandIampete1 af61458600 AP_Scripting: generator: add get keyword for custom pointer string
Co-Authored-By: Iampete1 <iampete@hotmail.co.uk>
2026-07-24 11:22:29 +01:00
Andrew Tridgell b7ba8bca02 AP_Scripting: added actuator (ESC/Servo) chirp tool
used for measuring response bandwidth of a servo or ESC
2026-07-19 10:51:28 +10:00
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