Commit Graph

46 Commits

Author SHA1 Message Date
Andrew Tridgell a5ff7f83d1 AP_Scripting: added ability to expand heap at runtime if armed 2024-11-20 07:32:03 +11:00
Andrew Tridgell 66752996e4 AP_Scripting: cleanup debug option handling 2024-11-20 07:32:03 +11:00
Peter Barker 3194fa1385 AP_Scripting: correct compilation when AP_SCRIPTING_SERIALDEVICE_ENABLED false 2024-08-13 10:43:29 +10:00
Thomas Watson 3a834e83c7 AP_Scripting: reference script environment directly
Referencing the original function to run is of questionable value and
the only user uses it to grab the script environent from the upvalues.

Instead, use a reference to the script environment table directly.
2024-07-30 10:33:56 +10:00
Thomas Watson a077e4a3ed AP_Scripting: introduce serial device simulation support
Allows a script to simulate a device attached via any serial protocol.
The script can read and write data and have it handled according to the
protocol as if exchanged over a serial port. The script can then do
protocol translation, data filtering and validation,
hardware-in-the-loop simulation, experimentation, etc., especially in
combination with the scripting protocol which lets the script itself
handle an attached device and so interpose any communication.
2024-06-27 12:00:18 +10:00
Iampete1 f5e7bfcc48 AP_Scripting: remove support for REPL 2024-05-28 10:10:14 +10:00
Andrew Tridgell efac52136b AP_Scripting: fixed memory leak in sendfile()
this leaked the SocketAPM on each sendfile() call, we now rely on the
script calling close(). The net_webserver.lua is already using close()
correctly, this change just makes close able to find the socket
2024-01-08 13:01:02 +11:00
Andrew Tridgell 61b3ad326d AP_Scripting: added SCR_THD_PRIORITY parameter
this makes it possible to run lua scripts at higher priorities, which
makes real time lua scripts (such as IMU drivers) possible
2023-12-15 10:38:07 +11:00
Andrew Tridgell 9065baa329 AP_Scripting: added bindings for SocketAPM 2023-12-11 18:00:38 +11:00
Iampete1 2a3a5b2804 AP_Scripting: add checksum of running and loaded scripts with arming check 2023-12-05 11:03:58 +11:00
Iampete1 105801c5b0 AP_Scripting: add support for dependencty on manual methods, remove handling of mission commands without AP_Mission 2023-10-17 10:23:20 +11:00
Iampete1 fc68bf8979 AP_Scripting: don't include CAN support on periph if there is only one CAN port 2023-10-17 10:23:20 +11:00
Iampete1 7bbd4a7c7d AP_Scripting: add some missing dependencies 2023-09-26 11:29:42 +10:00
Iampete1 1c5f3c708a AP_Scripting: add new mavlink binding to block commands 2023-07-04 10:20:42 +10:00
bugobliterator 06b5400d0b AP_Scripting: use get_uint32 instead of luaL_checkinteger 2023-05-24 19:03:28 +10:00
bugobliterator d056a33dca AP_Scripting: use _chan to mark the methods that are mavlink channel based 2023-05-24 19:03:28 +10:00
bugobliterator 076d00fd1e AP_Scripting: add mavlink support to scripting 2023-05-24 19:03:28 +10:00
Michael du Breuil 598919d8ad AP_Scripting: Support sending MAVLink buffers from scripts 2023-05-24 19:03:28 +10:00
bugobliterator 306b14d8dc AP_Scripting: add require with sandbox inheritence 2023-04-28 12:36:08 +10:00
Iampete1 54a9239e62 AP_Scripting: fix PWMSource deletion crash 2023-03-05 09:42:05 +11:00
Henry Wurzburg 8de4195ffc AP_Scripting: add readme.md file and completion 2023-01-04 16:20:12 +11:00
Andrew Tridgell ea89f04a56 AP_Scripting: script switching system
Co-authored-by:Henry Wurzburg (hwurzburg@yahoo.com)
2023-01-04 16:20:12 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
Iampete1 e2c29b09ab AP_Scripting: add arming check for failed scripts 2022-08-31 17:04:24 +10:00
Andrew Tridgell d8b98789e6 AP_Scripting: add support for scripting2 protocol 2022-07-03 08:21:55 +10:00
Peter Barker 465f56254a AP_Scripting: include cleanups 2022-03-01 11:21:33 +11:00
Andrew Tridgell 140adc126a AP_Scripting: expand to 6 SCR_USER parameters 2021-12-07 10:33:13 +11:00
Iampete1 817864ce74 AP_Scripting: convert DEBUG_LVL to DEBUG_OPTS bitmask 2021-11-17 19:16:46 +11:00
Peter Barker f4651f0287 AP_Scripting: move from ENABLE_SCRIPTING to AP_SCRIPTING_ENABLED 2021-11-15 20:27:40 +11:00
Peter Barker 6b4de23630 AP_Scripting: ensure ENABLE_SCRIPTING is always defined 2021-11-15 20:27:40 +11:00
Iampete1 b047ea5c02 AP_Scripting: stop and restart scripting via command int 2021-11-02 17:33:34 +11:00
Iampete1 44276be3a1 AP_Scripting: add CANSensor and manaul bindings to load. 2021-07-27 09:04:17 +10:00
Iampete1 0b8cdaf392 AP_Scripting: add mission command receve function, binding and example 2021-03-31 19:23:13 +11:00
Iampete1 58860205ea AP_Scripting: add manual i2c get device bindings 2021-03-17 18:50:05 +11:00
Iampete1 97b44dfe71 AP_Scripting: add DIR_DISABLE param 2020-10-28 19:22:45 +11:00
Henry Wurzburg 8bfda973db AP_Scripting: Add user accessable script parameters 2020-07-19 14:18:39 +10:00
Michael du Breuil cf06beb1e6 AP_Scripting: Add support for REPL over MAVLink 2020-02-18 17:23:22 -07:00
Randy Mackay c78112564c AP_Scripting: init sends failure message 2019-12-03 12:48:32 +08:00
Randy Mackay 09d75cff3b AP_Scripting: add init failure check 2019-12-03 12:48:32 +08:00
Michael du Breuil cf94a02207 AP_Scripting: Stop running scripts if the enable flag ever goes false 2019-10-15 15:35:12 -06:00
Michael du Breuil d7e71f85b8 AP_Scripting: Add a debug level param 2019-04-11 23:03:20 -07:00
Michael du Breuil c191789651 AP_Scripting: Use dedicated heap 2018-12-31 19:25:23 -07:00
Michael du Breuil 19a8c5a6ed AP_Scripting: Run multiple scripts at once 2018-11-14 01:41:35 +00:00
Michael du Breuil b0a84ab7cf AP_Scripting: Enforce a time limit for a script 2018-11-14 01:41:35 +00:00
Michael du Breuil 8049c64a5b AP_Scripting: Create a thread and spin 2018-10-09 10:08:52 +11:00
Michael du Breuil f2a31866aa AP_Scripting: Initial scripting framework 2018-10-09 10:08:52 +11:00