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

FSXA "OR" : ?

Messages
150
Country
england
I'm trying to get a bmp to show when 1 or 2 or 3 or 4 of 4 conditions are met.
My code ignores parts and i struggle to see why.
Its an engine information system, and the spark plug foul detection. If one of the four engines begin to foul, an exclamation warning symbol appears on-screen

Ive tried a few(many) attempts but i can only get 1 and 3, or 1 and 4 , or 2 and 3 ect to work.

Current code thats making 1 and 3 work :

XML:
<!-- Warning Exclamation -->
<Element>
<Visible>
(L:Engine1_Foul_Factor) 0.03 &gt; 
(L:Engine2_Foul_Factor) 0.03 &gt; or if{ 1 (>L:Warning,bool) } els{ 0 (>L:Warning,bool) } 
(L:Engine3_Foul_Factor) 0.03 &gt; 
(L:Engine4_Foul_Factor) 0.03 &gt; or if{ 1 (>L:Warning,bool) } els{ 0 (>L:Warning,bool) } </Visible>
<Position X="137" Y="85" />
<Image Name="WarningExclamationMark.bmp" Bright="Yes" />
</Element>

Ive tried '|' and '||' and 'or' also. Im guessing its my syntax

Can anyone see my error?

Many thanks
 
Messages
495
Country
austria
Code:
(L:Engine1_Foul_Factor)

 try to add a unit
 
 (L:Engine1_Foul_Factor,number)
 or
 (L:Engine1_Foul_Factor,percent)

of course by all L: variablen;)
 
Messages
258
Country
ireland
I would try the following to get the light to show:

Code:
<!-- Warning Exclamation -->
<Element>
<Visible>
(L:Engine1_Foul_Factor,number) 0.03 &gt;
(L:Engine2_Foul_Factor,number) 0.03 &gt;
(L:Engine3_Foul_Factor,number) 0.03 &gt;
(L:Engine4_Foul_Factor,number) 0.03 &gt; or or or
</Visible>
<Position X="137" Y="85" />
<Image Name="WarningExclamationMark.bmp" Bright="Yes" />
</Element>

(L:Warning,bool) would have to be set elsewhere, though it doesn't appear to be used in the original code above



Not tested by me...

Walter
 
Last edited:
Messages
150
Country
england
@EduHir
@BaiterOne

Thanks for the replies gents.
So, adding a unit(number), did not work, but with the units removed, and using Walter's code, did.

But i think i will need to take another approach as the results are not what i was after. i may need to use a case construct because :
how it works ;
all is 'OK' > 'Standby...' is on the screen
Eng1 begins to foul > Standby dissapears and the exlamation appears on screen.
The Acknowledge button is clicked to take you to the information page.

AS per the real world manual:

''The Alarms – The most important part! The instrument's alarm function will alert you to out-of-limit conditions by flashing the warning light (to get your attention), and simultaneously changing pages to a labeled screen and flashing the reading above its label to identify it. If the problem can not be fixed immediately, the alarm should be acknowledged by pressing the “Next/Ack” button on the EIS''

*** I'm simulating a slightly different approach here, - a button needs to be clicked to take you to the info page***

BUT, when going to the info page, the exclamation is still showing, in the background. so i feel i need to be able to use a 'if' condition that the above element wont allow. (Will it?)

of all the panels i;ve made, this 'OR' business is all new to me :) so i'm not 100% on how to manipulate it.
 
Messages
258
Country
ireland
Hi Maddz, it was a minor miracle (maybe even a major miracle!) that my code worked if there were no units for the Lvars.

I read the description of the alarms, I didn't quite get it.

I presume for instance if an engine has fouling then nothing the pilot can do in the cockpit is going to change the situation, therefore the alarm should not be cancelled.

I wrote some XML, put it together with a few bmps and used it to try out the conditions that were causing you angst above.

I attach it so that you try it out yourself, if you want to.

You can let us know what exactly is required when an engine is fouled, what alarms should show, what actions are to be taken and so on.

I put it in as a popup gauge.

Use the areas at the top of the gauge to increase fouling in the required engine(s), the mousewheel will do it.

When any engine goes above 0.03 the ! sign will come on.

Not very realistic I suppose, but you can then use the same area to decrease the fouling, and therefore return the gauge to standby.

Here is the entry for the popup gauge

Code:
[Window03]
background_color=0,0,0
size_mm=600,300
window_size_ratio=1.0
position=0
visible=1
ident=10192
zorder=20

gauge01=EngineFouling!EngineFouling,                        0,0,600,300

I attach a zip of the gauge xml and bmps.

Just extract it into your gauges directory.

I use P3DV5 and it works satisfactorily there.

This gauge is very simple and the bmps are crappy, but it demonstrates the theory and will allow further testing without involving and maybe messing up your own gauge.


Walter
 

Attachments

  • EngineFouling.zip
    5.9 KB · Views: 53
Messages
150
Country
england
Wow, Thanks Walter!
Yes it is strange about the units - but using number as an index gave no results. ( its for an A2A aircraft thats using that Lvar)
~the alarm thing ~ fouling would occur on ground with low idle - pilot needs to increase RPM to resolve.
I've currently started building the gauge. using a real world image of the system:

DIGIbackground3.jpg


working on engine 1 today with warnings and page selection :banghead: - getting there slowly. satisfactory results for first few hours.
Its going to be a loong road, with a 4 engine aircraft 🥵
 
Top