#PC-12 msfs Inertial Separator event
1 messages · Page 1 of 1 (latest)
PC-12 msfs Inertial Separator event
Unless someone has the same plane and has already done it, the event needs to be looked up using the developer mode and behaviors tool.
See this how to do it- we can help with this once you can let us know what the code there is
#1139183453494067301 message
I looked into the sim, but unfortunately many events in this airplane are controlled by O: vars.
The Input Events for this function shows empty for some reason
ugh
we need to see about the B-var support
not sure if it would help here
but in general
here is the update code that actually does something, but it is only triggered by changes in the O: var.
So, yeah B: var support or xml hack to bind it to an Lvar.
I suggest looking into the xml hack. It requires inserting some xml code into the airplane cockpit xml definition file.
The basic issue is nobody has access to O: or I: or B: vars from outside the sim. So the technique is to inject xml code that binds the B: event to be triggered from the status of a user defined Lvar.
We have access to all Lvars.
Note the sim function used is the update code is
(>K:ANTI_ICE_GRADUAL_SET_ENG1)
which takes a parameter between 0 and 16383
Just on a hunch I tested this on a button
(>K:ANTI_ICE_TOGGLE_ENG1)
and it seems to work.
Hey Jaime, unfortunatly it doesnt on my system.. I look again..
Only the light of the switch is concerned.. but we progress...
ok, looks like the xml hack cannot be avoided
..trying something..
how do you check that it is only the panel light that is reacting. I see effects on the amps registered when I press the button.
is there a inert sep position indicator?
By using the returned value of the Inert/Sep : "L:XMLVAR_InertSep1_Active", "number" and "L:XMLVAR_InertSep1_Deployment", "number" in AddToDataDefinition of SimConnect
In fact Deployment is done on 40sec (0->1 ) but returns immediatly to 0 when Button is Off
You can use "L:XMLVAR_InterSep", "number" for the Cessna 208B for example
ok, but both deployment and active Lvars are under control of the O: var in the update code.
I know, but at least I recevive the good values.. So what to do ?
This is the legacy plane from Microsoft/Asobo.. Have you an idea to get access ?
I read and applicate your HubHop modification for the Tbm930 and it works fine, congratulations and thank you.. There is no "Pc12Interior.xml"
I don't think there is a default PC12
The only one I know is made by Carenado
The file is called PC12_cockpit.xml
Yes, seen it but I dont know what to do inside except create balises, the code itself is.. difficult to write, because I dont have enough practice of these codes...
Ok, it is 19:58 in France and I do not want to get your time! I 'll come back to morrow if you can help me.. Have a good day (didn't know were you leave ?!) and thank's a lot for sharing.
My time zone is UTC-5
Insert this block of code in PC12_cockpit.xml after line 140
<Component ID="MOBIFLIGHT_ADDON">
<UseTemplate Name="ASOBO_GT_Update">
<FREQUENCY>1</FREQUENCY>
<UPDATE_CODE>
(L:MF_DEICE_Engine_1_Set, Number) d 0 > if{
1 - (>B:DEICE_Engine_1_Set)
0 (>L:MF_DEICE_Engine_1_Set, Number) }
</UPDATE_CODE>
</UseTemplate>
</Component>
Now the button input config in Mobiflight will be this:
(A:ENG ANTI ICE:1, Bool) if{ 1 } els{ 2 } (>L:MF_DEICE_Engine_1_Set)
Explanation:
The code block checks for the status of the (L:MF_DEICE_Engine_1_Set) variable. If equal to 0 nothing is done.
In this case, the B: event takes a parameter of either 0 = 0ff or 1 = On
Since 0 is the do-nothing case for our Lvar, we use the expected value plus 1.
So we set the MF lvar to either 1 or 2 and the code substracts 1 to get the expected value to pass to the B: event.
The code then resets the MF lvar back to 0.
The Mobiflight input config code is for a toggle button, push on, push off.
Thanks Jaime, unfortunatly, there is no "PC12_cockpit.xml" , it is in encrypted format, but I've understood the way you give me and try some things..