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
gos
Posts: 3
Hi!
I am using Mobiflight with Arcaze and Arduino modules.
If I need to set up a precondition for an output (LED) I can select the Inputs (Switches) of the Arcaze modules and the Outputs (LEDs) of the Arduino modules but I can not select the Inputs(Switches) of the Arduino modules. I also did not find a way to do it with a definition of a customized offset as I already defined a mouse macro in FSUIPC for the keys used by the Arduino input. I am using an add on aircraft.
Any idea how I can use an Arduino Input, which sends a key to the FSUIPC which then executes a mouse macro which operates the switch in FSX, for an output precondition in mobiflight?

Thanks a lot in advance for your recommendations!
2018-02-01 21:21
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi
You explane a lot of technical stuff... But you not tell me a simple example WHAT you like to to.

Please check if you realy need this.... I Know in some situations ( for example the Resetting of a servo in B737 Autostart switch) this is important) BUT In most configs there is no need to preconditioning the REAL Switch status..... Simply Rule: A LED not light if your Real switch is ON.... It light if the function in Simulator is ON..... Thats why we read offsets !
Basicly (like in real aircrafts) the switch position is independent from the LED !


But to awnser your Question:
You can for example use the custom Offset Range in FSUIPC to create a Offset that show the Status of your REAL switch ( for example Offset is 1 if Switch is ON and 0 if switch is off)

Please tell me if possible WHAT exact situation you like to build ( And what AddOn).... I not understand why you need a Mouse Macro in that case !
Maby i can give you a good solution !
Good Luck !
2018-02-02 22:41
Avatar
gos
Posts: 3
Hi pizman82!

I am using FSX with the Eaglesoft CJ1

One example would be the test switch on the electrical panel: As this is not a FSX feature I defined a macro to control the switch via an Arduino board which works fine.
For position Annun all Annuntiator lights, GPWS lights, Master Lights etc. shall go on (if the Batt SW is turned on). For this I would need to know the position of the test switch.
If I would have connected the switch to an Arcace board I would be able to directly read out the switch position via Mobiflight/precondition, but for the Arduino board I only can read out Outputs but no Inputs. In Mobiflight a key is defined to be sent to the FSUIPC, if the test switch is set to position Annun. The key then runs the Mouse Macro defined in FSUIPC.
In FSUIPC I can either select a mouse macro or a custom offset from the drop down, if the key is pressed but not both at the same time, right?


There are some other situations where I would need the switch position readout from a switch connected to a Arduino board: Igniter LED also on, if Eng A/I on; Eng A/I Annun on, if switch on and N2 <70%; etc. Your simply rule only works, if status offsets would be available which is not the case in some situations for add on A/C.
2018-02-06 08:36
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
icongos:



In FSUIPC I can either select a mouse macro or a custom offset from the drop down, if the key is pressed but not both at the same time, right?
.......
Your simply rule only works, if status offsets would be available which is not the case in some situations for add on A/C.



Hi again.

Now i understand your basic problem.
Your right..... With arcaze you can use this this "old" tool to read the switch status for a precondition.... For Arduino this is NOT included. (maby in the future.... But i think Sebastian not realy plan for that cause as he said.... THIS is not realy a good solution )

About your question.... I don´t know if you can do TWO different Things in FSUIPC same time ( Like run a macro and write a Offset ). Its possible 100% if you write the script youreself but not shure if this can be done easy in the GUI. Maby the key is to include the Offset-Write in the Macro itself..... So KEY is run Macro.... And Macro say " Write Offset xyz to 1 AND Push virtual Button in CJ1"

Myself i do it internal in Mobiflight for those situations.... For example....
Create 2 Input Configs in Mobiflight .... Both use SAME Device ( Your switch). The first config send the key "a" for example ( That is used in FSUIPC Macro)
The second Input Config say.... ON PRESS Write Offset 66C0 for examle to 1..... ON RELEASE Write same offset to 0 !
Then make a Output Config that read 66C0. This config is always1 if your switch is ON and 0 if its OFF.....
Now you can use this Config Value same way as precondition like you use arcaze Swtich information until now !
(( Only problem.... On Systemstart the Offset is always "0" Zero.... So get shure your switch is Zero, too while startup.... Else you need to sync it OR it is only correct 100$ if you use it first time ))

*******
The "Basic rule" is already correct !!
Your right again.... The rule workes only if AddON is support the data ! But if not then you MUST work with your technic BUT your technic is already "maby" wrong !

icongos:


One example would be the test switch on the electrical panel: As this is not a FSX feature I defined a macro to control the switch via an Arduino board which works fine.
For position Annun all Annuntiator lights, GPWS lights, Master Lights etc. shall go on (if the Batt SW is turned on). For this I would need to know the position of the test switch.



WHAT happends if your INPUT get an issue ( not recived by FSX) ? Your switch is ON.... Your logic let the Lights illuminate.... But in Sim the button is never been pushed.
OR
What happends if you got a fail in Battery or Generator.... Your Logic say LED should light if Battery Master and Test Switch are ON on your cockpit....But maby there is also no electircal Power in Virtual Cockpit ( in case of failure) whatever both switches are ON..... Your LED will light again , but they should not.

*****
Summary....
For me those improvisional solutionas are not perfect.
You should looking for a AddOn that support it´s data nearly 100% .... You will build a Homecockpit..... And here the 1.st Priority is the Data broadcast.
Maby you can request in the eaglesoft forums for that. They can tell you pretty shure if the data is supported.... ( Or read the full manual)
If you be able to READ the virtual status of the LED´s then your cockpit will be much more realistic and the workflow is more easy !

LAST NOTE: the DATA is exist in EVERY AddOn ( Cause the Virtual LED is controlled too with that logic...)
But the puplisher dont want to give it to you..... Often some users with programming skills build a own programm that readout information and give it to FSUIPC.....
Search for that tool in the Cockpitbuilder Boards if it is existing ! ( Example IFLYtoFSUIPC or WilcoFSUIPCtool for that Addons )
Good Luck !
2018-02-06 13:42
Avatar
gos
Posts: 3
Hi pizman82!

I tried your suggestions (via Macro and with a second input in Mobiflight) and both works.
Thanks a lot!

I totally agree that reading out the switches has a lot of negative consequences.
Where ever possible I try to avoid this but, as already explained, for many functions I could not identify the offsets. Therefore I need to use Mouse Macros and read out the switches. Eaglesoft provides an incredible bad support and is not willing to provide such information. I already have asked them.
Until now I do not know any better CJ2+ which I can operate with my cockpit, but for procedure training it is good enough (and still room for improvements)

Brgds
Stefan
2018-02-08 15:16
icon