Skip to content

Commit

Permalink
[etx] remove capability to replay logs to avoid exceeding "CPU limit"
Browse files Browse the repository at this point in the history
  • Loading branch information
stronnag committed Aug 11, 2023
1 parent d4270b5 commit 8e8d73d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/SCRIPTS/TELEMETRY/iNav.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/SCRIPTS/TELEMETRY/iNav/load_ec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8e8d73d

Please sign in to comment.