Commit Graph

319 Commits

Author SHA1 Message Date
Andrew Tridgell 9503744e6a AP_Scripting: added get_att_error_angle_deg binding for AC_AttitudeControl 2024-12-22 07:09:31 +11:00
Randy Mackay 56cb20ac50 AP_Scripting: add get_vel_target poscontrol binding 2024-12-18 18:28:12 +11:00
Randy Mackay 3325bdd7df AP_Scripting: set-video-stream-info encoding binding and docs 2024-12-05 16:46:48 +09:00
Andrew Tridgell fb3a50096d AP_Scripting: added get_output_pwm_chan 2024-11-28 09:24:03 +11:00
Iampete1 d3ffa2e56a AP_Scripting: add bindings for `AP_Vehicle::custom_mode_state` 2024-11-26 08:44:31 +09:00
Iampete1 8bc5f797da AP_Scripting: add binding for vehicle `register_custom_mode` 2024-11-26 08:44:31 +09:00
Andrew Tridgell 349ebde101 AP_Scripting: added support for FlexDebug message
allows lua to retrieve vendor specific data from CAN nodes
2024-11-05 17:03:23 +09:00
bugobliterator 2cc7277692 AP_Scripting: fix build with both GCS and Scripting enabled 2024-10-23 06:46:22 +09:00
Hayden Donald 0ddaae5cb6 AP_Scripting: Add mcu_voltage
Add analog:mcu_voltage() to get a reading of the mcu voltage
2024-10-16 19:04:16 +11:00
Randy Mackay 0c81f111fb AP_Scripting: add set_posvelaccel_offset binding
Co-authored-by: Leonard Hall <leonardthall@gmail.com>
2024-10-04 09:25:56 +09:00
Andrew Tridgell 6a16bce001 AP_Scripting: added bindings for IPv4 address/string
and make socket recv return the source address and port
2024-10-01 10:45:10 +10:00
Nick Exton 2989d623bd AP_Scripting: Add binding for AP_Camera::set_stream_information() 2024-10-01 08:18:54 +09:00
Nick Exton e6ac9c3108 AP_Scripting: Add binding for AP_Camera::set_camera_information() 2024-10-01 08:18:54 +09:00
Iampete1 4894675977 AP_Scripting: add binding for vehicle `set_target_rate_and_throttle` 2024-09-25 08:47:30 +10:00
Peter Barker 83c9b32093 AP_Scripting: add bindings for the AP_TemperatureSensor 2024-09-22 20:34:33 +10:00
bugobliterator 7513281f65 AP_Scripting: add bindings get/set full mode for GPIO
allows setting alternate pin modes pin drive strengths etc.
2024-09-21 10:07:30 +10:00
Andrew Tridgell 53a4b5a843 AP_Scripting: add handle_external_position_estimate binding
can be used for offboard navigation systems
2024-09-12 06:58:57 +10:00
Tatsuya Yamaguchi 29b9157a20 AP_Scripting: use SourceSetSelection enum class 2024-09-08 10:02:29 +10:00
Randy Mackay 79983944c6 AP_Scripting: change_camera_setting binding 2024-09-03 09:04:39 +09:00
timtuxworth 8a93c6a264 AP_Scripting: Bindings for crosstrack in Lua 2024-08-20 09:10:42 +10:00
Loki077 0c29d4280c AP_Scripting: AP_ESC_Telem method update
-Updated AP_ESC_Telem methods to use ESC_TELEM_MAX_ESCS instead of NUM_SERVO_CHANNELS.
- the place where the function returns bool adding skip check.
2024-08-19 21:16:41 +10:00
Loki077 46c98d6c95 AP_Scripting: added lua binding get_last_update for efi and esc 2024-08-19 21:16:41 +10:00
Andrew Tridgell ebad1631d7 AP_Scripting: added arm_force() and baro get_altitude_difference() 2024-08-03 14:29:51 +10:00
Hayden Donald 52ba8e8513 AP_Scripting: Change serial depends HAL_GCS to AP_SERIALMANAGER
Serial bindings were dependant on HAL_GCS_ENABLED but this is not ideal, it should be dependant on AP_SERIALMANAGER_ENABLED so that serial can function without GCS
2024-07-31 08:27:34 +10:00
Ian Burwell 9d34fa2a5e AP_Scripting: Add I2C transfer bindings
This adds bindings for an I2CDevice's transfer() function, an example,
and removes the nil return hint from the get_device() docs as it never
actually returns nil.
2024-07-30 09:40:10 +10:00
Peter Barker e94ebe4d1a AP_Scripting: add battery resistance to bindings 2024-07-22 09:09:26 +10:00
Peter Barker e88d76d72d AP_Scripting: rangefinder singleton requires AP_RANGEFINDER_ENABLED
.... or HAL_PERIPH_ENABLE_RANGEFINDER
2024-07-02 09:17:26 +10:00
Andrew Tridgell 38ca478178 AP_Scripting: added gcs:run_command_int() binding 2024-07-01 20:08:29 +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
Thomas Watson c18f9f733e AP_Scripting: add writestring for serial
Enables more efficient scripting.
2024-06-27 12:00:18 +10:00
Thomas Watson d93aa15f2a AP_Scripting: refactor serial readstring
Using `luaL_Buffer` avoids the need for any heap allocation in the
common case (count <= 512 bytes) and avoids stressing out the system
heap for large reads, instead using the script heap.

Zero net flash usage change.
2024-06-27 12:00:18 +10:00
Thomas Watson e18449b1b8 AP_Scripting: use generic access userdata for serial ports
Adding another layer instead of just exposing UARTDriver bindings allows
substitution of the different functions for device simulation later.

Also take the opportunity to rework the docs a little.
2024-06-27 12:00:18 +10:00
Andrew Tridgell d87404adfa AP_Scripting: added mcu_temperature binding 2024-06-27 10:11:14 +10:00
Iampete1 a322ba4f77 AP_Scripting: add binding for GPS `time_epoch_usec` 2024-06-18 10:37:13 +10:00
Iampete1 1c26c241f1 AP_Scripting: add uint64 userdata 2024-06-18 10:37:13 +10:00
Iampete1 574b9939a5 AP_Scripting: allow auto generation of uint32 operators 2024-06-18 10:37:13 +10:00
Iampete1 cb22a6389d AP_Scripting: add virtual class in docs to avoid need nil check warning 2024-06-07 06:30:22 +10:00
Iampete1 364419be81 AP_Scripting: docs: allow overload of manual bindings to allow documentation of optional arguments 2024-06-04 09:29:49 +10:00
Andrew Tridgell d305cb47f8 AP_Scripting: added GPS yaw binding
useful for seeing if switching to a GPS yaw source set in EK3 will work
2024-05-29 12:56:57 +10:00
Iampete1 713eda617f AP_Scripting: allow new flow control type in `set_flow_control` binding 2024-05-28 09:48:19 +10:00
Iampete1 a4a8923e1e AP_Scripting: generator: add return count to manual bindings 2024-05-07 09:51:53 +10:00
Andrew Tridgell bac99dc7ac AP_Scripting: added bindings for AC_PrecLand 2024-03-06 09:39:51 +11:00
Randy Mackay f2b66fd179 AP_Scripting: add VisualOdom bindings 2024-02-28 18:52:37 +11:00
Peter Barker 53fd9056d8 AP_Scripting: use AP_ARMING_ENABLED and AP_COMPASS_ENABLED
... in place of periph-specific checks
2024-02-27 11:02:48 +11:00
Clyde McQueen b486c1cb46 AP_Scripting: expose sub rangefinder methods 2024-02-21 18:59:20 -03:00
Iampete1 46e4588cf7 AP_Scripting: add file system crc32 binding 2024-02-15 07:36:39 +11:00
Peter Barker 40f0001aea AP_BattMonitor: fix compilation when scripting in but scripted-battery out
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
2024-02-14 23:43:18 +11:00
Peter Barker bb8047c026 AP_Scripting: correct compilation with AP_FILESYSTEM_FORMAT_ENABLED is false
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
2024-02-12 09:38:29 +11:00
Hayden Donald 52409d6765 AP_Scripting: Add gyro/accel consistency checks to lua
Added the accels_consistent and gyros_consistent methods to the lua bindings
2024-02-09 18:54:43 +11:00
Hayden Donald c259d11cd6 AP_Scripting: Add getting of gyro/accel values
Added the ability to get gyro/accel from LUA
2024-02-08 15:24:12 +11:00