Jump to content
The simFlight Network Forums

GFDisplay Condition Limitations


Recommended Posts

My overall purpose for this is to have an LED light up when the aircraft is properly configured for Flight.

The manual for GFDisplay states I can have up to 8 true AND 8 False conditions on a line. I've setup all my conditions to be true. So I have trunicated lines by creating more condition lines. For example...

[Conditions]
0=X2A48 F64 *100 =100 ;    Left Wing Folded
1=!C0 X2A48 F64 *100 !=0 ; Left Wing in Motion
2=X2A48 F64 =0 ;           Left Wing Extended
3=X2A50 F64 *100 =100 ;    Right Wing Folded
4=!C3 X2A50 F64 *100 !=0 ; Right Wing in Motion
5=X2A50 F64 =0 ;           Right Wing Extended
6=X3BA0 F64 *100 =100 ;    Hook Extended
7=!C6 X3BA0 F64 *100 !=0 ; Hook Moving
8=X3BA0 F64 =0 ;           Hook Retracted
9=X0AEC U8 =1 ;            Aircraft has 1 Engine
10=X0AEC U8 =2;            Aircraft has 2 Engines
11=X0AEC U8 =3;            Aircraft has 3 Engines
12=X0AEC U8 =4;            Aircraft has 4 Engines
13=X0366 U8 =1;            A/C on ground
14=X3367 U8 =0;            Doors closed
15=X3104 U8 =1;            Fuel Pump On
16=X0894 U16 =1;           Engine 1 Running
17=X092C U16 =1;           Engine 2 Running
18=X09C4 U16 =1;           Engine 3 Running
19=X0A5C U16 =1;           Engine 4 Running
20=X0609 U8 =0;            Piston Engine
21=X0609 U8 =1;            Jet Engine
22=X0609 U8 =5;            TurboProp Engine
23=X088E U16 >15000;       Eng 1 Prop Pitch Full
24=X0926 U16 >15000;       Eng 2 Prop Pitch Full
25=X09BE U16 >15000;       Eng 3 Prop Pitch Full
26=X0A56 U16 >15000;       Eng 4 Prop Pitch Full
27=X0890 U16 >12500;       Eng 1 Fuel Mix Rich  
28=X0928 U16 >12500;       Eng 2 Fuel Mix Rich  
29=X09C0 U16 >12500;       Eng 3 Fuel Mix Rich  
30=X0A58 U16 >12500;       Eng 4 Fuel Mix Rich  
31=C13 C14 C2 C5 C8 C15 =1;On Gnd, Door Closed, Wings Ext, Hook Ret, Pump On
32=C16 =1;                 Engine Running 
33=C16 C17 =1;             Both Engines Running 
34=C16 C17 C18 =1;         All 3 Engines Running 
35=C16 C17 C18 C19 =1;     All 4 Engines Running 
36=C23 =1;                 Engine Prop Pitch Full 
37=C23 C24 =1;             Both Engines Prop Pitch Full 
38=C23 C24 C25 =1;         All 3 Engines Prop Pitch Full 
39=C23 C24 C25 C26 =1;     All 4 Engines Prop Pitch Full 

40=C27 =1;                 Engine Fuel Mix Full 
41=C27 C28 =1;             Both Engines Fuel Mix Full 
42=C27 C28 C29 =1;         All 3 Engines Fuel Mix Full 
43=C27 C28 C29 C30 =1;     All 4 Engines Fuel Mix Full 

[GFP8.1]
Needs=B E
L3.1=!C13 =0
L3.2=C13 !C14 =1 Fslow
L3.3=C31 C20 C9 C32 C36 C40 =1 
L3.4=0

For my example, L3.3 has six conditions, however, C31 also has six conditions. This seems to be working... for the most part.

When all conditions are met, The LED lights up. However, when I don't meet a condition (Turning off the Fuel Pump for example), the LED does not go out.

Am I using L3.4=0 incorrectly? If I resave the GFDisplay.ini file, the LED goes out. And when I meet all conditions the LED does come back on, but when I don't meet the conditions, the LED does not go out.

It's my understanding that if there are no lines where all conditions are true, processing will continue to the next line until it sees L3.4=0, which should turn off the LED. Please correct me if I'm wrong.

I also understand that when a line has all true conditions, the remaining lines are skipped. So I know the importance of having thing in the correct order when applicable.

I've checked and fiddled and re-checked. I just can't seem to find the problem.

Thanks for your time,

Joe

Link to comment
Share on other sites

I've moved C15 into the Unit section for a direct comparison. When I shut it off, the LED goes out.

So it seems that when a condition, within a condition, changes from true to false, it's somehow not getting noticed.

Here's what I'm doing, only focusing on the Fuel Pump and Prop Pitch.

1. With the pump on and the pitch is max, the LED comes on. OK

2. Moving pitch to min, LED stays on. SHOULD GO OFF

3. Resave ini file. LED goes out. OK

4. Move pitch to max, LED goes on. OK

5. Turn Pump off, LED goes out. OK

6. Move pitch to min then turn pump on, LED goes on. SHOULD STAY OFF

Link to comment
Share on other sites

L3.1=!C13 =0
L3.2=C13 !C14 =1 Fslow
L3.3=C31 C20 C9 C32 C36 C40 =1 
L3.4=0

You seem to have developed a style of programming which rests entirely on conditions rather than using the facilities the way I intended. I'm not sure what to make of it to be honest, though it is "within the rules" and so should workhmmm . The prime programming method was intended to rest with the details you could enter into the main parameter lines. You have no details in the main parameter lines at all. :wink:

For my example, L3.3 has six conditions, however, C31 also has six conditions.

They aren't additive. Each line is computed in its own right, in sequence, conditions first then each unit in turn.

When all conditions are met, The LED lights up. However, when I don't meet a condition (Turning off the Fuel Pump for example), the LED does not go out.

Strange.

Am I using L3.4=0 incorrectly? If I resave the GFDisplay.ini file, the LED goes out. And when I meet all conditions the LED does come back on, but when I don't meet the conditions, the LED does not go out.

It's my understanding that if there are no lines where all conditions are true, processing will continue to the next line until it sees L3.4=0, which should turn off the LED. Please correct me if I'm wrong.

I also understand that when a line has all true conditions, the remaining lines are skipped. So I know the importance of having thing in the correct order when applicable.

All that seems to be understood correctly, yes, but you could try "L3.4==0" just in case -- the first = is absorbed by the Windows INI file system, so the parameter looks like just '0', which should be okay, but literal values would normally be "=0", so it is worth trying.

I've checked and fiddled and re-checked. I just can't seem to find the problem.

Maybe there's a bug. I don't know -- I'm going to have to use your example and trace it through, see what I can find. Unfortunately I'm tied up 100% until Tuesday. Sorry. I promise I'll look at it as soon as I can though.

Regards,

Pete

Link to comment
Share on other sites

I've moved C15 into the Unit section for a direct comparison. When I shut it off, the LED goes out.

So it seems that when a condition, within a condition, changes from true to false, it's somehow not getting noticed.

Aha! Good find!

In fact, that is correct. The conditions in the [Conditions] section operate just like the Conditions in the main unit section. Your line:

31=C13 C14 C2 C5 C8 C15 =1

says to make condition 31 "TRUE" when all those conditions are true. But if any one of them are not true, the line is ignored. There's nothing to make that condition "false". In the unit section this would simply mean the next line for the same display being checked, but there are no sequences of lines for conditions.

This is actually a correct logical result of the design philosophy, but I can see now that it is a problem. With conditions you actually want them initialised to "FALSE" at the beginning of each pass -- this is different to displays.

I'll take a look this morning. If it is easy to fix I should be able to get a revision to you today.

Regards,

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.