Heretic
Resource contributor
- Messages
- 6,830
- Country

Oh gods of XML programming heareth my prayer!
For the last two days, I've tried to fix the engine startup of Milton Shupe's Dash 7 in FSX. Most of the time went into reverse-engineering the original startup gauge and trying to understand the logic working behind it...something I haven't quite fully achieved. What I could read from the XML jungle between those brackets was, that a certain N2 condition triggered the continuous toggling of the engine starter - something that FSX doesn't like. So I decided to rewrite the "guts" of the gauge, trying to retain three of the original aspects.
1) Engine selector knob determines which engine will be started. ((L:Start Selector, enum) ; Value can be "0" to "4"; "0" means its switched off "1" means engine 1 will be started, etc...))
2) Engine master switch permits engine start ((L:Start Master, bool); can be 0 or 1 ; 0 means On , 1 means off))
3) Presence of electric power permits engine start ((A:Circuit general panel on, bool); 0 or 1; 0 means no, 1 means yes)
And this is what I've come up with:
The theory behind it:
Upon clicking, the gauge determines whether the start master switch is set to 1 or 0. If it's 0, Var1 will be set to 1. Then, if Var1 is 1 the gauge checks which engine is selected and if there's any electricity and upon receiving the "go" from both starts the correspindent engine.
But somehow...it's not working.
What I shall scacrificeth for the Lordth to cometh and helpeth?!? Oh, whath!?!
D)
For the last two days, I've tried to fix the engine startup of Milton Shupe's Dash 7 in FSX. Most of the time went into reverse-engineering the original startup gauge and trying to understand the logic working behind it...something I haven't quite fully achieved. What I could read from the XML jungle between those brackets was, that a certain N2 condition triggered the continuous toggling of the engine starter - something that FSX doesn't like. So I decided to rewrite the "guts" of the gauge, trying to retain three of the original aspects.
1) Engine selector knob determines which engine will be started. ((L:Start Selector, enum) ; Value can be "0" to "4"; "0" means its switched off "1" means engine 1 will be started, etc...))
2) Engine master switch permits engine start ((L:Start Master, bool); can be 0 or 1 ; 0 means On , 1 means off))
3) Presence of electric power permits engine start ((A:Circuit general panel on, bool); 0 or 1; 0 means no, 1 means yes)
And this is what I've come up with:
Code:
<Gauge Name="Starter1" Version="1.0">
<Element>
<Select>
<Value>(G:Var1)==1 if{ (L:Start Selector, enum) 1 == (A:Circuit general panel on, bool) AND if{ (A:GENERAL ENG STARTER:1, bool) } els{(L:Start Selector, enum) 2 == (A:Circuit general panel on, bool) AND if{ (A:GENERAL ENG STARTER:2, bool) } els{(L:Start Selector, enum) 3 == (A:Circuit general panel on, bool) AND if{ (A:GENERAL ENG STARTER:3, bool) } els{(L:Start Selector, enum) 4 == (A:Circuit general panel on, bool) AND if{ (A:GENERAL ENG STARTER:4, bool) }}}}} els{0}</Value>
<Case Value="0">
<Image Name="Starter1_Off.bmp" ImageSizes="30,45"/>
</Case>
<Case Value="1">
<Image Name="Starter1_On.bmp" ImageSizes="30,45"/>
</Case>
</Select>
</Element>
<Mouse>
<Help ID="HELPID_GAUGE_STARTER_SWITCH"/>
<Cursor Type="Hand"/>
<Click>(L:Start Master, bool)==0 if{ 1 (>G:Var1) }</Click>
</Mouse>
</Gauge>
The theory behind it:
Upon clicking, the gauge determines whether the start master switch is set to 1 or 0. If it's 0, Var1 will be set to 1. Then, if Var1 is 1 the gauge checks which engine is selected and if there's any electricity and upon receiving the "go" from both starts the correspindent engine.
But somehow...it's not working.
What I shall scacrificeth for the Lordth to cometh and helpeth?!? Oh, whath!?!





