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! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
pluckas
Posts: 104
Supporter
Is it possible to map a switch in mobiflight to start an application? Would this fall within the LUA script world?
2020-01-15 10:22
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
More Details.

What Application..... A Self Running Programm in Windows ?? A PlugIn in Sim ??

Basicly Mobiflight do the follow by a Input.
-Write a FSUIOC Offset
-Send a EventID
-Simulate a Keypress or a JoyButton via VJOY
-Trigger a LUA Macro within FSUIPC

So to awnser without know your programm..... Mobiflight can do this IF the needed programm can be start by one of the possible Input Typs i tell you.
Good Luck !
2020-01-15 11:33
Avatar
pluckas
Posts: 104
Supporter
Thanks Piz,

Okay - more detail.

I have an MCP and EFIS combo from Virtual Avionics. Their software works very well with PMDG, but currently does not link to battery power state. I can simulate the on/off state by starting and stopping the VA software from within Windows. It works very well actually - much like cutting power would do from the battery switch.

What I'd like to do is assign a switch to this (preferably within Mobiflight, and preferably my current BAT switch). If it were possible to assign an additional offset that mapped programmatically to 'starting' or 'exiting' a Windows application, that would be perfect, but I don't think this is possible within FSUIPC. (FSUIPC can start and stop applications as part of Flight Simulator startup and shutdown, but not within a running session).

Any other ideas on how I could tackle this?
2020-01-29 01:52
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi plukas,

I have the same combination from VA and they work together with PMDG. The Backlight is also working well with PMDG and if I start from cold&dark modus all displays are off. So if the Glare is powered MIP and EFIS are also powered. I do not need a separated switch.
Grüße,
Stephan (Time: UTC+2)
2020-01-29 10:45
Avatar
pluckas
Posts: 104
Supporter
Hi Stephan,

What version of VA interface are you using? If I start from cold and dark (using the PMDG preset) my backlighting is off, but my segments are still on. Plus, the only reason the backlighting is off is because in the PMDG cold and dark preset, the panel dimmer switch is 'zeroed'.

So - ignoring the PMDG cold and dark preset, what happens if you shut down the aircraft manually - ie, disconnect ground power and switch the battery off? Does the MCP and EFIS go completely black?

Paul
2020-01-29 12:55
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi Paul,

I use VA-Interface 2.27.0.66.
When starting the VA interface before the Sim, then the displays are on, but no backlight. When starting the Sim with c&d-modus, all gets off, after the sim is ready.
If you wait, starting the VA-interface until your Sim is ready and the PMDG is c&d has finished the countdown, then the displays light up for ca. 0,3 sec and become dark.

When shutting down, it's the same. If battery switch is off, MCP also.
Grüße,
Stephan (Time: UTC+2)
2020-01-29 14:26
Avatar
pluckas
Posts: 104
Supporter
Hi Stephan,

That's not my experience so far but I'll take a look at this process. Out of curiosity, do you have the powerlogic call enabled in the vainterface.ini file?

Thanks for your reply.
Paul
2020-01-29 15:16
Avatar
pluckas
Posts: 104
Supporter
Hi again Stephan,

This isn't working for me. With powerlogic=1, I can reproduce the c&d startup sequence you describe. However, turning off the battery does not shut down the MCP.

I've logged a call with VA. It seems like it should work.

Thanks again,

Paul
2020-01-29 15:59
Avatar
pluckas
Posts: 104
Supporter
iconStephanHo:

Hi plukas,

I have the same combination from VA and they work together with PMDG. The Backlight is also working well with PMDG and if I start from cold&dark modus all displays are off. So if the Glare is powered MIP and EFIS are also powered. I do not need a separated switch.



Hi Stephan,

I'd be interested to know if you have any additional items in your vainterface.ini file. I re-installed version 2.27. The MCP powers down with BAT off (actually, the segments go off first with GRD or APU off - as expected - then the backlight with BAT off. But, BAT On does not turn the backlight back on. I need to 'touch' the virtual Main Panel dimmer knob to bring the backlight back. What's more, the EFIS backlighting does not respond at all to BAT state. Finally, the MCP does not respond correctly to the MIP lights Test switch with powerlogic=ON.

Curious to know if you have any 'other stuff' in your .ini file.

Paul
2020-01-30 10:52
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
hi paul,

I only have two different PMDG's in my .ini-File.
In the SETUP-area there are only Port=9000 and LOG=NO. All the other listings depends to the airliner, two different B738, one DLH and one AUA.

Regarding to the dimmers. Where are their positions before c&d and did they move to the left with c&d automatically?

The light test right of the AFDS-switches switches all LEDs on (also in the corrys) and the displays are showing 888.

What is your hardware version of MCP and EFIS? mine is EFIS 0.03 and MCP 0.02. Maybe you have newer ones?
Grüße,
Stephan (Time: UTC+2)
2020-01-30 12:12
Avatar
pluckas
Posts: 104
Supporter
Hi Stephan,

I have EFIS 0.04 sw=0.0e and MCP 0.03 sw=0.11

If I power down (BAT off), the dimmers are left at their previous position (mid way). When I power up again, they are still at this position but the VA MCP backlight does not return in full. A small adjustment (one 'click') of the virtual dimmer knob restores the backlight.

Curious. There's obviously some subtle differences between our hardware.

Paul
2020-01-31 12:34
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
hi Paul,

seems that they have modified thae hardware. So the behavior makes sense.

Regarding the dimmers I don't know. If they keep their position it would be logical that the backlight take the brightness automatically when the system comes up (in a real plane) from the present position.
If that does not happen here that should be a reason of reading the potentiometers in the sim. Here the sim only reacts if a potentiometer is moved a bit.
Grüße,
Stephan (Time: UTC+2)
2020-01-31 12:47
icon