Author Topic: Xplane - Spad*next - VoiceAttack problem with datarefs of type txt  (Read 3625 times)

jannik

  • Newbie
  • *
  • Posts: 5
Hi!

I have been working on an automated Co Pilot in X-plane using the following tools:

X-Plane 12 <-> FlyWithLUA <-> SPAD*Next <-> snVoiceAttack_Plugin.dll <-> VoiceAttack

and in X-PLANE I use the ToLiSS A321.

I have programmed a lot of commands in VoiceAttack, that works very well
as long as I use datarefs of the type INT or FLOAT. So Far So Good!

But I have problems using datarefs of type TEXT and I think I have tried
all that I can think of, in order to make it work. But unfortunately without any good result.

My setup is the following when I look at a specific dataref (example: AirbusFBW/MCDU2cont1g):

1) In the datareftool the specific dataref is displayed as:
   AirbusFBW/MCDU2cont1g

   Type data[25]
      Writable: no
   Found in: ListFile
   Value:  EKCH22R 000  156/  20

2) In the FlyWithLUA script file I have the following lines:

   define_shared_DataRef("AirbusFBW/MCDU2cont1g","Data")
      DataRef( "DEF_Rwy", "AirbusFBW/MCDU2cont1g", "readonly")   

3) In the log.txt file when starting x-plane I get the following msg:

   FlyWithLua Warning: The DataRef "AirbusFBW/MCDU2cont1g" should have an index. I set it to 0.

4) In Spad*NEXT when I select the data definition I get the following displayed:

   XPLANE:AirbusFBW/MCDU2cont1g
   Type:  FLT64
   Unit:  NUMBER
   Epsilon:   0.0001
   Current:   0

5) In VoiceAttack I have defined the following External Function:

   Plugin:   SPAD.neXt VoiceAttack Plugin
   Plugin Context:   GetValue

   Text Variables:   XPLANE!AirbusFBW/MCDU2cont1g

6) When I execute the External Function I get the following in the VoiceAttack log file:

   Command 'GetValue'
   snStatus='ERROR' snMessage='GetValue: no decimal given'

AND THAT IS MY PROBLEM!!

I do hope that anyone can help me to get the text-variable in VoiceAttack
to contain the string, that datareftool displays which is: EKCH22R 000  156/  20

I hope that this topic is placed in the right User Forum. Othervise please give me some info where to put it.

Kind regards in advance for a good hint.
Jannik

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: Xplane - Spad*next - VoiceAttack problem with datarefs of type txt
« Reply #1 on: January 13, 2023, 09:14:56 AM »
The SPAD.neXt website states:
Quote
GetValue

Retrieve a variable Value from SPAD.neXt.
Input:
decimal ''VariableName'' to contain the full variable name from SPAD.neXt (e.g. ''LOCAL!SYSTEM READY''). Given in decimalVariables

I.E. it specifically references decimal variables, not text variables.

Looking at the source code for their plugin, that clearly shows they're specifically and only dealing with decimal variables when using "GetValue".


In other words, their plugin is specifically designed to retrieve numeric values (this is not a limitation of VoiceAttack itself). If you require other types of values, you'd need to contact SPAD.neXt about that.

jannik

  • Newbie
  • *
  • Posts: 5
Re: Xplane - Spad*next - VoiceAttack problem with datarefs of type txt
« Reply #2 on: January 14, 2023, 02:50:34 AM »
Hey Pfeil!

Thank's for the very quick answer. I had a suspicion that it did not work.

As I get experienced in the Spad*Next - VoiceAttack connection module, I must admit it is a very poor solution.

As you say, It only handles numeric values, and I have allready experienced it does NOT handle neither text strings nor numeric values in arrays. If you (or any other for that matter) by any way knows of a product that connects VoiceAttack "directly" to X-Plane please let me know.

Just for making no misunderstanding - i do not blame you, because you have nothing to do with the functionality of the connection module. Instead I want to take the opportunity to express how satisfied I am with the functionality of the VoiceAttack application - it is very well working and also extremely performant.

Kind regards
Jannik