help setting bleed air source broken?

#1
Hi all,
This is my first post to this forum. I'm working on a Citation XLS panel for the aryusworks aircraft and I'm suddenly stuck to a very stupid issue.
I'm trying to change the bleed air source from "engine" to "apu" using the keyevent "K:BLEED_AIR_SOURCE_CONTROL_SET" , but for some reason it wont change the source and (A:BLEED AIR SOURCE CONTROL,enum) remains 0.

this is the code I use:
Code:
<Gauge Name="APU BLEED AIR valve Switch" Version="1.0">
 
 (* 0=OFF 1=AUTO 2=APU 3=ENGINES *)
 
   <Update>
    
    (L:APU_BL_SW, bool) 1 == (A:BLEED AIR SOURCE CONTROL,enum) 0 == and if{ 2 (>K:BLEED_AIR_SOURCE_CONTROL_SET) }
    
    (L:APU_BL_SW, bool) 0 == if{ 3 (>K:BLEED_AIR_SOURCE_CONTROL_SET) } 

    </Update>

    <Element>
      <Select>
         <Value>(L:APU_BL_SW, bool)</Value>
         <Case Value="0">
            <Image Name="W_SW_DN.bmp"/>
         </Case>
         <Case Value="1">
            <Image Name="W_SW_UP.bmp"/>
         </Case>
      </Select>
    </Element>
    
    <Mouse>
      <Cursor Type="Hand"/>
      <Click>
      (L:APU_BL_SW, bool) ! (>L:APU_BL_SW, bool)
        
      </Click>
    </Mouse>
    
</Gauge>
Just for sake of testing I try to use the BLEED_AIR_SOURCE_CONTROL_INC event and that one works but because the XLS uses a flip switch I cannot use that event(see attached image).
Can somebody tell me what I'm missing or be doing wrong?
thanks.
Adino
 

Attachments

Roy Holmes

Resource contributor
#2
In the P3D V4.1 SDK the enum values for (A:BLEED AIR SOURCE CONTROL,enum) are given as:
0= min,1=auto, 2=off, 3=apu and 4=engines.
That differs from what you have in a comment and could be your issue
Roy
 
#3
In the P3D V4.1 SDK the enum values for (A:BLEED AIR SOURCE CONTROL,enum) are given as:
0= min,1=auto, 2=off, 3=apu and 4=engines.
That differs from what you have in a comment and could be your issue
Roy
Thank you Roy for your feedback,
Actually I tried all those possibilities and I also tried the suggestions mentioned in a different post where it seems that the SDK had a them in the wrong order.
But non of them seem to workout for me I mean the (A:BLEED AIR SOURCE CONTROL,enum) variable is not even being set. I'm using FSX by the way, could that be the issue?
Adino
 

Roy Holmes

Resource contributor
#4
As far as I can see in the FSX SDK the only events for BLEED_AIR_SOURCE_CONTROL are INC and DEC and they are in a section containing new events for FSX. The enum values are the same.
K:BLEED_AIR_SOURCE_CONTROL_SET is in P3D SDK but is missing from my paper copy of the FSX SDK. You can use INC to cycle through the values, I believe.
The SDK is not always correct, however.
Roy
 
#5
Then most probably it cannot be set in FSX only P3D and that explains it all. The BLEED_AIR_SOURCE_CONTROL are INC and DEC works but in my case they don't really suits since I have a 2pos switch and not a rotary one. I will have to think trough a code to be able to use them for a 2pos switch.
Thank you for pointing me out in the good direction I was almost driving crazy on it without realising that I got the wrong SDK :rolleyes:..
Adino
 
#8
I manage to get it work using this code:
Code:
<Gauge Name="APU BLEED AIR valve Switch" Version="1.0">

(* 0=AUTO 1=OFF 2=APU 3=ENGINES *)

   <Update>
   
    (L:APU_BL_SW, bool) 0 == (A:BLEED AIR SOURCE CONTROL,enum) 3 &lt; and if{ (>K:BLEED_AIR_SOURCE_CONTROL_INC) }
   
    (L:APU_BL_SW, bool) 1 == (A:BLEED AIR SOURCE CONTROL,enum) 2 &gt; and if{ 3 (>K:BLEED_AIR_SOURCE_CONTROL_DEC) }

    </Update>

    <Element>
      <Select>
         <Value>(L:APU_BL_SW, bool)</Value>
         <Case Value="0">
            <Image Name="W_SW_DN.bmp"/>
         </Case>
         <Case Value="1">
            <Image Name="W_SW_UP.bmp"/>
         </Case>
      </Select>
    </Element>
   
    <Mouse>
      <Cursor Type="Hand"/>
      <Click>
      (L:APU_BL_SW, bool) ! (>L:APU_BL_SW, bool)
       
      </Click>
    </Mouse>
   
</Gauge>
The code is a kinda "goofy" but hey it does the work and it seems to work in all version of the ESP.
thanks all for guiding me trough.
Adino
 
Top