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