Author Topic: how to set ADF & TRANPENDER with spad.next?  (Read 2048 times)

ALFADELTA

  • Newbie
  • *
  • Posts: 19
how to set ADF & TRANPENDER with spad.next?
« on: January 27, 2021, 10:45:30 AM »
hi
I start with voiceattack and spad.next I was able to create a profile for the HDG setting the CRS radio com nav altitude but I find difficulties with the transponder and ADF how to set them
example: ADF when I say set ADF to 0352.6 or TRANSPONDER at 1862

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: how to set ADF & TRANPENDER with spad.next?
« Reply #1 on: January 27, 2021, 11:58:58 AM »
The underlying principles should be the same. You'll need to find the LVARs for those features.

What do your other commands look like? Right-click the action list, choose "Copy All as Text" from the context menu, then paste here into a code block (click the # button)

Which part are you having trouble with, specifically?

ALFADELTA

  • Newbie
  • *
  • Posts: 19
Re: how to set ADF & TRANPENDER with spad.next?
« Reply #2 on: January 27, 2021, 12:12:56 PM »
hi Pfiel

for Altitude

Code: [Select]
Set text [alt] to '{CMD}'
Say, 'ALTITUDE {TXTNUM:alt}'
Set decimal [SIMCONNECT!AUTOPILOT ALTITUDE LOCK VAR] value to the converted value of {TXTNUM:alt}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' using context 'SetValue' and wait for return

for radio com

Code: [Select]
Set text [com1] to '{CMD}'
Say, 'SET COM1 {TXTNUM:com1}'
Set decimal [SIMCONNECT!COM STANDBY FREQUENCY!1] value to the converted value of {TXTNUM:com1}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' using context 'SetValue' and wait for return

radio NAV

Code: [Select]
Set text [nav1] to '{CMD}'
Say, 'SET NAV1 {TXTNUM:nav1}'
Set decimal [SIMCONNECT!NAV STANDBY FREQUENCY!1] value to the converted value of {TXTNUM:nav1}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' using context 'SetValue' and wait for return

i can set altitude with when i say altitude [100;200;300;400;500;600;700;800;900;1000;1500;2000;2500;3000;3500;4000;4500;5000;5500;6000;6500;7000;7500;8000;8500;9000;9500;10000;11000;12000;13000;14000;15000;16000;17000;18000;19000;20000;21000;22000;23000;24000;25000;26000;27000;28000;29000;30000;31000;32000;34000;35000;360000]

radio COM with  com 1 [118..136].[0..39,25]

NAV with nav 2 [108..117].[0..39,25]

for transpander & ADF ?

variable for Transpander is :  SIMCONNECT!TRANSPONDER CODE!1
                  ADF is :              SIMCONNECT!ADF ACTIVE FREQUENCY!1

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: how to set ADF & TRANPENDER with spad.next?
« Reply #3 on: January 27, 2021, 12:26:48 PM »
Are those bbcode tags actually in your commands?

E.G. does the action list show
Code: [Select]
Set decimal [[color=red]SIMCONNECT!AUTOPILOT ALTITUDE LOCK VAR[/color]] value to the converted value of {TXTNUM:alt}or
Code: [Select]
Set decimal [SIMCONNECT!AUTOPILOT ALTITUDE LOCK VAR] value to the converted value of {TXTNUM:alt}?


Again, what, specifically, are you having trouble with? The two new commands should be nearly identical to the old ones.


As an aside, you can do away with the text variable entirely and just use the decimal variable for your text-to-speech action by combining the "{TXTNUM:}" and "{CMD}" tokens
E.G.
Code: [Select]
Set decimal [SIMCONNECT!AUTOPILOT ALTITUDE LOCK VAR] value to the converted value of {TXTNUM:"{CMD}"}
Say, 'ALTITUDE {DEC:SIMCONNECT!AUTOPILOT ALTITUDE LOCK VAR}'
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' using context 'SetValue' and wait for return
of course it's up to you. The end result is the same.

ALFADELTA

  • Newbie
  • *
  • Posts: 19
Re: how to set ADF & TRANPENDER with spad.next?
« Reply #4 on: January 27, 2021, 01:02:17 PM »
sorry bbcode tag

Code: [Select]
Set text [alt] to '{CMD}'
Say, 'ALTITUDE {TXTNUM:alt}'
Set decimal [SIMCONNECT!AUTOPILOT ALTITUDE LOCK VAR] value to the converted value of {TXTNUM:alt}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' using context 'SetValue' and wait for return


when i say (set tranpender to 0001) with this code tranponder "is set to 0001"

Code: [Select]
Set text [trs] to '{CMD}'
Say, 'SET TRNPONDER {TXTNUM:trs}'
Set decimal [SIMCONNECT!TRANSPONDER CODE!1] value to the converted value of {TXTNUM:trs}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' using context 'SetValue' and wait for return

I need to create another command for set tranpender to 0002 another command for set tranpender to 0003 another command for set tranpender to 0004 another command for set tranpender to 0005 etc ..............


when i say (set ADF to 0001.1) with this code ADF "is set to 0001.1"

command for set ADF 1234.5 , another command for 1234.6, etc..............

how to simplify




Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: how to set ADF & TRANPENDER with spad.next?
« Reply #5 on: January 27, 2021, 01:39:58 PM »
You don't need separate commands...what are the "When I say" contents for the commands you already have? Are they all separate?


For the transponder, the "When I say" contents could be something like "set transponder to [0..7][0..7][0..7][0..7]"

For ADF, it could be something like "set ADF to [190..1800].[0..9]"


Do note that commands like this generate a lot of command phrase variations. E.G. "set transponder to [0..7][0..7][0..7][0..7]" generates 7778 phrases. If you then add another dynamic section, E.G. "[set transponder to;squawk] [0..7][0..7][0..7][0..7]", the amount of generated phrases doubles to 15556

At a certain point, depending on the complexity of your phrases, VoiceAttack (or the speech recognition engine itself, in the 64bit version) can run out of memory.
The amount of phrase variations that needs to be generated also affects the loading time for that profile.


Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer; search for the "Dynamic command sections" subsection, which explains the syntax.

ALFADELTA

  • Newbie
  • *
  • Posts: 19
Re: how to set ADF & TRANPENDER with spad.next?
« Reply #6 on: January 27, 2021, 01:58:46 PM »
for setting ADF this command works better for me

when i say "set ADF [0..1] [0..9] [0..9] [0..9].[0..9]"

Code: [Select]
Set text [adf] to '{CMD}'
Say, 'SET ADF {TXTNUM:adf}'
Set decimal [SIMCONNECT!ADF ACTIVE FREQUENCY!1] value to the converted value of {TXTNUM:adf}
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin' using context 'SetValue' and wait for return

thank you Pfeil
« Last Edit: January 28, 2021, 12:00:12 PM by ALFADELTA »