• 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.

Engine Start Sequence...

Zeiten

Resource contributor
Messages
444
Country
norway
Hi!

Am I overthinking things again?
Probably yes! :D

What I want:

1. A button thats when pressed toggle the starter for the correct engine and stays in place until an certain N1 level is reached and then resets the starter toggle.


What I get:

1. A button that pops back out again straight away (of course...) and does start the engine for the correct engine if the correct circumstances are met (APU, bleed and so on).

2. The toggle engine start will always stay in the (1) position until I press the engine start button again to trigger the 0 (>K:TOGGLE_STARTER1)

What I'm planning to do is making the fuel cutoff valve into a custom L:var as well and then control the 0 (>K:TOGGLE_STARTER1) trough that one instead.

Or are there a way more easier way?
Please don't tell me it way more complicated that this :O

The popping back out is OK.
Think I will manage to code that. Just need to get the basic into place first.
This is for an B-52 :rotfl::duck:

Code:
      <PartInfo>
    <Name>oh_starter_engine_1</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:oh starter engine 1, enum) 50 *
        </Code>
        <Lag>300</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Engine 1 Start</TooltipText>
	  <MouseFlags>LeftSingle+LeftRelease+LeftDrag</MouseFlags>
		<CallbackCode>
		(M:Event) 'LeftSingle' scmp 0 ==
		if{ 		
		1 (A:ELECTRICAL MASTER BATTERY, bool)
		1 (>L:oh starter engine 1, enum) and
		(L:fe apu bleed air,bool)
		(A:APU PCT RPM, percent) 75 &gt;
            
		if{ 
		(>K:TOGGLE_STARTER1) } } 
		els{ 
		0 (>L:oh starter engine 1, enum)
		0 (>K:TOGGLE_STARTER1)  and } }
			
		(M:Event) 'LeftRelease' scmp 0 ==
		if{ 0 (>L:oh starter engine 1, enum) }

		(M:Event) 'LeftDrag' scmp 0 == 
		if{ 0 (&gt;L:oh starter engine 1, enum) }
      </CallbackCode>
    </MouseRect>
  </PartInfo>
 
This is what I use.
vololiberista


Code:
<Gauge Name="Starter 1" Version="1.0">
   <Element>
      <Select>
         <Value>(G:Var1) if{ (A:Circuit general panel on, bool) (A:Eng1 N2 RPM, percent) 22 &lt; &amp;&amp; if{ 0 (&gt;K:TOGGLE_STARTER1) 0 (&gt;K:THROTTLE1_CUT) } els{ (G:Var1) -- (&gt;G:Var1) 0 (&gt;K:MIXTURE1_INCR) } } (G:Var1) 0 != (A:General eng1 starter, bool) ||</Value>
         <Case Value="0">
            <Image Name="FUEL_SWITCH_2_OFF.bmp" ImageSizes="24,36"/>
         </Case>
         <Case Value="1">
            <Image Name="FUEL_SWITCH_2_ON.bmp" ImageSizes="24,36"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
      <Help ID="HELPID_GAUGE_STARTER_SWITCH"/>
      <Tooltip ID="TOOLTIPTEXT_LIGHT_STARTER_ON"/>
      <Cursor Type="Hand"/>
      <Click>5 (&gt;G:Var1) 0 (&gt;K:MIXTURE1_LEAN)</Click>
   </Mouse>
</Gauge>
 
Sorry, but that's just way to complicated for me ;)

Need to make baby steps you know.

I don't know how to express myself with this one, but lets try.

How do you make the code so you can control the toggle event?
I mean, toggle is fine. On or off. But how to code that the toggle only goes to OFF or ON? not on, off, on, off etc.

And there is no way to make an key event out of a A:var?.
Only possible to do a K:event IF an A:var is met?

The way things are now:

Code:
      <PartInfo>
    <Name>oh_starter_engine_1</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:oh starter engine 1, enum) 50 *
        </Code>
        <Lag>300</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Engine 1 Start</TooltipText>
	  <MouseFlags>LeftSingle+LeftRelease+LeftDrag</MouseFlags>
		<CallbackCode>
		(M:Event) 'LeftSingle' scmp 0 ==
		if{ 
		
		1 (A:ELECTRICAL MASTER BATTERY, bool)
		1 (>L:oh starter engine 1, enum) and
        (L:fe apu bleed air,bool)
		(A:APU PCT RPM, percent) 75 &gt;
            
		if{ 1 (>K:TOGGLE_STARTER1) } } 
		els{ 0 (>L:oh starter engine 1, enum) } 
			
		(M:Event) 'LeftRelease' scmp 0 ==
		if{ 0 (&gt;L:oh starter engine 1, enum) }
			
		(M:Event) 'LeftDrag' scmp 0 == 
		if{ 0 (&gt;L:oh starter engine 1, enum) }
      </CallbackCode>
    </MouseRect>
  </PartInfo>



Code:
      <PartInfo>
    <Name>cc_fuel_cutoff1</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:cc fuel cutoff1, bool) 50 *
        </Code>
        <Lag>300</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle+RightSingle</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle' scmp 0 == 
        if{ 0 (>L:cc fuel cutoff1, bool) 1 (>K:TOGGLE_FUEL_VALVE_ENG1) }
		
		(M:Event) 'RightSingle' scmp 0 == 
        if{ 1 (>L:cc fuel cutoff1, bool) 0 (>K:TOGGLE_FUEL_VALVE_ENG1) 0 (>K:TOGGLE_STARTER1)  }
      </CallbackCode>
    </MouseRect>
  </PartInfo>

What I'm thinking is that when the starter button is pressed the starter toggle goes into 1 (ON) and then the fuel cutoff switch is set to off the starter toggles goes to 0 (OFF).

But the codes does not work.
The toggle just works as a regular toggle.
 
To control the toggle event you need to add more "tests" to your code than just the (M:Event) 'LeftSingle' scmp 0 == test (for example).

A simple example - a nav light OFF button:

If the mouse is clicked AND the nav light is ON THEN toggle the nav lights.

(if the lights are already off then the mouse click does nothing).

Hope this helps,
 
IMHO this can't work.
But i only looked in this part.

Code:
		1 (A:ELECTRICAL MASTER BATTERY, bool)
		1 (>L:oh starter engine 1, enum) and
                (L:fe apu bleed air,bool)
		(A:APU PCT RPM, percent) 75 &gt;
            
		if{ 1 (>K:TOGGLE_STARTER1) } } 
		els{ 0 (>L:oh starter engine 1, enum) }

Code:
		(A:ELECTRICAL MASTER BATTERY, bool)
		(L:oh starter engine 1,enum) 0 !=
                and
               (L:fe apu bleed air,bool)
               and
	       (A:APU PCT RPM, percent) 75 &gt;
               and
		if{
                   (>K:TOGGLE_STARTER1)
                   } 
	      els{
                   0  (>L:oh starter engine 1,enum)
                   }


Code:
		1 (>L:oh starter engine 1, enum)

has to be set elsewhere.

I think this is redundant
Code:
               (L:fe apu bleed air,bool)
               and
	       (A:APU PCT RPM, percent) 75 &gt;
               and

(L:fe apu bleed air,bool) should be enough.

But i don't know the rest of the code.

Edi
 
Back
Top