Update element not executing till the end

Hello guys

I'm trying to revive my Flight1 BN-2 Islander in P3D 4.5. I got the clicking sounds to work again (as per https://www.simforums.com/forums/islander-in-p3dv4_topic60395.html) and the KLN90 GPS as well, using the one from aerosoft Catalina (as per https://www.avsim.com/forums/topic/529864-britten-norman-bn-2-islander-for-p3dv4-coming-soon/page/2/), but with the buttons working only on the 2D panel.

My challenge is to make the buttons of the GPS work in the VC as well, by monitoring the LVars used by Flight1 in the mdl model and apply appropriate aerosoft GPS script when such VC LVars are modified. I use an update element in the aerosoft GPS xml gauge for that purpose.

I made it work correctly from the power button, the ALT, DTO, Cursors, etc, even the left outer knob but I have some difficulties with the knobs, starting with the left one.

For such knob, the aerosoft code is very intricate, with lots of if and els involved when you turn the knob up and when the turn the knob down. I started with the down scroll.


The code is more or less as follows :


XML:
<update>

(L:leftknob_inner_scrolldown_pressed,bool) 1 == if{

(L:leftknob_inner_scrolldown_pressed,bool) ! (>L:leftknob_inner_scrolldown_pressed,bool)

xxxxx if{ xxxxx if{ xxxxx } els{ xxxxx } xxxxx if{ xxxxx } els{ xxxxx } xxxxx if{ xxxxx } els{ xxxxx } xxxxx if{ xxxxx } els{ xxxxx } xxxxx if{ xxxxx } els{ xxxxx }

}

}

(L:leftknob_inner_scrollup_pressed,bool) 1 == if{

(L:leftknob_inner_scrollup_pressed,bool) ! (>L:leftknob_inner_scrollup_pressed,bool)

2 (>L:mytestvar, number)

}

</update>
where the xxxxx are instructions to update the pages displayed on the GPS screen (including calls to macros in the same xml gauge).

The pages on the GPS screen update accordingly (and correctly from what I see, even if I'm not an expert of the KNL90 GPS). The knob in the VC panel rotates correctly (I can see it). My problem is that the script seems to stop somewhere as mytestvar never gets equal to 2.

I have counted the { and }, I have the exact same number, I don’t see the problem.

Is there some kind of limitation on how many if/els you can use ? The code has something like 148.

Many thanks

Greg
 
Last edited:

tgibson

Resource contributor
Keep in mind that some GPS commands take longer than one or two gauge update cycles, and if you are expecting that to occur immediately that might not be happening.
 
Hello

To be more specific, here is my code :

XML:
<Update>

(L:bn2_kln_l_otr_knb_scrdown,bool) 1 == if{
(L:bn2_kln_l_otr_knb_scrdown,bool) ! (>L:bn2_kln_l_otr_knb_scrdown,bool)
(L:ltcurs,bool) 1 == (L:kltout,enum) 7 == and if{ @TopLeftKnob } els{
(L:ltcurs,bool) 0 == if{ (L:kltout,enum) -- d 0 &lt; if{ 7 } (>L:kltout,enum) } els{ (L:UR,enum) 1 - 0 max (>L:UR,enum) } }
}

(L:bn2_kln_l_otr_knb_scrup,bool) 1 == if{
(L:bn2_kln_l_otr_knb_scrup,bool) ! (>L:bn2_kln_l_otr_knb_scrup,bool)
(L:ltcurs,bool) 1 == (L:kltout,enum) 7 == and if{ @TopRightKnob } els{
(L:ltcurs,bool) 0 == if{ (L:kltout,enum) ++ d 7 &gt; if{ 0 } (>L:kltout,enum) } els{ (L:UR,enum) 1 + 140 min (>L:UR,enum) } }
}

(L:bn2_kln_pwr_knob_pressed,bool) 1 == if{
(L:klnon,bool) ! (>L:klnon,bool) 1 (>L:ktop,bool) (P:ABSOLUTE TIME,seconds) 1 + (>L:ktop timer,seconds) 0 (>L:kstp,bool) 0 (>L:bn2_kln_pwr_knob_pressed,bool)
}

(L:bn2_kln_ent_butn_pressed,bool) 1 == if{
1 (>@g:entButtonDown)
@ENTButton
1 (>L:kstp,bool)
(L:kmod,enum) 1 == if{ 1 (>L:kmdobs,enum) }
(L:UR,enum) 132 == (A:GPS Drives Nav1,bool) 1 == and if{ (>K:TOGGLE_GPS_DRIVES_NAV1) 0 (>L:V1,enum) }
0 (>@g:entButtonDown)
0 (>L:bn2_kln_ent_butn_pressed,bool)
}

(L:bn2_kln_clr_butn_pressed,bool) 1 == if{
(L:kltout,enum) 6 == (L:kmod,enum) 1 == and if{ 0 (>L:kmdobs,enum) }
(@g:clrButtonDown) 0 == if{ 1 (>@g:clrButtonDown) 0 (>@g:clrButtonCount) }
(@g:clrButtonDown) 1 == if{ 0 (>@g:clrButtonDown) (@g:clrButtonCount) @CLRButtonDelay &lt; if{ @CLRButton } }
0 (>L:bn2_kln_clr_butn_pressed,bool)
}

(L:bn2_kln_dto_butn_pressed,bool) 1 == if{
(@g:directButtonDown) 0 == if{ 1 (>@g:directButtonDown) @DTOButton }
(@g:directButtonDown) 1 == if{ 0 (>@g:directButtonDown) }
0 (>L:bn2_kln_dto_butn_pressed,bool)
}

(L:bn2_kln_alt_butn_pressed,bool) 1 == if{
1 (>L:altbuttdn,bool)
(L:kbalt,bool) ! (>L:kbalt,bool)
0 (>L:ltcurs,enum)
0 (>L:altbuttdn,bool)
0 (>L:bn2_kln_alt_butn_pressed,bool)
}

(L:bn2_kln_msg_butn_pressed,bool) 1 == if{
(@g:msgButtonDown) 0 == if{ 1 (>@g:msgButtonDown) 0 (>@g:msgButtonCount) }
(@g:msgButtonDown) 1 == if{ 0 (>@g:msgButtonDown) (@g:msgButtonCount) @MSGButtonDelay &lt; if{ @MSGButton } }
0 (>L:bn2_kln_msg_butn_pressed,bool)
}

(L:bn2_kln_l_crsr_butn_pressed,bool) 1 == if{
(L:bn2_kln_l_crsr_butn_pressed,bool) ! (>L:bn2_kln_l_crsr_butn_pressed,bool)
1 (>L:crsbuttdn,bool)
(L:ltcurs,bool) ! (>L:ltcurs,bool)
(L:UR,enum) 89 == (@g:blinkingField) and if{ (@g:directTo) ! (>@g:directTo) }
}

(L:bn2_kln_l_inr_knb_scrdown,bool) 1 == (L:ltcurs,bool) 0 == and if{
(L:bn2_kln_l_inr_knb_scrdown,bool) ! (>L:bn2_kln_l_inr_knb_scrdown,bool)
(L:gpxetest,number) 1 - (>L:gpxetest,number)
    (L:kltout,enum) 0 == if{
        3 (>L:knv1,enum) }
    (L:kltout,enum) 1 == if{
        (L:kcal,enum) 1 + 6 min (>L:kcal,enum) }
    (L:kltout,enum) 2 == if{
        (L:kstat,enum) 1 + 4 min (>L:kstat,enum) }
    (L:kltout,enum) 3 == if{
        (L:ksup,enum) 1 + 6 min (>L:ksup,enum) }
    (L:kltout,enum) 4 == if{
        (L:koth,enum) 1 + 5 min (>L:koth,enum) }
    (L:kltout,enum) 5 == if{
        (L:ktrp,enum) 1 + 2 min (>L:ktrp,enum) }
    (L:kltout,enum) 6 == if{
        (L:kmod,enum) 1 + 1 min (>L:kmod,enum) }
    (L:kltout,enum) 7 == if{
        (L:kflp,enum) 1 + 0 min (>L:kflp,enum) }
}
       
(L:bn2_kln_l_inr_knb_scrdown,bool) 1 == (L:ltcurs,bool) 0 != and if{
(L:bn2_kln_l_inr_knb_scrdown,bool) ! (>L:bn2_kln_l_inr_knb_scrdown,bool)
(L:gpxetest,number) 1 - (>L:gpxetest,number)      
    (L:UR,enum) 0 == if{ (L:LR1,enum) 1 + 9 min (>L:LR1,enum) }
    (L:UR,enum) 1 == if{ (L:LR2,enum) 1 + 9 min (>L:LR2,enum) }
    (L:UR,enum) 2 == if{ (L:LR3,enum) 1 + 9 min (>L:LR3,enum) }
    (L:UR,enum) 3 == if{ (L:LR4,enum) 1 + 9 min (>L:LR4,enum) }
    (L:UR,enum) 4 == if{ (L:LR5,enum) 1 + 9 min (>L:LR5,enum) }
    (L:UR,enum) 5 == if{ (L:LR6,enum) 1 + 9 min (>L:LR6,enum) }
    (L:UR,enum) 6 == if{ (L:LR7,enum) 1 + 9 min (>L:LR7,enum) }
    (L:UR,enum) 7 == if{ (L:LR8,enum) 1 + 9 min (>L:LR8,enum) }
    (L:UR,enum) 8 == if{ (L:LR9,enum) 1 + 9 min (>L:LR9,enum) }
    (L:UR,enum) 9 == if{ (L:LR10,enum) 1 + 9 min (>L:LR10,enum) }
    (L:UR,enum) 10 == if{ (L:LR11,enum) 1 + 9 min (>L:LR11,enum) }
    (L:UR,enum) 11 == if{ (L:LR12,enum) 1 + 9 min (>L:LR12,enum) }
    (L:UR,enum) 12 == if{ (L:LR13,enum) 1 + 9 min (>L:LR13,enum) }
    (L:UR,enum) 13 == if{ (L:LR14,enum) 1 + 9 min (>L:LR14,enum) }
    (L:UR,enum) 14 == if{ (L:LR15,enum) 1 + 9 min (>L:LR15,enum) }
    (L:UR,enum) 15 == if{ (L:LR16,enum) 1 + 9 min (>L:LR16,enum) }
    (L:UR,enum) 16 == if{ (L:LR17,enum) 1 + 9 min (>L:LR17,enum) }
    (L:UR,enum) 17 == if{ (L:LR18,enum) 1 + 9 min (>L:LR18,enum) }
    (L:UR,enum) 18 == if{ (L:LR19,enum) 1 + 9 min (>L:LR19,enum) }
    (L:UR,enum) 19 == if{ (L:LR20,enum) 1 + 9 min (>L:LR20,enum) }
    (L:UR,enum) 20 == if{ (L:LR21,enum) 1 + 9 min (>L:LR21,enum) }
    (L:UR,enum) 21 == if{ (L:LR22,enum) 1 + 9 min (>L:LR22,enum) }
    (L:UR,enum) 22 == if{ (L:LR23,enum) 1 + 9 min (>L:LR23,enum) }
    (L:UR,enum) 23 == if{ (L:LR24,enum) 1 + 9 min (>L:LR24,enum) }
    (L:UR,enum) 24 == if{ (L:LR25,enum) 1 + 9 min (>L:LR25,enum) }
    (L:UR,enum) 25 == if{ (L:LR26,enum) 1 + 9 min (>L:LR26,enum) }
    (L:UR,enum) 26 == if{ (L:LR27,enum) 1 + 9 min (>L:LR27,enum) }
    (L:UR,enum) 27 == if{ (L:LR28,enum) 1 + 9 min (>L:LR28,enum) }
    (L:UR,enum) 28 == if{ (L:LR29,enum) 1 + 9 min (>L:LR29,enum) }
    (L:UR,enum) 29 == if{ (L:LR30,enum) 1 + 9 min (>L:LR30,enum) }
    (L:UR,enum) 30 == if{ (L:LR31,enum) 1 + 9 min (>L:LR31,enum) }
    (L:UR,enum) 31 == if{ (L:LR32,enum) 1 + 9 min (>L:LR32,enum) }
    (L:UR,enum) 32 == if{ (L:LR33,enum) 1 + 9 min (>L:LR33,enum) }
    (L:UR,enum) 33 == if{ (L:LR34,enum) 1 + 9 min (>L:LR34,enum) }
    (L:UR,enum) 34 == if{ (L:LR35,enum) 1 + 9 min (>L:LR35,enum) }
    (L:UR,enum) 35 == if{ (L:LR36,enum) 1 + 9 min (>L:LR36,enum) }
    (L:UR,enum) 36 == if{ (L:LR37,enum) 1 + 9 min (>L:LR37,enum) }
    (L:UR,enum) 37 == if{ (L:LR38,enum) 1 + 9 min (>L:LR38,enum) }
    (L:UR,enum) 38 == if{ (L:LR39,enum) 1 + 9 min (>L:LR39,enum) }
    (L:UR,enum) 39 == if{ (L:LR40,enum) 1 + 9 min (>L:LR40,enum) }
    (L:UR,enum) 40 == if{ (L:LR41,enum) 1 + (>L:LR41,enum) }
    (L:UR,enum) 41 == if{ (L:LR42,enum) 1 + (>L:LR42,enum) }
    (L:UR,enum) 42 == if{ (L:LR43,enum) 1 + (>L:LR43,enum) }
    (L:UR,enum) 43 == if{ (L:LR44,enum) 1 + (>L:LR44,enum) }
    (L:UR,enum) 44 == if{ (L:LR45,enum) 1 + 9 min (>L:LR45,enum) }
    (L:UR,enum) 45 == if{ (L:LR46,enum) 1 + 9 min (>L:LR46,enum) }
    (L:UR,enum) 46 == if{ (L:LR47,enum) 1 + 9 min (>L:LR47,enum) }
    (L:UR,enum) 47 == if{ (L:LR48,enum) 1 + 9 min (>L:LR48,enum) }
    (L:UR,enum) 48 == if{ (L:LR49,enum) 1 + 9 min (>L:LR49,enum) }
    (L:UR,enum) 49 == if{ (L:LR50,enum) 1 + 9 min (>L:LR50,enum) }
    (L:UR,enum) 50 == if{ (L:LR51,enum) 1 + 9 min (>L:LR51,enum) }
    (L:UR,enum) 51 == if{ (L:LR52,enum) 1 + (>L:LR52,enum) 1 (>L:bb1,enum) }
    (L:UR,enum) 52 == if{ (L:LR53,enum) 1.666667 + (>L:LR53,enum) 1 (>L:bb1,enum) }
    (L:UR,enum) 53 == if{ (L:LR54,enum) 1.666667 + (>L:LR54,enum) 1 (>L:bb1,enum) }
    (L:UR,enum) 54 == if{ (L:untmup,enum) 1 + 18 min (>L:untmup,enum) 1 (>L:bb1,enum) }
    (L:UR,enum) 55 == if{ (L:LR56,enum) 1 + (>L:LR56,enum) 2 (>L:bb1,enum) }
    (L:UR,enum) 56 == if{ (L:LR57,enum) 1.666667 + (>L:LR57,enum) 2 (>L:bb1,enum) }
    (L:UR,enum) 57 == if{ (L:LR58,enum) 1.666667 + (>L:LR58,enum) 2 (>L:bb1,enum) }
    (L:UR,enum) 58 == if{ (L:untmdn,enum) 1 + 18 min (>L:untmdn,enum) 2 (>L:bb1,enum) }
    (L:UR,enum) 59 == if{ (L:LR60,enum) (L:gmlmt,bool) ! (>L:gmlmt,bool) (>L:LR60,enum) }
    (L:UR,enum) 60 == if{ (L:LR61,enum) 1 + 50 min (>L:LR61,enum) }
    (L:UR,enum) 61 == if{ (L:LR62,enum) 1 + 2 min (>L:LR62,enum) }
    (L:UR,enum) 62 == if{ (L:LR63,enum) 1 + 9 min (>L:LR63,enum) }
    (L:UR,enum) 63 == if{ (L:LR64,enum) 1 + 9 min (>L:LR64,enum) }
    (L:UR,enum) 64 == if{ (L:LR65,enum) 1 + 2 min (>L:LR65,enum) }
    (L:UR,enum) 65 == if{ (L:LR66,enum) 1 + 1 min (>L:LR66,enum) }
    (L:UR,enum) 66 == if{ (L:LR67,enum) 1 + 1 min (>L:LR67,enum) }
    (L:UR,enum) 67 == if{ (L:LR68,enum) 1 + 2 min (>L:LR68,enum) }
    (L:UR,enum) 68 == if{ (L:LR68,enum) 1 &lt;= if{ (L:LR69,enum) 1 + 9 min (>L:LR69,enum) } els{ 0 (>L:LR69,enum) } }
    (L:UR,enum) 69 == if{ (L:LR68,enum) 1 &lt;= if{ (L:LR70,enum) 1 + 9 min (>L:LR70,enum) } els{ 0 (>L:LR70,enum) } }
    (L:UR,enum) 70 == if{ (L:LR68,enum) 1 &lt;= if{ (L:LR71,enum) 1 + 9 min (>L:LR71,enum) } els{ 0 (>L:LR71,enum) } }
    (L:UR,enum) 71 == if{ (L:LR72,enum) 1 + 9 min (>L:LR72,enum) }
    (L:UR,enum) 72 == if{ (L:LR73,enum) 1 + 9 min (>L:LR73,enum) }
    (L:UR,enum) 73 == if{ (L:LR74,enum) 1 + 9 min (>L:LR74,enum) }
    (L:UR,enum) 74 == if{ (L:LR75,enum) 1 + 9 min (>L:LR75,enum) }
    (L:UR,enum) 75 == if{ (L:LR76,enum) 1 + 9 min (>L:LR76,enum) }
    (L:UR,enum) 76 == if{ (L:LR77,enum) 1 + 9 min (>L:LR77,enum) }
    (L:UR,enum) 77 == if{ (L:LR78,enum) 1 + 9 min (>L:LR78,enum) }
    (L:UR,enum) 78 == if{ (L:LR79,enum) 1 + 9 min (>L:LR79,enum) }
    (L:UR,enum) 79 == if{ (L:LR80,enum) 1 + 9 min (>L:LR80,enum) }
    (L:UR,enum) 80 == if{ (L:LR81,enum) 1 + 9 min (>L:LR81,enum) }
    (L:UR,enum) 81 == if{ (L:LR82,enum) 1 + 9 min (>L:LR82,enum) }
    (L:UR,enum) 82 == if{ (L:LR83,enum) 1 + 9 min (>L:LR83,enum) }
    (L:UR,enum) 83 == if{ (L:LR84,enum) 1 + 9 min (>L:LR84,enum) }
    (L:UR,enum) 84 == if{ (L:LR85,enum) 1 + 9 min (>L:LR85,enum) }
    (L:UR,enum) 85 == if{ (L:LR86,enum) 1 + 9 min (>L:LR86,enum) }
    (L:UR,enum) 86 == if{ (L:LR87,enum) 1 + 9 min (>L:LR87,enum) }
    (L:UR,enum) 87 == if{ (L:LR88,enum) 1 + 9 min (>L:LR88,enum) }
    (L:UR,enum) 88 == if{ (L:LR89,enum) 1 + 9 min (>L:LR89,enum) }
    (L:UR,enum) 89 == if{ (L:LR90,enum) 1 + 9 min (>L:LR90,enum) }
    (L:UR,enum) 90 == if{ (L:LR91,enum) 1 + (>L:LR91,enum) }
    (L:UR,enum) 91 == if{ (L:LR92,enum) 1 + (>L:LR92,enum) }
    (L:UR,enum) 92 == if{ (L:LR93,enum) 1 + (>L:LR93,enum) }
    (L:UR,enum) 93 == if{ (L:LR94,enum) 1 + 9 min (>L:LR94,enum) }
    (L:UR,enum) 94 == if{ (L:LR95,enum) 1 + 9 min (>L:LR95,enum) }
    (L:UR,enum) 95 == if{ (L:LR96,enum) 1 + 9 min (>L:LR96,enum) }
    (L:UR,enum) 96 == if{ (L:LR97,enum) 1 + 9 min (>L:LR97,enum) }
    (L:UR,enum) 97 == if{ (L:LR98,enum) 1 + 9 min (>L:LR98,enum) }
    (L:UR,enum) 98 == if{ (L:LR99,enum) 1 + (>L:LR99,enum) }
    (L:UR,enum) 99 == if{ (L:LR100,enum) 1 + (>L:LR100,enum) }
<!--    (L:UR,enum) 100 == if{ (L:LR101,enum) 1 + (>L:LR101,enum) }
    (L:UR,enum) 101 == if{ (L:LR102,enum) 1 + 9 min (>L:LR102,enum) }
    (L:UR,enum) 102 == if{ (L:LR103,enum) 1 + 9 min (>L:LR103,enum) }
    (L:UR,enum) 103 == if{ (L:LR104,enum) 1 + 9 min (>L:LR104,enum) }
    (L:UR,enum) 104 == if{ (L:LR105,enum) 1 + 9 min (>L:LR105,enum) }
    (L:UR,enum) 105 == if{ (L:LR106,enum) 1 + 9 min (>L:LR106,enum) }
    (L:UR,enum) 106 == if{ (L:LR107,enum) 1 + 9 min (>L:LR107,enum) }
    (L:UR,enum) 107 == if{ (L:LR108,enum) 1 + 9 min (>L:LR108,enum) }
    (L:UR,enum) 108 == if{ (L:LR109,enum) 1 + 9 min (>L:LR109,enum) }
    (L:UR,enum) 109 == if{ (L:LR110,enum) 1 + 9 min (>L:LR110,enum) }
    (L:UR,enum) 110 == if{ (L:LR111,enum) 1 + 9 min (>L:LR111,enum) }
    (L:UR,enum) 111 == if{ (L:LR112,enum) 1 + 9 min (>L:LR112,enum) }
    (L:UR,enum) 112 == if{ (L:LR113,enum) 1 + 9 min (>L:LR113,enum) }
    (L:UR,enum) 113 == if{ (L:LR114,enum) 1 + 9 min (>L:LR114,enum) }
    (L:UR,enum) 114 == if{ (L:LR115,enum) 1 + 2 min (>L:LR115,enum) }
    (L:UR,enum) 115 == if{ (L:LR116,enum) 1 + 2 min (>L:LR116,enum) }
    (L:UR,enum) 116 == if{ (L:LR117,enum) 1 + 2 min (>L:LR117,enum) }
    (L:UR,enum) 117 == if{ (L:LR118,enum) 1 + 1 min (>L:LR118,enum) }
    (L:UR,enum) 118 == if{ (L:LR119,enum) 1 + (L:kbaro,bool) if{ 10 min } els{ 32 min } (>L:LR119,enum) }
    (L:UR,enum) 119 == if{ (L:LR120,enum) 1 + 9 min (>L:LR120,enum) }
    (L:UR,enum) 120 == if{ (L:LR121,enum) 1 + 9 min (>L:LR121,enum) }
    (L:UR,enum) 121 == if{ (L:LR122,enum) 1 + 9 min (>L:LR122,enum) }
    (L:UR,enum) 122 == if{ (L:LR123,enum) 1 + 9 min (>L:LR123,enum) }
    (L:UR,enum) 123 == if{ (L:LR124,enum) 1 + 1 min (>L:LR124,enum) }
    (L:UR,enum) 124 == if{ (L:LR125,enum) 1 + 9 min (>L:LR125,enum) 0 (>L:trifrst,enum) }
    (L:UR,enum) 125 == if{ (L:LR126,enum) 1 + 9 min (>L:LR126,enum) 0 (>L:trifrst,enum) }
    (L:UR,enum) 126 == if{ (L:LR127,enum) 1 + 9 min (>L:LR127,enum) 0 (>L:trifrst,enum) }
    (L:UR,enum) 127 == if{ (L:LR128,enum) 1 + 9 min (>L:LR128,enum) 0 (>L:trifrst,enum) }
    (L:UR,enum) 128 == if{ (L:LR129,enum) 1 + 9 min (>L:LR129,enum) 0 (>L:trifrst,enum) }
    (L:UR,enum) 129 == if{ (L:LR130,enum) 1 + 9 min (>L:LR130,enum) 0 (>L:trifrst,enum) }
    (L:UR,enum) 131 == if{ (L:LR132,enum) 1 + 2 min (>L:LR132,enum) }
    (L:UR,enum) 132 == if{ (L:LR133,enum) 1 + 2 min (>L:LR133,enum) }
    (L:ksup,enum) 5 == if{ (L:kbaro,bool) ! (>L:kbaro,bool) }
-->
}

(L:bn2_kln_l_inr_knb_scrup,bool) 1 == if{
(L:bn2_kln_l_inr_knb_scrup,bool) ! (>L:bn2_kln_l_inr_knb_scrup,bool)
(L:gpxetest,number) 1 + (>L:gpxetest,number)
}

</Update>
If I remove the comments tags, leaving the code, I have problems. Since (L:ltcurs,bool) equals 0, this part of the code should not even be executed (maybe just parsed/compiled).

I'm lost !!


Thanks
 
Last edited:

Luka

Resource contributor
Not sure it will help, but try to divide the largest "if" expression into two or more parts:
Code:
...       

(L:bn2_kln_l_inr_knb_scrdown,bool) 1 == (L:ltcurs,bool) 0 != and if{
    (L:bn2_kln_l_inr_knb_scrdown,bool) ! (>L:bn2_kln_l_inr_knb_scrdown,bool)
    (L:gpxetest,number) 1 - (>L:gpxetest,number)
    1 sp0
}
els{
    0 sp0
}

0 50 (L:UR,enum) rng l0 and if{
    (L:UR,enum) 0 == if{ (L:LR1,enum) 1 + 9 min (>L:LR1,enum) }
    ...
    (L:UR,enum) 50 == if{ (L:LR51,enum) 1 + 9 min (>L:LR51,enum) }
}

51 100 (L:UR,enum) rng l0 and if{
    (L:UR,enum) 51 == if{ (L:LR52,enum) 1 + (>L:LR52,enum) 1 (>L:bb1,enum) }
    ...
    (L:UR,enum) 100 == if{ (L:LR101,enum) 1 + (>L:LR101,enum) }
}

101 132 (L:UR,enum) rng l0 and if{
    (L:UR,enum) 101 == if{ (L:LR102,enum) 1 + 9 min (>L:LR102,enum) }
    ...
    (L:UR,enum) 132 == if{ (L:LR133,enum) 1 + 2 min (>L:LR133,enum) }
}

l0 if{
    (L:ksup,enum) 5 == if{ (L:kbaro,bool) ! (>L:kbaro,bool) }
}

...
 
Thanks Luka. I did try to split in two already with no improvement. When I said "problems" in my previous messages, I meant I have P3D crashing to desktop.

Are you aware of any size limitation for an Update section in P3D v4.5 ? Can I have more than one Update section in an XML gauge ?

Indeed that gauge is quite heavy and there is another Update upper in the script.... I tried to put all the Update together but without any improvement ....

Thanks
 
Last edited:

n4gix

Resource contributor
Are you using the FSX Schema or the FS9 Schema? The former can have multiple <Update> sections, the latter can only have one.
 
Top