Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Roman,

ok. I tried and in mobiflight you can set the value Type Int - Float - String. Work with String but show only the number part without == until 900 after the display is perfect show correctly 1000 - 2000 and so on...

there is another option Substring from 0 to 7 not check. Same problem with VS.  I Attach some pictures. I noted also that if you cold and dark the display remain ON is possible to use a precondition like if APU and GPU are ON display shown (Usually there is a time about 5-10 seconds after bus are ON). many thanks.

Roman_ALT1.JPG

Roman_ALT2.JPG

Roman_ALT3.JPG

Roman_ALT4.JPG

Posted

Simone,

Looked at the mobiflight documentation..
It seems it does not have support for greater than a 7 segment display.  (???)
That means using the string build in lua will not work.. Neither will the "substring" settings in mobiflight.

I did however, reassign the offsets again.. 😞 
This was in order to keep the lua available to anyone with all features, offsets in order and not conflicting, they can mod as wanted.
The offsets for the FGCP are now as follows  -
SPD = 0x6908 as UD
HDG = 0x690C as UD
VS = 0x6910 as SD
ALT = 0x6904 as UD
In mobiflight use them as integers and use the built in settings for any padding or preceding zeros as needed. 
---------------------------------------------------------------------------------------------------------------------------------
As for the FGCP being powered a separate lua is provided with an adjustable timer. (my boot up time was 22 seconds)
The FGCP is on the left DC bus and it monitors that regardless on how it gets powered up (l, r gens, ac bus tied or not, apu tied or not etc..)  
It must be on a separate lua because of the time delay, otherwise it would cause the MADDOG_X lua to become unresponsive in that time period.
Use [Auto] in the fsuipc5.ini to have it start automatically.

FGCP POWERED UP = 0x6914 as UD (1 = powered and ready, 0 = not powered) 
I believe you can use the mobiflight software to configure this --> FSUIPC --> (each display set - SPD, HDG, VS, ALT) --> Pre-Condition Tab  
Do not use the the "string" version of MADDOG_X.lua with this.. It will interfere.

Roman

MADDOG_X.lua

MD_FGCP_PWR.lua

Posted

thank you Roman,

in the ini need to use them or only the mddog_X?


[LuaFiles]
1=MADDOG_X
2=MD_FGCP_PWR

[Auto]
1=Lua MADDOG_X
2=Lua MD_FGCP_PWR

 

Posted

Roman,

dont work, no signs == and no power up.

1. add new Lua on the fsuipc and assign .ini like up.

2 in the mobiflight, for the ALT we have now:

 

 

 

 

Roman_1.JPG

Roman_2.JPG

Roman_3.JPG

Posted

Simone,

I have re-checked all the offsets to make sure they work properly - they do..
It is now up to mobiflight to set up properly. Looked at the online manual again.
I think it has to do with the precondition tab, without having the software it is difficult to tell.
Referring to the online manual I think (??) your setup should look like the following picture..

Also.. I made a mistake - oops.
Spent a little time actually flying that hound dog. :) 
The FGCP is actually powered by the left AC bus not the left DC - the FMA relies on the left DC. 
That means both left AC & DC buses must be powered for proper AP, no matter though, if the left AC bus is powered in any way so will the left DC.
But... The left DC can be powered without left AC if the right AC is powered and the DC buses are tied. In this case only the FMA is powered, the FGCP is not.
A new, tested lua is attached.

A tip.. In the MD_FGCP_PWR.lua, change the timer setting to 1 for easier testing with the left AC bus.
Return it to a value as wanted (22 ?) afterwards. Ex.
local timer = 1


Sorry, can't help much more..
Roman

mobiflight_ex.jpg.f61cd5a55d3b582ed5f1ae05d32b71fb.jpg

MD_FGCP_PWR.lua

Posted

Roman, 

Roman,
I double checked everything but there are these problems:
1. the digits of the altitude do not show the values == not even in the output values in FSUIPC (what you see in mobiflight is what I see in the digit displays).

When you are in ==000 you will see 0000. (like he dont recognize the symbol = ?)
ALT_2704.thumb.JPG.d11bd410b53f64c5192f9741e6937d4f.JPG

2. the VS shows -800 instead should be -0800 (from -1000 is correct)
2704_VS.thumb.JPG.bd5e4fac07c996850dcb3b1a8f6b1693.JPG

 

3. the totally absent alphanumeric V S P or M

for the precondition, I tried to see but there is not an offset list but it gives you the possibility to choose its display or an output that is configured as a LED test with the following conditions

> = < !

2704_precondtion.JPG.81200bfde1e59c5b8f4a227e7d39419e.JPG

 

i don't know about Int value because yesterday before last Maddog_X lua and in string mode fsuipc showed us (without show in the digit) the correct values:

ALT_string.JPG.c037bdc0ce74f06c43b9b6ae9d4db605.JPGALT_string2.JPG.b510eabadbad3625ee678937bf3568e8.JPG

 

 

Posted

Simone,

I edited this post above .. Mainly added a new MD_FGCP_PWR.lua with proper bus use.

Here is my question..
Why even worry about the V, S, P, M, ==, or = when mobiflight does not support any thing greater than a 7 segment display? (that is probably why mobiflight shows a "?" in the value fields)
There will be nothing to show.
That is why I took out all the strings in the lua, in this post and returned to just numeric, leaving it up to mobiflight to zero precede or padding.

Another question..
Are you using any other part of the MADDOG.lua other than the FGCP things?

Roman

Posted

Thank you Roman,

nw is clear, so in order to have the VSPM and == need to pass to another system? or make a specific script without mobiflight?

Yes! i use all of maddog in my home cockpit, real parts like overhead. There is others Lvars to estrapolate? in the fgcp missing radionavs and CRS.

OH - Lvars to move the gauges? i noted that for example there is a APU_needle and work very fine but is for the small indicator inside the APU gauge. I need to move the big indicator 

inside the same APU gauge. METAR CUR is perfect....are ou able to find other guages Lvars?

 

MIP: there are some other leds in the engine panel ART switch, the digit for the fuel quantity and the leds about SLAT indicators...is possible to have them?

Many thanks for your superb work!

Posted

The problem of FGCP power is not resolved.

The offset creates the condition 0x6914 AC BUS LEFT is the same when Maddog is "cold and dark" 0  or  "ready to start or to fly" need to show 1 in the mobiflight window. But also with the procedure start battery apu and AC bud left the offet show zero.

precondition3.thumb.JPG.d5a8b51e15edf6bba39656621158ce46.JPG

i found this topic with identical problem: https://www.mobiflight.com/forum/topic/530.html

I create like it not a precondition in the 7SEGMENT TEST but in 1 first output call FGCP_POWER_0 and put the precondition with offset to = 1.

precondition1.JPG.06b32a3bb3f1b697828ef046f1202f19.JPG

the opposite output power 0:

precondition2.JPG.5a1e4cb95f0efcc10f5537327698f4ba.JPG

 

now the mobiflight show me the identical problem like the topic "!" precondition are not satisfy.

😞

 

precondition1.JPG

Posted

Simone,

I think you are getting close but missing one point..
You are applying the/a condition to FGCP Power Interface! A condition to itself..

1) Keep FGCP Power Interface as a mapping.. (main screen, you will only need 1)
2) Select the properties of FGCP Power Interface --> Precondition tab. REMOVE ALL PRECONDITIONS! - click apply then OK
3) On main window select 7SEGMENT TEST --> Edit
4) In the Precondition Tab remove all preconditions you have now, just in case.
5) Add a new precondition -->Logic = AND, Type  = Config Item, Choose config = FGCP Power Interface,  Current Value = equal, 1
6) Click Apply then OK
7) Repeat steps 3 thru 6 except using the properties for 7SEGMENT TEST2 --> Edit --> Precondition Tab

Did you adjust local timer = # in the MD_FGCP_PWR.lua so you do not have to wait 22 seconds for FGCP boot up?
If not, change temporarily to 1 for easier testing.


I also missed something, the left AC bus being powered by APU.. For testing make sure you have the engines running and toggle left generator on/off.
Will have a modded MD_FGCP_PWR.lua to include the APU only in a short time.

Roman
 

Posted

Roman, nothing.

The digit state off with no values if the precondition is =1 with "!" precondition are not satisfied.

If I change with value 0 the precondition the digit turn normal (but remain every time on).

YEs, i change local time to=1

But, is correct the offset 0x6914?? I don't see the value 1 when maddog go to cold and dark? don't change 1 remain every time 0.

 

2804_precondtion.JPG

2804_precondtion_1.JPG

Posted

6914 is correct.
Do not use the APU for testing! Start left engine and use left generator until I get the lua fixed. 
It may not be until early next week.
If it still doesn't show in mobiflight then the lua isn't being started.

Roman

 

Posted

Simone,

Attached is the new power lua, fully tested and now includes APU or Ground Power affecting the left AC bus - sorry about that.. 😞

Note - If both APU and Ground Power are available, left ground power switch is on, left APU switch on, then you toggle the left APU switch off it may cause a reboot of the AP, FMA & FGCP.
No real way to get around this - it is because one relay opens and one relay closes, not exact timing.. In real life I believe the same thing would happen. In reality not a normal procedure anyways.

Also the timing is already set to 1 second for you..

Good luck with the mobiflight thing - I believe you are really close to getting this working.
Next week I will search for the APU needles for you..

Roman

MD_FGCP_PWR.lua

Posted

Roman,

Now the offset is read correctly from Fsuipc. However, I am noticing that it does not always change to 0 when the aircraft is completely off, but often it remains at 1. So very often from a cold and dark condition you are able to satisfy condition 1 when you turn on the AC bus and the displays switch to an ON state, the opposite is never true when you turn it OFF and the displays remain lit when the condition is not satisfied in mobiflight (inserts the "!" error point).

I tried also like the topic with a duplicate precondition with opposite value =0 but with this the displays remain everytime OFF.

 

Posted

Does the "output value" column (main page in mobiflight) for FGSP_Pwr show correctly?
1 when powered
0 when cold and dark  

If it does then it is all mobiflight then, cant help much more - dont have it.

Just went through another complete test, toggling the left AC bus on each step, the lua seems to work fine.
Cold & Dark --> Batt On --> Ground Connect --> APU start --> Ground Disconnect --> Engine(s) Start --> Generators --> AC/DC bus ties --> Engine Stop --> APU --> Ground Connect --> APU Stop --> Ground Disconnect --> Batt Off --> Cold & Dark

Posted

Exact Roman, 

6 hours ago, spokes2112 said:

Does the "output value" column (main page in mobiflight) for FGSP_Pwr show correctly?
1 when powered
0 when cold and dark  

when powered 1 yes correct, when cold and dark 0 and its ok. but in the digit remain ON. the problem is similar on topi shew last day in which is necessary to duplicate the precondition with opposite = 0...but not work 😞

I will investigate with the mobiflight team because of the problem i here and not from your .Lua.

  • Upvote 1
Posted

Simone,

I looked through the topics over at mobiflight and did some studying..
May have found something that will work but you would have to make some compromises.
Much, much easier than going to a 14 or 16 segment display.

By going back to strings in the lua I would be able to take care of the following:
1) VS - negative sign with preceeding zeros
2) the power problem! NO MORE PRECONDITIONS :), the 7 segment using MAX7219 allows blanks. 
3) no more paddings or preceeding zeros
4) ALT - an alternative to the "==" instead use "--", the MD doesn't have negative altitude so no big deal
5) VS - instead of "S, M, P or V" it would be "5, 5, P, H" ( note.. a 5 in a 7 segment is the same as "S" ) the H would represent "height".

Below is a chart of the legal characters in a 7 segment display using the MAX7219 chip.

Before I start - would you like to go in this direction

MAX7219_Legal_Chars.jpg

 

 

Posted

My god Roman,

very excited with work you will do!!!

For the FGSP I found the solution with duplicate and opposite precondition and work. But for sure, if you find a better solution.TOP!

thanks,

Simone

  • 3 weeks later...
Posted

Simone,

It has been a while.. Quite busy.
There is a completely redone "string style" FGCP lua in this package.
If there is no power the strings become blank.
As long as mobiflight accepts everything possible in the MAX7219 chipset then this should work fine. 
It also includes some of the new l:vars you requested plus some new "helpful" offsets for integration.
Also includes options so it can be configured for your current hardware and possibly new hardware.
Unfortunately the offset addresses for the displays have changed... again 😞

Must tell you - If this Maddog_X lua is to be expanded any further it should be re-written and all offsets changed.
The use of a 32 bit dword for a single boolean is just absurd, should be able to stick 8 l:vars into just 1 byte with the use of mobi flight masking, just my thoughts. 

Roman
 

Posted

Hi Roman,

thank you very much for your precious help.

sorry, I ready now the conversation.

For the future is better to spoke in skype or by mail? do you have it?

 

Simone

 

 

 

 

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.