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

Overspeed will not flag

Messages
10,163
Country
us-arizona
Hey all,

I am trying to get a blinky-light and alarm to sound when overspeed occurs. For some reason, it will not work.

This is the code for the blinky....

Code:
<!--  ** Over Speed **  -->

   <Element>
      <Position X="601" Y="5"/>
         <Visible>
           (A:Electrical Master Battery, bool) 1 == if{
              (A:AIRSPEED INDICATED,knots) 340 &gt; }
         </Visible>
      <Image Name="Annun_Over_Speed" ImageSizes="60,38">
      </Image>
   </Element>

Note this also had (A:OVERSPEED WARNING,bool) and did nothing.

Also, the blinky refuses to 'not blink' which is odd as I use this on many codes and it works fine, but in this case, when you boot into the flight, its already blinking...




This is the Alarm sound code, hidden gauge.

Code:
<!-- OVERSPEED WARNING ALARM -->

      (A:Electrical Master Battery, bool) 1 ==
             if{ (A:AIRSPEED INDICATED,knots) 340 &gt; 
              if{ 2 (&gt;L:XMLSND167,enum) }
             els{ 3 (&gt;L:XMLSND167,enum) } }

And note that I 'did' have this in there,
(A:OVERSPEED WARNING,bool) which did nothing...
 
Code:
        <Visible>
           (A:Electrical Master Battery, bool)
           (A:AIRSPEED INDICATED,knots) 340 &gt;
           and
         </Visible>


same goes for your second code
 
You have your logic all messed up. You are saying:

"if master battery = 1 then test if the indicated airspeed is greater than 340"

There is nothing that turns on the light. (It is probably on all the time?).

I assume you want something like:

Code:
<!-- ** Over Speed ** -->
<Element>
   <Position X="601" Y="5"/>
     <Visible>
       (A:Electrical Master Battery, bool) 1 ==  (A:AIRSPEED INDICATED,knots) 340 &gt and
     </Visible>
   <Image Name="Annun_Over_Speed" ImageSizes="60,38">
   </Image>
</Element>

and:

Code:
<!-- OVERSPEED WARNING ALARM -->
(A:Electrical Master Battery, bool) 1 == (A:AIRSPEED INDICATED,knots) 340 &gt; and
   if{ 2 (&gt;L:XMLSND167,enum) }
   els{ 3 (&gt;L:XMLSND167,enum) }
 
lolol... arrgh.. I knew better. I forgot the 'and'.

Reminds me of that movie; 'Dude, Where Is My Car?'... Chinese restaurant drive through seen... 'And...? And....? AND THEN? AND THEN???????'
 
Nope.. Still not working (with Overspeed stock code).

Thanks though for the heads up on the 'and'.
 
And is there some reason you cannot put the sound and light commands together in a single Element? More compact that way.
 
Hey Tom,

This is it;

Code:
<!-- OVERSPEED WARNING ALARM -->

      (A:Electrical Master Battery, bool) 1 ==
      (A:OVERSPEED WARNING,bool) 1 == and
              if{ 2 (&gt;L:XMLSND167,enum) } 
             els{ 3 (&gt;L:XMLSND167,enum) }


Code:
<!--  ** Over Speed **  -->

   <Element>
      <Position X="601" Y="5"/>
         <Visible>
           (A:Electrical Master Battery, bool) 1 
           (A:OVERSPEED WARNING,bool) 1 ==  
           (P:Absolute time,seconds) 2 % 1 > ! and
         </Visible>
      <Image Name="Annun_Over_Speed" ImageSizes="60,38">
      </Image>
   </Element>


The 2D light has a blinky string in it, works perfect.

NOTE: The sound version is in a gauge that is a 'update', all the codes in it are live to ensure no hesitation or nonfunctionality after a period of no use. All the sounds work on that gauge (the update gauge) but the Overspeed.

Bill
 
Bill, do you use L:XMLSND167 in another place of your panel so that you can assure it works ok?

If not, as a test, why don't you replace that sound with another you know works fine?

Anyway, you could test all-in-one, like this:

Code:
<Element>
   <Position X="601" Y="5"/>
   <Visible>
      (A:Electrical Master Battery, bool) 1
      (A:OVERSPEED WARNING,bool) 1 ==
      (P:Absolute time,seconds) 2 % 1 > ! and
   </Visible>
   <Image Name="Annun_Over_Speed" ImageSizes="60,38"/>
   <Select>
       <Value>
          (A:Electrical Master Battery, bool) 1 ==
          (A:OVERSPEED WARNING,bool) 1 == and
           if{ 2 (&gt;L:XMLSND167,enum) }
           els{ 3 (&gt;L:XMLSND167,enum) }
       </Value>
   </Select>
</Element>

Tom
 
Ahhh soo.....! It might be the sound file. Thanks Tom! Why didnt I think of that. I'll do a test.



Bill
 
It was the sound file. No matter what I do, importing the sound as a different type, adding it into a functioning other sound file, etc, and re-exporting, the file will NOT work in FSX/P3D. Man.... That is crazy. Such a cool alarm sound as well.

Thanks Tom for that. I have a new sound in use now and it is working brilliant.


Bill
 
Back
Top