Skip to content

Commit

Permalink
fix(soaretx): replace way radio switches identified (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiearzu authored Apr 7, 2024
1 parent cda94ba commit 6899cfd
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
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

0 comments on commit 6899cfd

Please sign in to comment.