AP_Scripting: added lua binding get_last_update for efi and esc

This commit is contained in:
Loki077 2024-08-15 15:34:09 +10:00 committed by Peter Barker
parent 94059ed7bc
commit 46c98d6c95
2 changed files with 11 additions and 0 deletions

View File

@ -392,6 +392,10 @@ efi = {}
---@return EFI_State_ud
function efi:get_state() end
-- get last update time in milliseconds
---@return uint32_t_ud
function efi:get_last_update_ms() end
-- desc
---@param instance integer
---@return AP_EFI_Backend_ud|nil
@ -2073,6 +2077,11 @@ function esc_telem:update_rpm(esc_index, rpm, error_rate) end
---@param scale_factor number -- factor
function esc_telem:set_rpm_scale(esc_index, scale_factor) end
-- get the timestamp of last telemetry data for an ESC
---@param esc_index integer
---@return uint32_t_ud
function esc_telem:get_last_telem_data_ms(esc_index) end
-- desc
optical_flow = {}

View File

@ -450,6 +450,7 @@ singleton AP_ESC_Telem method get_usage_seconds boolean uint8_t 0 NUM_SERVO_CHAN
singleton AP_ESC_Telem method update_rpm void uint8_t 0 NUM_SERVO_CHANNELS uint16_t'skip_check float'skip_check
singleton AP_ESC_Telem method update_telem_data void uint8_t 0 NUM_SERVO_CHANNELS AP_ESC_Telem_Backend::TelemetryData uint16_t'skip_check
singleton AP_ESC_Telem method set_rpm_scale void uint8_t 0 NUM_SERVO_CHANNELS float'skip_check
singleton AP_ESC_Telem method get_last_telem_data_ms uint32_t uint8_t 0 ESC_TELEM_MAX_ESCS
include AP_Param/AP_Param.h
singleton AP_Param rename param
@ -851,6 +852,7 @@ singleton AP_EFI depends (AP_EFI_SCRIPTING_ENABLED == 1)
singleton AP_EFI rename efi
singleton AP_EFI method get_backend AP_EFI_Backend uint8_t'skip_check
singleton AP_EFI method get_state void EFI_State'Ref
singleton AP_EFI method get_last_update_ms uint32_t
-- ----END EFI Library----