Skip to content

Commit 24aaa0d

Browse files
Text updates in Spektrum Fwd Prog LUA script (#630)
* DSM FP, Added AR636B * DSM FP, Added AR637TA * DSM FP, Added On, conflict with AR636B * DSM FP, Rx name conflict resolved.
1 parent da33df4 commit 24aaa0d

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

Lua_scripts/DSM FwdPrg.lua

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ local MENU, LIST_MENU_NOCHANGING, LIST_MENU1, LIST_MENU2, VALUE_NOCHANGING = 0x1
3636
local Phase = RX_VERSION
3737
local Waiting_RX = 0
3838
local Text = {}
39+
local RxName = {}
3940
local Retry=100
4041
local Blink = 0
4142
local Value_Changed=0
@@ -76,6 +77,14 @@ local function Get_Text(index)
7677
return out
7778
end
7879
------------------------------------------------------------------------------------------------------------
80+
local function Get_RxName(index)
81+
out = RxName[index]
82+
if out == nil then -- unknown...
83+
out = "Unknown_"..string.format("%X",index)
84+
end
85+
return out
86+
end
87+
------------------------------------------------------------------------------------------------------------
7988
local function DSM_Release()
8089
multiBuffer( 0, 0 )
8190
Phase = EXIT_DONE
@@ -297,7 +306,7 @@ local function DSM_Send_Receive()
297306

298307
if multiBuffer(11) == 0x01 then -- read version
299308
--ex: 0x09 0x01 0x00 0x15 0x02 0x22 0x01 0x00 0x14 0x00 0x00 0x00 0x00 0x00 0x00 0x00
300-
RX.Name = Get_Text(multiBuffer(13))
309+
RX.Name = Get_RxName(multiBuffer(13))
301310
RX.Version = multiBuffer(14).."."..multiBuffer(15).."."..multiBuffer(16)
302311
Phase = MENU_TITLE
303312

@@ -533,18 +542,22 @@ local function DSM_Init()
533542
multiBuffer( 1, string.byte('S') )
534543
multiBuffer( 2, string.byte('M') )
535544

545+
--RX names--
546+
RxName[0x0001]="AR636B"
547+
RxName[0x0014]="SPM4651T"
548+
RxName[0x0015]="AR637T"
549+
RxName[0x0016]="AR637TA"
550+
RxName[0x0018]="FC6250HX"
551+
RxName[0x001E]="AR631"
552+
536553
--Text to be displayed -> need to use a file instead?
554+
Text[0x0001]="On"
537555
Text[0x0002]="Off"
538556
Text[0x0003]="Inh"
539557
Text[0x0004]="Act"
540558
Text[0x000C]="Inhibit?" --?
541559
Text[0x000D]="Gear"
542560

543-
--RX names--
544-
Text[0x0014]="SPM4651T"
545-
Text[0x0015]="AR637T"
546-
Text[0x0018]="FC6250HX"
547-
Text[0x001E]="AR631"
548561
--Lists--
549562
Text[0x002E]="11ms"
550563
Text[0x002F]="22ms"
@@ -655,6 +668,7 @@ local function DSM_Init()
655668
Text[0x0109]="setup again."
656669
Text[0x0190]="Relearn Servo Settings"
657670
Text[0x019C]="Enter Receiver Bind Mode"
671+
Text[0x01D7]="SAFE Select Channel"
658672
Text[0x01DC]="AS3X"
659673
Text[0x01DD]="AS3X Settings"
660674
Text[0x01DE]="AS3X Gains"
@@ -672,6 +686,7 @@ local function DSM_Init()
672686
Text[0x01F0]="High Thr to Pitch"
673687
Text[0x01F6]="Failsafe Angles"
674688
Text[0x01F8]="Safe Mode"
689+
Text[0x01F9]="SAFE Select"
675690
Text[0x01FD]="SAFE Failsafe FMode"
676691
Text[0x0208]="Decay"
677692
Text[0x0209]="Save to Backup"

0 commit comments

Comments
 (0)