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

Governor gauge request

Messages
240
Country
germany
Hello fellows!

Is it possible to write a gauge that changes throttle due to collective input (collective=prop-pitch)?

The heli I'm editing works well concerning rotor rpm and engine torque, but it's a real pain to adjust the throttle lever all the time you change collective, given it has FADEC. I hope this was understandable :)

I never coded a gauge before so I would highly appreciate any help I could get from you!

Best regards,
Steven
 
Last edited:
Thanks for your answer, jeroen79!
Nice to hear that it is possible.

Well, actually it should be satisfactory, if the xml gauge simply dedicates a throttle percentage to a given collective percentage. Not exactly 1:1.
But I think for my purposes I don't need a regulator.

So Input: %Collective, Output: %Throttle (calculated by a function, of course)

I really don't want to ask for something I could do myself, but as I'm an absolute noob at gauge coding and don't know the tricks, it would take up too much time for now.
Maybe someone could be that nice and show me a basical model of the script, that I'd try to cutomize then?

Best regards,
Steven
 
Ok, another try:

Would it be possible to align throttle % to switch positions? So when I click the switch to the first position it sets throttle to e.g. 20% and when I click the second pos it sets 100%.

Thanks for any help!

Best wishes and MERRY CHRISTMAS!
 
Here is a quick 3D xml code i wrote. This will Force the throttle to only work from the switch or both. So the throttle has full control and the switch snaps the throttle into 0, 20% 100% as long as you don't touch the throttle on your joystick......
Animate your switch using these keys. 0,50,100

Easy! Or you can have this code converted to 2D gauge.

Add to upper section of Modeldef
Code:
<Animation name="Throttle_switch" guid="7aa1733d-a25b-43c4-a58a-1d80cefeeb0d" type="Sim" typeParam2="Throttle_switch" typeParam="AutoPlay" />

Add to bottom of Modeldef
Code:
<!--             My custom project           -->

  <PartInfo>
    <Name>Throttle_switch</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(L:switch1,bool) 50 * 0 +</Code>
	<Lag>110</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
	<TooltipText>Throttle_switch</TooltipText>
        <MouseFlags>LeftSingle+RightSingle+WheelUp+WheelDown+DownRepeat</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle'  scmp 0 == if{ (L:switch1,bool) -- 0 max (>L:switch1,bool) }
        (M:Event) 'RightSingle' scmp 0 == if{ (L:switch1,bool) ++ 2 min (>L:switch1,bool) }
        (M:Event) 'WheelDown'  scmp 0 == if{ (L:switch1,bool) -- 0 max (>L:switch1,bool) }
        (M:Event) 'WheelUp' scmp 0 == if{ (L:switch1,bool) ++ 2 min (>L:switch1,bool) }
	(L:switch1,bool) 0 == if{     0 (>K:THROTTLE_SET) }
	(L:switch1,bool) 1 == if{  1021 (>K:THROTTLE_SET) }
	(L:switch1,bool) 2 == if{  5095 (>K:THROTTLE_SET) }
      </CallbackCode>
    </MouseRect>
  </PartInfo>

:stirthepo Not tested!
 
Last edited:
Thank you very very much, delivery guy!

This is exactly what I was looking for. I will use that ;)
 
Back
Top