Commit Graph

766 Commits

Author SHA1 Message Date
Andrew Tridgell
3e039eb372 AP_Scripting: fixed float register save/restore in setjmp/longjmp
the register save must happen before the setjmp() call, which means
outside of the LUAI_TRY() macro. We also should be saving all 32
floating point registers
2024-05-29 10:12:32 +10:00
Andy Piper
2750bda430 AP_Scripting: add success status to serialLED:send and serialLED:set_RGB 2023-12-05 20:23:49 +11:00
Randy Mackay
fa6a7abe8a AP_Scripting: simplify Rover quick tune
Only tunes FF.  P and I are set as ratio to FF
2023-12-05 20:23:49 +11:00
Andrew Tridgell
0852044e9e AP_Scripting: added bindings for telemetry data for ESCs
allows more complete ESC protocol implementation in scripting
2023-11-07 11:17:04 +11:00
Andrew Tridgell
5a980e04a8 AP_Scripting: added docs for log_file_content 2023-09-05 20:14:13 +10:00
Andrew Tridgell
47405af84d AP_Scripting: added log_file_content method
this allows for aerobatics to log the schedule for easier log review
2023-09-05 20:14:13 +10:00
Randy Mackay
41a97efcb3 AP_Scripting: add rover quicktune 2023-08-01 17:43:17 +10:00
Randy Mackay
fa817c1d32 AP_Scripting: AR_PosControl bindings 2023-08-01 17:43:17 +10:00
Randy Mackay
35513ba539 AP_Scripting: add AR_AttitudeControl srate binding
also add AP_Vehicle:get_steering_and_throttle binding
2023-08-01 17:43:17 +10:00
bugobliterator
a121f665f1 AP_Scripting: stash and restore FPU register context in LUAI_TRY
this fixes an issue where a lua library function triggers an exception
after it does a math operation which changes the floating point
registers on M7 MCUs (such as STM32H7). An example is math.random()
which calls math_random(), which pre-calculates a double value before
checking if the arguments to the call are valid. When it then checks
and finds invalid values the exception longjmp does not restore the
floating point registers.
2023-07-23 12:46:05 +10:00
Andrew Tridgell
a564af680b AP_Scripting: added bindings for VTOL motor loss
this allows a script to take an action on loss of a VTOL motor
2023-07-23 12:45:26 +10:00
Andrew Tridgell
9090bb17a5 AP_Scripting: updated VTOL quicktune docs 2023-07-04 10:53:57 +10:00
Andrew Tridgell
2aec5ccd7b AP_Scripting: fixed lua-check warnings in VTOL-quicktune 2023-07-04 10:53:57 +10:00
Andrew Tridgell
dc7efab45f AP_Scripting: fixed use of QUIK_ENABLE in VTOL-quicktune
this was lost when the cached access was added
2023-07-04 10:53:57 +10:00
Andrew Tridgell
678b81563d AP_Scripting: added QUIK_MAX_REDUCE parameter to VTOL-quicktune.lua
this limits the amount that rate gains can reduce from the original
values in a quicktune. Large reductions in rate gains can be
incorrectly triggered by a frame resonance or gust of wind which can
result in gains that are dangerously low, which can trigger an angle P
oscillation
2023-07-04 10:53:57 +10:00
Henry Wurzburg
0a96f037f5 AP_Scripting:provide altitude loss safety abort for plane aerobatics 2023-03-20 04:48:57 -07:00
Randy Mackay
e5be8e9bf0 AP_Scripting: copter deadreckoning lua check fixes 2023-03-18 08:55:21 +09:00
Randy Mackay
3d39f9bb20 AP_Scripting: copter deadreckon applet gets param desc and md 2023-03-18 08:55:21 +09:00
Randy Mackay
bf0d096276 AP_Scripting: copter deadreckoning moved to applet directory 2023-03-18 08:55:21 +09:00
Tom Pittenger
10f7a363ed AP_Scripting: bump up SCR HEAP SIZE for large RAM devices 2023-03-14 06:57:21 -07:00
Peter Barker
8e1decc730 AP_Scripting: correct compilation when AP_EFI_Scripting is not enabled 2023-03-14 12:09:26 +11:00
Tom Pittenger
87cb40798f AP_Scripting: add docs to FWVersion:type() 2023-03-10 14:45:58 -08:00
Andrew Tridgell
615838a7d4 AP_Scripting: ensure new user data is zero
this prevents use of uninitialised data for user objects created in
lua, giving more predictable behaviour
2023-03-10 14:13:55 +11:00
Andrew Tridgell
c00e047d87 AP_Scripting: added mission_spiral.lua example
useful for creating very large missions with a distinctive pattern
2023-03-10 14:13:55 +11:00
Bob Long
ddd2d92d39 AP_EFI lua: add enum docs
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
2023-03-07 20:35:13 +09:00
Bob Long
74279d9b32 AP_Scripting: add fuel_pressure_status binding 2023-03-07 20:35:13 +09:00
Peter Hall
9ac488d500 AP_Scripting: add binding to set motors external limits 2023-03-07 10:12:30 +11:00
Peter Hall
23fb73085a AP_Scripting: add bindings to get throttle, forward, lateral and spool state from motors 2023-03-07 10:12:30 +11:00
Andrew Tridgell
bc3fc9a317 AP_Scripting: added bindings for motors roll, pitch, yaw outputs 2023-03-07 10:12:30 +11:00
Iampete1
a021489580 AP_Scripting: lua_bindings: use local varable for AP_Scripting, don't get every time 2023-03-05 09:42:05 +11:00
Iampete1
54a9239e62 AP_Scripting: fix PWMSource deletion crash 2023-03-05 09:42:05 +11:00
Tom Pittenger
5498bbec33 Scripting: add bindings for jump tags 2023-02-28 12:00:18 +11:00
Tom Pittenger
1fe4b6b7e3 AP_Scripting: Add example JUMP_TAG scripts 2023-02-28 12:00:18 +11:00
Andrew Tridgell
068d1d5413 AP_Scripting: change VTOL-quicktune to use cached aux
makes it possible to use aux buttons in MissionPlanner
2023-02-24 09:43:41 -08:00
Tom Pittenger
54e56beba8 AP_Scripting: fix doc warnings 2023-02-23 13:07:08 -08:00
Iampete1
f7a14a58fd AP_Scripting: luacheck: check globals 2023-02-22 19:36:02 +11:00
Randy Mackay
5fc322b327 AP_Scripting: add djirs2 driver parameter descriptions 2023-02-22 18:08:27 +11:00
Randy Mackay
c80c4adf3e AP_Scripting: djirs2 driver supports upsidedown setup 2023-02-22 18:08:27 +11:00
Randy Mackay
4918bb4705 AP_Scripting: djirs2 driver minor comment fix 2023-02-22 18:08:27 +11:00
Stephen Dade
0b048b4b42 AP_Scripting: Add Mavlink example 2023-02-21 22:32:32 +11:00
Stephen Dade
d4bb4e4526 AP_Scripting: Add lua scripts for Rockblock modem 2023-02-21 22:32:32 +11:00
Stephen Dade
0d8fedd2d5 AP_Scripting: Add bindings for throttle and frame type 2023-02-21 22:32:32 +11:00
Stephen Dade
a3cdfd0e3c AP_Scripting: Add high latency MAVLink control 2023-02-21 22:32:32 +11:00
rishabsingh3003
0f827653c4 AP_Scripting: Add lua driver for Benewake H30 2023-02-21 16:47:56 +11:00
rishabsingh3003
c86d2641f1 AP_Scripting: Add support for lua scripting based RangeFinder 2023-02-21 16:47:56 +11:00
Randy Mackay
0797cdf6fe AP_Scripting: viewpro mount driver 2023-02-16 16:49:51 +09:00
Randy Mackay
a84cf91dd0 AP_Scripting: add get_camera_state binding 2023-02-16 16:49:51 +09:00
Iampete1
dcd55155af AP_Scripting: fix uint32 bitwise not 2023-02-15 19:39:21 +11:00
Iampete1
11f6b5c3ea AP_Scripting: docs: ignore luacheck warnings 2023-02-15 19:38:46 +11:00
Iampete1
02e9bf6ff5 AP_Scripting: drivers: ignore luacheck warnings 2023-02-15 19:38:46 +11:00