mirror of https://github.com/ArduPilot/ardupilot
AP_Scripting: delay getting EFI backend
allow for AP_EFI startup after scripting
This commit is contained in:
parent
cbd528cfaf
commit
a9a7e4f4d2
|
@ -62,11 +62,7 @@ if not driver1 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local efi_backend = efi:get_backend(0)
|
local efi_backend = nil
|
||||||
if not efi_backend then
|
|
||||||
gcs:send_text(0, string.format("EFI_HFE: Failed to find EFI scripting backend"))
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Setup EFI Parameters
|
-- Setup EFI Parameters
|
||||||
assert(param:add_table(PARAM_TABLE_KEY, PARAM_TABLE_PREFIX, 5), 'could not add EFI_HFE param table')
|
assert(param:add_table(PARAM_TABLE_KEY, PARAM_TABLE_PREFIX, 5), 'could not add EFI_HFE param table')
|
||||||
|
@ -270,6 +266,13 @@ local engine1 = engine_control(driver1, 1)
|
||||||
function update()
|
function update()
|
||||||
now_s = get_time_sec()
|
now_s = get_time_sec()
|
||||||
|
|
||||||
|
if not efi_backend then
|
||||||
|
efi_backend = efi:get_backend(0)
|
||||||
|
if not efi_backend then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Parse Driver Messages
|
-- Parse Driver Messages
|
||||||
engine1.update_telemetry()
|
engine1.update_telemetry()
|
||||||
engine1.send_throttle()
|
engine1.send_throttle()
|
||||||
|
|
Loading…
Reference in New Issue