From dad0f0c3c07c06c614474e894f92adebd77e8083 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Tue, 30 Nov 2021 00:24:39 +0000 Subject: [PATCH] AP_Scripting: add binding for AP::fwversion --- libraries/AP_Scripting/docs/docs.lua | 29 +++++++++++++++++++ .../generator/description/bindings.desc | 15 ++++++++++ 2 files changed, 44 insertions(+) diff --git a/libraries/AP_Scripting/docs/docs.lua b/libraries/AP_Scripting/docs/docs.lua index 823735a9be..63bc676b63 100644 --- a/libraries/AP_Scripting/docs/docs.lua +++ b/libraries/AP_Scripting/docs/docs.lua @@ -654,6 +654,35 @@ motors = {} function motors:set_frame_string(param1) end +-- desc +---@class FWVersion +FWVersion = {} + +-- get field +---@return string +function FWVersion:hash() end + +-- get field +---@return integer +function FWVersion:patch() end + +-- get field +---@return integer +function FWVersion:minor() end + +-- get field +---@return integer +function FWVersion:major() end + +-- get field +---@return integer +function FWVersion:type() end + +-- get field +---@return string +function FWVersion:string() end + + -- desc ---@class periph periph = {} diff --git a/libraries/AP_Scripting/generator/description/bindings.desc b/libraries/AP_Scripting/generator/description/bindings.desc index d0d301daf5..335712030a 100644 --- a/libraries/AP_Scripting/generator/description/bindings.desc +++ b/libraries/AP_Scripting/generator/description/bindings.desc @@ -458,3 +458,18 @@ singleton AP::motors() depends APM_BUILD_TYPE(APM_BUILD_ArduPlane)||APM_BUILD_CO singleton AP::motors() literal singleton AP::motors() alias motors singleton AP::motors() method set_frame_string void string + +include AP_Common/AP_FWVersion.h +singleton AP::fwversion() literal +singleton AP::fwversion() reference +singleton AP::fwversion() alias FWVersion +singleton AP::fwversion() field fw_short_string string read +singleton AP::fwversion() field fw_short_string alias string +singleton AP::fwversion() field vehicle_type uint8_t read +singleton AP::fwversion() field vehicle_type alias type +singleton AP::fwversion() field major uint8_t read +singleton AP::fwversion() field minor uint8_t read +singleton AP::fwversion() field patch uint8_t read +singleton AP::fwversion() field fw_hash_str string read +singleton AP::fwversion() field fw_hash_str alias hash +