From 8e8d73d09a5eaa54093f299667f4701a5e80a2cd Mon Sep 17 00:00:00 2001 From: Jonathan Hudson Date: Fri, 11 Aug 2023 17:55:20 +0100 Subject: [PATCH] [etx] remove capability to replay logs to avoid exceeding "CPU limit" --- src/SCRIPTS/TELEMETRY/iNav.lua | 11 ++++------- src/SCRIPTS/TELEMETRY/iNav/load_ec.lua | 3 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SCRIPTS/TELEMETRY/iNav.lua b/src/SCRIPTS/TELEMETRY/iNav.lua index c3ddc54..ecaeb88 100644 --- a/src/SCRIPTS/TELEMETRY/iNav.lua +++ b/src/SCRIPTS/TELEMETRY/iNav.lua @@ -34,9 +34,6 @@ collectgarbage() data.etx = osname ~= nil and osname == "EdgeTX" loadScript(FILE_PATH .. "load_" .. (data.etx and "e" or "o") .. ext, env)(config, data, FILE_PATH) -if data.etx and HORUS then - loadScript(FILE_PATH .. "load_ec" .. ext, env)(config, data, FILE_PATH) -end collectgarbage() --[[ Simulator language testing @@ -497,10 +494,10 @@ function inav.run(event) -- Config menu or views if data.configStatus > 0 then if data.v ~= 9 then - view = nil - collectgarbage() - view = loadScript(FILE_PATH .. "menu" .. ext, env)() - data.v = 9 + view = nil + collectgarbage() + view = loadScript(FILE_PATH .. "menu" .. ext, env)() + data.v = 9 end tmp = config[30].v view(data, config, units, lang, event, gpsDegMin, getTelemetryId, getTelemetryUnit, SMLCD, HORUS, text, rect, fill, frmt, env) diff --git a/src/SCRIPTS/TELEMETRY/iNav/load_ec.lua b/src/SCRIPTS/TELEMETRY/iNav/load_ec.lua index 64d7a85..7176fd0 100644 --- a/src/SCRIPTS/TELEMETRY/iNav/load_ec.lua +++ b/src/SCRIPTS/TELEMETRY/iNav/load_ec.lua @@ -10,6 +10,9 @@ local mbase = model.getInfo().name .. "-20" local mblen = string.len(mbase) local tempf = {} local tempi = 0 +config[34].x = -1 +config[34].l = {} + for fname in dir("/LOGS") do if string.find(fname, mbase, 1, true) == 1 then local dstr = string.sub(fname, mblen+1, -5)