Well, i see that i have difficulties to explain.
I take an example of the airbus series beacuse i am working on creating a cockpit for, but my question is made thinking for all aircraft as the interface project is made to be use to create a cockpit for any aircraft
.
Going to try to more explain.
Speaking more generaly, we have some 3d design that are binded directly to properties and some to Nasal function (that the case for example in the airbus IDG series), when pressing, for example, the transfert key on the radio panel (speaking in the 3d cockpit inside the simulator), as showned in the first post, that action call "tranfert" Nasal function that will switch between active and standby frequency .
I have reproduce (in real world) the radio panel and connected it to FG simulator with Generic Protocol.
Power switch, VHx selector are simple to manage, because as like in the 3d cockpit the action directly act on a property.
For example, setting the radio power switch in the 3d cockpit to On act the property "/control/radio/rmp[0]/on", so it's easy for me to reproduce, i just have to send the right value throught the generic protocol
Or selecting the VHF transmitter is done by setting the "/systems/radio/rmp[0]/sel_chan"
Here is my Input XML file [ without the Transfert Key management ]
- Code: Select all
<?xml version="1.0"?>
<PropertyList>
<generic>
<input>
<binary_mode>false</binary_mode>
<line_separator>newline</line_separator>
<var_separator>:</var_separator>
<chunk>
<name>On Off RMP Switch</name>
<node>/controls/radio/rmp[0]/on</node>
<type>integer</type>
</chunk>
<chunk>
<name>Channel Selection</name>
<node>/systems/radio/rmp[0]/sel_chan</node>
<type>string</type>
</chunk>
</input>
</generic>
</PropertyList>
so to act on this system, i just have to send 1 or 0 [integer] for the power switch and vhf1, vhf2 or vhf3 [string] for the channel.
Now, regarding to the transfert key [ and generally all action calling Nasal code instead acting directly on properties ], my is question is to underderstand if:
1°) i havve to add a property on the tree with an add on xml file, for example "/fgint/freqsw", and send to this property 1 when the "real key" is pressed, linked to a "setlistener" function on this property that will call the nasal function "transfer" when the "/fgint/freqsw" is set to 1
OR
2°) code direcly in python the transfert function and act throught the generic protocol on properties that are normaly managed by the original nasal "transfer" function [ and so in this cas, bypass each time the nasal function ], meaning sending, in this case, direct value to "/instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", and "/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"
So my question is , i think in the general range, to definie if it's better and more efficient to use already existing Nasal code, but this mean that i will need to add some properties to use them and a listener to execute Nasal code associate with them [ i.e i don't find other way to call nasal function from outisde the simulator ] or act directly to properties [ but that mean that each aircraft could need a specific interface coding ]
PS : Where can i find what happen when pressing the switch freq key on the FG radio panel (F12)
Hopping this will explain what i am doing and why i am asking myself about this.
The 2 methods can be easly setup , i need help to understand what will be more accurate and efficient.
Thanks for your patience
Regards
Daweed