DavidBuzz
(David Buzz)
August 28, 2023, 11:46pm
6
You could create a new flight mode in LUA and give it whatever charactistics you want. …
https://ardupilot.org/copter/docs/common-lua-scripts.html
Controlling a plane using LUA [ also has copter tips ]
https://ardupilot.org/plane/docs/common-scripting-aerobatics.html
-- ArduPilot lua scripting documentation in EmmyLua Annotations
-- This file should be auto generated and then manual edited
-- generate with --scripting-docs, eg ./waf copter --scripting-docs
-- see: https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations
-- luacheck: ignore 121 (Setting a read-only global variable)
-- luacheck: ignore 122 (Setting a read-only field of a global variable)
-- luacheck: ignore 212 (Unused argument)
-- luacheck: ignore 241 (Local variable is mutated but never accessed)
-- set and get for field types share function names
---@diagnostic disable: duplicate-set-field
---@diagnostic disable: missing-return
-- manual bindings
---@class uint32_t_ud
local uint32_t_ud = {}
-- create uint32_t_ud with optional value
---@param value? number|integer
This file has been truncated. show original
you should absolutely test/develop this in SITL first. crashing a ‘sitl’ copter costs nothing.
lots of example lua code to copy and reuse bits from… the ‘examples’ folder contains undocumented ‘simpler’ stuff that’s main goal is to use/test/try a specific binding…
the ‘applets’ folder has documented scripts that try to solve a specific problem, and are thus oftem more ‘complete’ …
1 Like