Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(SoarETX): Replace the way to identify the radio Switches #143

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdcard/c480x272/WIDGETS/SoarETX/1/f3k_sw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ local function init()
-- Build lists of physical switch position indices and names
local swIndices = { }
local swNames = { }
local MAX_SW = getSwitchIndex(CHAR_TRIM .. "Rl") - 1
for swIdx, swName in switches(-MAX_SW, MAX_SW) do
if swIdx ~= 0 then

for swIdx, swName in switches() do
if string.find(swName,"^!?S[A-H][+-]?") then
i = #swIndices + 1
swIndices[i] = swIdx
swNames[i] = swName
Expand Down
6 changes: 3 additions & 3 deletions sdcard/c480x272/WIDGETS/SoarETX/1/f3kre_sw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ local function init()
-- Build lists of physical switch position indices and names
local swIndices = { }
local swNames = { }
local MAX_SW = getSwitchIndex(CHAR_TRIM .. "Rl") - 1
for swIdx, swName in switches(-MAX_SW, MAX_SW) do
if swIdx ~= 0 then

for swIdx, swName in switches() do
if string.find(swName,"^!?S[A-H][+-]?") then
i = #swIndices + 1
swIndices[i] = swIdx
swNames[i] = swName
Expand Down
11 changes: 6 additions & 5 deletions sdcard/c480x272/WIDGETS/SoarETX/2/switch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
-- SoarETX F3K switch setup, loadable component --
-- --
-- Author: Jesper Frickmann --
-- Date: 2022-02-14 --
-- Version: 1.0.0 --
-- Improvements: Frankie Arzu --
-- Date: 2024-04-7 --
-- Version: 1.2.1 --
-- --
-- Copyright (C) EdgeTX --
-- --
Expand Down Expand Up @@ -133,9 +134,9 @@ local function init()
-- Build lists of physical switch position indices and names
local swIndices = { }
local swNames = { }
local MAX_SW = getSwitchIndex(CHAR_TRIM .. "Rl") - 1
for swIdx, swName in switches(-MAX_SW, MAX_SW) do
if swIdx ~= 0 then

for swIdx, swName in switches() do
if string.find(swName,"^!?S[A-H][+-]?") then
i = #swIndices + 1
swIndices[i] = swIdx
swNames[i] = swName
Expand Down
6 changes: 3 additions & 3 deletions sdcard/c480x320/WIDGETS/SoarETX/1/f3k_sw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ local function init()
-- Build lists of physical switch position indices and names
local swIndices = { }
local swNames = { }
local MAX_SW = getSwitchIndex(CHAR_TRIM .. "Rl") - 1
for swIdx, swName in switches(-MAX_SW, MAX_SW) do
if swIdx ~= 0 then

for swIdx, swName in switches() do
if string.find(swName,"^!?S[A-H][+-]?") then
i = #swIndices + 1
swIndices[i] = swIdx
swNames[i] = swName
Expand Down
6 changes: 3 additions & 3 deletions sdcard/c480x320/WIDGETS/SoarETX/1/f3kre_sw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ local function init()
-- Build lists of physical switch position indices and names
local swIndices = { }
local swNames = { }
local MAX_SW = getSwitchIndex(CHAR_TRIM .. "Rl") - 1
for swIdx, swName in switches(-MAX_SW, MAX_SW) do
if swIdx ~= 0 then

for swIdx, swName in switches() do
if string.find(swName,"^!?S[A-H][+-]?") then
i = #swIndices + 1
swIndices[i] = swIdx
swNames[i] = swName
Expand Down
10 changes: 5 additions & 5 deletions sdcard/c480x320/WIDGETS/SoarETX/2/switch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
-- --
-- Author: Jesper Frickmann --
-- Improvements: Frankie Arzu --
-- Date: 2024-01-15 --
-- Version: 1.2.0 --
-- Date: 2024-04-7 --
-- Version: 1.2.1 --
-- --
-- Copyright (C) EdgeTX --
-- --
Expand Down Expand Up @@ -134,9 +134,9 @@ local function init()
-- Build lists of physical switch position indices and names
local swIndices = { }
local swNames = { }
local MAX_SW = getSwitchIndex(CHAR_TRIM .. "Rl") - 1
for swIdx, swName in switches(-MAX_SW, MAX_SW) do
if swIdx ~= 0 then

for swIdx, swName in switches() do
if string.find(swName,"^!?S[A-H][+-]?") then
i = #swIndices + 1
swIndices[i] = swIdx
swNames[i] = swName
Expand Down