MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

Go to page 1Go to page 112Go to page 3Go to page 2
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3519
Supporter
Hi

At first you should be carefull with "inactive" stuff.
For example the first config include a non active Compare ..... The second got a non active Precondition
And it looks like you change also the "symbols" of Placeholders whatever you not use them.

Whatever this two things are disabled...... If there is a issue or you use vealues taht no longer exist here then your whole file can be killed and you have big trouble.
So basicly its high recommend to not change things that you not need and you should not have "inactive" stuff that is not needed.
Every single option can occure in a problem if you make a mistake..... Hold your config clean and simple whenever poosible.

*************

About Config.

You say..... The LED should be Zero always if Battery is OFF .... If Battery is ON you say it should be "1" aslong original value is below or exactly 5900 and "0" in all other cases.
Summary..... If your Motor is OFF ( Oil Pressure maby 0) the LED will light..... Cause you say ALL below 5900 is 1 .... So also Original Value 0 is "1" now.

Basicly your Config should work !
Pretty sure your problem is that your "parameters" are not correct..... Must Oil LED realy be ON when Motor is OFF ? For example Hannes said something like "OFF aslong Presure is between 0 and 10 or above 6500 ..... And ON only between 11 and 6499 .

Please check the "logic" again.... The Config basicly looks good.
**************

As i recommend before..... You should make your testings more easy for beginning.

For example make at first only the LED Output ( without including the battery switch) and basicly check if the config work ok..... So if LED is ON and OFF in correct sequence.
You can test the "placeholder" logic much more easy with parking Brake Offset (instead of oil pressure) cause here you not need a difficult compare..... This is simply ON and OFF.
Good Luck !
2019-10-22 00:58
Avatar
Bazbeaumont
Posts: 11
Hi, Thanks for the response much appreciated but let me summarise as follows: -

1) The "inactive" stuff appears from nowhere and there is no documentation to explain how to deal with it. I assumed that by leaving the box "unchecked" the program would ignore that condition. The reason it is there is probably because I am still trying to get this damn thing to work. There is no actual meaningful documentation or tutorials explaining how this should be done.

2) I did not change the symbols of the placeholders that I am not using. I only changed the symbol of the placeholder that I am using. For instance I changed the top placeholder for Battery Master Switch to "A", it was # as were the other 3 placeholders all with the same symbols. Why does the software list 4 placeholders all of the same thing?
I would post a picture but this forum does not allow attachments, which is very unhelpful. How do I get rid of this "inactive" stuff

3) I have all 4 C172 warning lights working in accordance with the default C172 from FSX in P3Dv4.5 and the logic works as per the real aircraft. I do not understand your statement regarding Hannes parameters because that is not what he states. He merely states that Oil Press LED should be OFF when the value for offset 0x08BA is greater than or equal to 6500. 6500 was not the correct number for me and after studying the offset values in FSUIPC's logging facility I decided on 5900. This is more accurate in terms of the real aircraft where the Oil Press light comes on at approx 20psi. Hannes has used Pre-Conditions the details of which are not shown in his code. I was hoping he would post them but he has not. I do not understand his entry for "line" as the offset used is for the fuel capacity in the centre tank. A C172 does not have a centre tank unless I'm missing something.

4) Oil LED should be ON when engine is off for sure, but Battery Master Switch must be ON. Oil LED will be ON with Battery ON if Oil Pressure <= 20 psi with engine running.

5) The ONLY thing that does not work for me is a) When the Battery is OFF, ALL LED's should be OFF and when the Battery is without the engine running Oil, Volts and Vac lights should be ON. Fuel LED will only be ON if fuel level is below 5 US gallons, which I have managed to code.

6) I have no idea how this Parking Brake thing works, I looked at the Tutorial but it does not mention Placeholders. The tutorial in this forum https://www.mobiflight.com/forum/message/14538.html does not mention placeholders. It only configures the LED as an "output" which I fully understand.

7) Would it not be more beneficial and simpler if you just posted the code for interfacing the parking brake using the battery switch placeholder as an example for me to study.

8) It is clear that some work needs to be done on documentation for Mobiflight for those of us who are not full time software programmers.

9) How do I post an image, as a picture is always more explanatory than words.
2019-10-22 11:20
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1443
iconBazbeaumont:

Hi, Thanks for the response much appreciated but let me summarise as follows: -

1) The "inactive" stuff appears from nowhere and there is no documentation to explain how to deal with it. I assumed that by leaving the box "unchecked" the program would ignore that condition. The reason it is there is probably because I am still trying to get this damn thing to work. There is no actual meaningful documentation or tutorials explaining how this should be done.



That is correct, unchecked boxes mean inactive and will be ignored. Just be careful if you are using a placeholder that references an inactive Config - this will make MobiFlight stop.

iconBazbeaumont:


2) I did not change the symbols of the placeholders that I am not using. I only changed the symbol of the placeholder that I am using. For instance I changed the top placeholder for Battery Master Switch to "A", it was # as were the other 3 placeholders all with the same symbols. Why does the software list 4 placeholders all of the same thing?
I would post a picture but this forum does not allow attachments, which is very unhelpful. How do I get rid of this "inactive" stuff


See answer to last question on how to post a picture.
You don’t have to get rid of inactive stuff. It will not be evaluated. MF automatically prepares up to 6 preconditions for you. If you don’t need it, don’t worry about it.

iconBazbeaumont:


3) I have all 4 C172 warning lights working in accordance with the default C172 from FSX in P3Dv4.5 and the logic works as per the real aircraft. I do not understand your statement regarding Hannes parameters because that is not what he states. He merely states that Oil Press LED should be OFF when the value for offset 0x08BA is greater than or equal to 6500. 6500 was not the correct number for me and after studying the offset values in FSUIPC's logging facility I decided on 5900. This is more accurate in terms of the real aircraft where the Oil Press light comes on at approx 20psi. Hannes has used Pre-Conditions the details of which are not shown in his code. I was hoping he would post them but he has not. I do not understand his entry for "line" as the offset used is for the fuel capacity in the centre tank. A C172 does not have a centre tank unless I'm missing something.


I didn’t check the offset but maybe it is the combined amount of fuel in both tanks?
I bet Hannes will share his Config if he reads this.

iconBazbeaumont:

4) Oil LED should be ON when engine is off for sure, but Battery Master Switch must be ON. Oil LED will be ON with Battery ON if Oil Pressure <= 20 psi with engine running.

5) The ONLY thing that does not work for me is a) When the Battery is OFF, ALL LED's should be OFF and when the Battery is without the engine running Oil, Volts and Vac lights should be ON. Fuel LED will only be ON if fuel level is below 5 US gallons, which I have managed to code.


Have you tried this using preconditions?

iconBazbeaumont:

6) I have no idea how this Parking Brake thing works, I looked at the Tutorial but it does not mention Placeholders. The tutorial in this forum https://www.mobiflight.com/forum/message/14538.html does not mention placeholders. It only configures the LED as an "output" which I fully understand.


It’s totally fine to not use placeholders. I plan to provide a YouTube tutorial soon to explain how you can use placeholders in Transform and Compare which is not the original intention, placeholders are meant to be used for displaying them on a display together with other values in the first place.

iconBazbeaumont:


7) Would it not be more beneficial and simpler if you just posted the code for interfacing the parking brake using the battery switch placeholder as an example for me to study.


i bet pizman can do that. At the same time you might wanna take a look at the preconditions and see if you can use these to solve the problem.

iconBazbeaumont:


8) It is clear that some work needs to be done on documentation for Mobiflight for those of us who are not full time software programmers.


I am not a full time documentor either :-) that’s why there are some gaps.
Please check YouTube, a lot of community members have posted tutorials.
If you find that a specific topic has to be covered please point it out, let me know.

iconBazbeaumont:


9) How do I post an image, as a picture is always more explanatory than words.


The best way is to use a free hosting service like imgBB.com and use the bbCode to put your image here.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-10-22 15:00
Avatar
Bazbeaumont
Posts: 11
I didn’t check the offset but maybe it is the combined amount of fuel in both tanks?
I bet Hannes will share his Config if he reads this.


The low fuel warning has separate LED's for each tank with a FSUIPC offset for each, so there is no need to combine tank levels


4) Oil LED should be ON when engine is off for sure, but Battery Master Switch must be ON. Oil LED will be ON with Battery ON if Oil Pressure <= 20 psi with engine running.

5) The ONLY thing that does not work for me is a) When the Battery is OFF, ALL LED's should be OFF and when the Battery is without the engine running Oil, Volts and Vac lights should be ON. Fuel LED will only be ON if fuel level is below 5 US gallons, which I have managed to code.

Have you tried this using preconditions?

Yes, I initially used pre-conditions as discussed in the first couple of posts I made above. It was pizman who suggested that I use placeholders instead. See his post above.

6) I have no idea how this Parking Brake thing works, I looked at the Tutorial but it does not mention Placeholders. The tutorial in this forum https://www.mobiflight.com/forum/message/14538.html does not mention placeholders. It only configures the LED as an "output" which I fully understand.

It’s totally fine to not use placeholders. I plan to provide a YouTube tutorial soon to explain how you can use placeholders in Transform and Compare which is not the original intention, placeholders are meant to be used for displaying them on a display together with other values in the first place.

That's interesting, if placeholders were not specifically designed for this purpose why are we being encouraged to use them.

I will have another look at using pre-conditions but as I stated earlier Hanne posted some code with pre-conditions but didn't post the code FOR the pre-conditions. That would have made life much easier I think.

I look forward to seeing your Youtube tutorial because, to date I have discovered very little that explains what has to be done with placeholders or pre-conditions.
2019-10-22 16:55
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3519
Supporter
Hi Again

I will also comment some of your points.

@ 1 / 2
I did a mistake..... In older versions the placeholders got different symbols by default..... Looks like in newest release they get filled all with same symbol by default.
Sorry about that..... For me it looks like you cange it.
Basicly Sebastian already said.... THIS is not a real problem.... Whatever im a bit conservative and always recommend a "tidy" system. If you got no error warnings you can pretty sure let those inactive stuff as it is.... I personaly will "cleanup" that stuff just to prevent maby a 1:1000 situation when there is a problem then.

@ 3 /4
I not use a Cessna myself ( B737 forever :love: ) ..... So i not know myself when those Warning lights must be ON or OFF . The value i told you from Hannes was from a personal WhatsApp Conversation.... He ask me for a formula that let the LED be OFF if Oil Pressure Value is below "11" So it looks for me he want a system where the LED is OFF in case of a "Engine OFF" Situation.
I just "copy/paste" his data to you..... So i not know if LED must be ON in the "Engine OFF Status".... And i also not know if <6500 is more logical as <5900.
So those "Values" and the logic of that LED´s in a "Real" Aircraft is out of my knowledge..... I Just give you formulas for the final Optics the Users request to me

@ 5
As i said your config looks good to me..... I Not unserstand basicly whats the issue by reading this code part. Normaly it should do exactly what you request for.

@ 6
Here you missunderstand. The new "Variable-Placeholder System" is not explaned there ( I never said that) .
What i mean is taht you can test and learn the use of that Formula ( to including Battery Switch as a condition) much more easy with a "basic" Offset. And the most basic Offset we know is Parking Brake.
As i try to explane above..... With your current Setup you will include the Battery switch for the Oil Pressure LED..... And you need to make a compare for the Oil Value that LED is only ON in special conditions like lower PSI and so on.
Now your config is not work perfect.... Your LED is maby ON whatever it should be OFF. But you currently can not "see" if the problem is the Battery condition or if problem is maby the wrong compare logic. Additional its maby not verry confortable to change Oil Pressure in Sim to "create" the Situation you like to test.

If you use now Parking Brake Offset instead of Oil Pressure ( For testing only) then you have 2 big benefits .
- Parking brake have only 2 possible Outputs ON/OFF or 1/0 ( instead of Oil Pressure that have a big range of Value) . You not need Compares here.
- Parking brake can be toggle with a simple press to a button / keyboard key or by click with mouse. So for testing the Config you not must change the oil pressure by a difficult precedure.... You can simply release brake and check if your LED do what it should do.

Summary.... I MEan you should use a easy spot ( like parking brake LED Output) to basicly underatand and test the "Battery switch Condition" . If it work THERE then it also work in every other config when you use the same Formula and Placeholder.

@ 7 / 8
I´m sorry but i not find time to write tutorials and documentations till now. Also "Placeholder" is pretty new and come up 3 weeks ago. It will take time until we can provide a good manual here.
As Sebastian said..... For Precondition there is a basic information in Manual and you find hundret of topics with search to understand it. If you realy struggle with placeholder tool simply swap to preconditions !


******************
At last.
I not like it if a user feel sad and can not solve a problem.
Whatever my time is limmited i offer you to startup a personal contact.
Write me a mail pizman@freenet.de
I Try to reply as soon as possible.
Pretty sure we find a way that all work fine for you finaly.
Good Luck !
2019-10-22 17:04
Go to page 1Go to page 112Go to page 3Go to page 2