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.
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
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.
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.
docs for set_target_velocity_NED()
add set_target_angle_and_rate_and_throttle() for precise vehicle control
manual binding for set_target_velocity_NED() to allow optional boolean
update docs for attitude control
The `luaL_testudata` and `luaL_checkudata` functions correctly treat the
absence of a metatable for the type to check as the type not matching,
so there is no need to have the type's metatable in memory until an
object using it exists. Therefore we can defer the metatable's creation
until the first time an object of that type is created.
Saves some 4500 bytes of Lua heap RAM, at least if no such objects are
created. The created metatables are shared between all scripts, so there
is no increase in the total RAM usage if all objects are used. However,
there is some increased risk of heap fragmentation and unexpected
out-of-memory errors on rarely used code paths.
It would be nice to construct the object in the new utility function,
but it's not possible in C++ to take the address of a constructor.
Instead passing in a lambda is ugly, hardly any more efficient, and
screws up constructors which take parameters.
Also optimizes by using the generated userdata creators where possible,
and convincing the compiler to omit unnecessary checks.
The `luaL_testudata` and `luaL_checkudata` functions correctly treat the
absence of a metatable for the type to check as the type not matching,
so there is no need to have the type's metatable in memory until an
object using it exists. Therefore we can defer the metatable's creation
until the first time an object of that type is created.
Saves some 1500 bytes of Lua heap RAM, at least if no such objects are
created. The created metatables are shared between all scripts, so there
is no increase in the total RAM usage if all objects are used. However,
there is some increased risk of heap fragmentation and unexpected
out-of-memory errors on rarely used code paths.
Despite the implications of the example and the
`MAVLINK_COMM_NUM_BUFFERS` limit in the description, the actual first
argument to this function is the serial port number.
Correct the argument range to allow any possible port number (no need to
limit as the list is sparse) and enhance the example to give more port
numbers.