- Messages
- 943
- Country

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
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.
now working on APU Switch
it has 4 position
0 crank/blank
1 stop
2 start
3 switch
4 blank
this my code
animation working good<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 (>L:Apu_Ctrl, number) }
(M:Event) 'RightSingle' scmp 0 == if{ (L:Apu_Ctrl, number) -- 0 max (>L:Apu_Ctrl, number) }
(L:Apu_Ctrl, number) 0 ==
(L:Apu_Ctrl, number) 1 == if{ 1 (>K:APU_OFF_SWITCH) }
(L:Apu_Ctrl, number) 2 == if{ 1 (>K:APU_STARTER) }
(L:Apu_Ctrl, number) 3 == if{ 1 (>K:APU_GENERATOR_SWITCH_TOGGLE) }
(L:Apu_Ctrl, number) 4 ==
</CallbackCode>
</MouseRect>
</PartInfo>
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.


