• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

APU Rotary Switch ( Solved ) and need another help

Messages
943
Country
indonesia
I working on MV22B
now working on APU Switch
it has 4 position
0 crank/blank
1 stop
2 start
3 switch
4 blank

this my code

<PartInfo>
<Name>switch_apu_mv22b</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:Apu_Ctrl, number) 25 *
</Code>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>LeftSingle+RightSingle</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 == if{ (L:Apu_Ctrl, number) ++ 4 min (&gt;L:Apu_Ctrl, number) }
(M:Event) 'RightSingle' scmp 0 == if{ (L:Apu_Ctrl, number) -- 0 max (&gt;L:Apu_Ctrl, number) }

(L:Apu_Ctrl, number) 0 ==
(L:Apu_Ctrl, number) 1 == if{ 1 (&gt;K:APU_OFF_SWITCH) }
(L:Apu_Ctrl, number) 2 == if{ 1 (&gt;K:APU_STARTER) }
(L:Apu_Ctrl, number) 3 == if{ 1 (&gt;K:APU_GENERATOR_SWITCH_TOGGLE) }
(L:Apu_Ctrl, number) 4 ==
</CallbackCode>
</MouseRect>
</PartInfo>
animation working good
but command on APU I don't think this working cause there no reaction on apu indicator.
another strange is if I apply this code to model there had affect to autopilot altitude hold became not working. I try to switch to APU starter position then autopilot altitude hold working again.
 
We would have to see the code that reacts to the value of the L:Apu_Ctrl variable.
 
change Lvar name, but still not working.
I check value Lvar all working good as desire.
 
Only jet aircraft have an APU installed by default. For any other type of aircraft, you need to add this to the aircraft.cfg:
Code:
[Auxiliary Power Unit]
available = 1
 
Thank you Heretic, now working well. Why needs an APU for propeller not cover in SDK, even P3D SDK?
 
I don't know. It's one of the many mysteries of the SDK documentation...
 
I have some problem with code above. especially on callback code, animation working fine

<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 == if{ (L:Apu_Ctrl, number) ++ 4 min (&gt;L:Apu_Ctrl, number) }
(M:Event) 'RightSingle' scmp 0 == if{ (L:Apu_Ctrl, number) -- 0 max (&gt;L:Apu_Ctrl, number) }

(L:Apu_Ctrl, number) 0 ==
(L:Apu_Ctrl, number) 1 == if{ 1 (&gt;K:APU_OFF_SWITCH) }
(L:Apu_Ctrl, number) 2 == if{ 1 (&gt;K:APU_STARTER) }
(L:Apu_Ctrl, number) 3 == if{ 1 (&gt;K:APU_GENERATOR_SWITCH_TOGGLE) }
(L:Apu_Ctrl, number) 4 ==
</CallbackCode>

My planning procedure is
0 = nothing ( only animation )
1 = APU stop
2 = APU starter
3 = switch APU active
4 = nothing ( only animation )

all working as desire, but the strange is, when position 3 then rotate to 4 or 2 APU still active. when go back again to 3 the APU deactivate (that it should be active). it just like on/off, if I repeat back to the number
what thing I want is? if position 3 for APU active then if I move to 4 or 2 it automatically APU deactivated.
need help to solve this problem.
 
Remove the lines for the 0 == and 4 == as they are not doing anything. Also, every time you go to position 3, you are sending a toggle event, which, when triggered, will alternate between on and off. Use APU_GENERATOR_SWITCH_SET instead. You may want to also send a 0 to APU_GENERATOR_SWITCH_SET when on position 1.
 
Thanks Naruto-kun, it working but not I want. if I move to position 4 or 2 it still active. if position 1 then it will off.

real MV22B APU knob procedure is
0 = crank --> I don't know what this function , so make it nothing
1 = APU stop --> APU stop
2 = run/disenggage --> use as APU starter
3 = run/enggage --> use as APU gen active
4 = Emergency run/enggage --> nothing to do. maybe later will use as ground power unit
 
But since they start the APU or do nothing, if the APU is already active it will remain active. The only switch position to stop the APU is position 1.
 
Back
Top