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
Peau
Posts: 44
Hi !
Is there a way to assign an input without using hardware ? I.e. assign a save every 60:th second. Tried different ways with fakebuttons but have never got it to work.
Cheers, Peter
2022-02-14 19:13
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi Peter,

what do you want to save every 60 secondes?

You can read out the internal sim clock i.e. the seconds (offset 0x023A).
Assign a (virtual) LED and switch this LED ON if the secondes are in the range from 00 to 05. From 06 to 59 switch it off.
connect the LED output to a (virtual) switch which will be switched, when the LED went ON - or vice versa.

With the triggered (virtual) switch you can switch in the sim what you want.
Grüße,
Stephan (Time: UTC+2)
2022-02-14 20:24
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Just to complete this....

Maybe already in the next Version this is possible....
We still build a "Alpha" Version to controll Inputs alternate to a button by a "condition" in the Sim.
E.g. If Altitude goes from above 10.000 to below 10.000 then send signal to switch Landing Lights.

A "Timer" like you need is not planed.... But as Stephan said... We can read the virtual clock... So we can say "Always when time in seconds is exactly 01 then do something.

So.... In the future the "bypass" to set the system to a Output and wire that to a input to "simulate" a Button Press is hopefully no longer needed!
Good Luck !
2022-02-14 20:56
Avatar
Peau
Posts: 44
The every 60 second is just an example as the 10000 ft or for instance time of day or AC on ground. The workaround tip have no success sofar.
I've cretaed a fake led and a fake button. In Fakeled ;( 023A ) transform ; if($<30,1,0) and in fakebutton; MF var, number, fakevar, value; if(#=1,a,0 ). # is Placeholder for Fakeled and" a" is the placeholder for test (OAT. ) In input red by FakeSave which stays on "0". For me this seems logic but something is obviously missing...

Cheers, Peter

As an inbuild feature it will be very nice.
2022-02-15 09:22
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
I think you missunderstand the "FAKE" System....

You need to wire the Fake LED Output Pin to the Fake Button Input Pin.

If a Button is Detect a GRD on the Pin ( When Button is pressed and there is a connection from the Pin to the GRD on the other side of Button) this is a PRESS
If the Button Pin no longer detect the GRD then this is the Release.....

A LED Pin is LOW ( GRD) aslong Mobiflgiht not light it.... And it is HIGH ( 5V) if Mobiflight send a "1" to that Pin.

******

So we use this situation to build the FAKE ..... If a Action should be done the Fake LED must change its status ..... And the Action must be set to the Press/Release of the Button.
And as i explane.... Its logical inverted..... if LED gets ON then the RELEASE of the Button is executed ! LED OFF means we now simulate the PRESS.
Good Luck !
2022-02-17 21:13
Avatar
Peau
Posts: 44
Yes, I misunderstod. But now wired and working !

Cheers, Peter
2022-02-18 10:11
Avatar
Peau
Posts: 44
...also noticed that the "Config reference" in Input is lost everytime in this setup with a restart of MF.
Now have version 9.2.0.5
Cheers, Peter
2022-02-21 12:46
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconPeau:

...also noticed that the "Config reference" in Input is lost everytime in this setup with a restart of MF.
Now have version 9.2.0.5
Cheers, Peter



Do you SAVE The Config before closing MF ?

Please give me the most easy example how i can reproduce this.... Best way with a empty new config file.
Good Luck !
2022-02-21 15:21
Avatar
Peau
Posts: 44
This happends to my Fakebutton configuration and only that, not the others. This button is wired on a Arduino Mega with a connection between the button and the fake-Led ( Pin 2-3 ). All other connection and assignments seems unaffected. My config file has 4 Arduino Mega and lots of led:s, a servo and LCD:s, tot ca 70 (!) output and 7 inputs. Always saved of course.

Cheers, Peter
2022-02-21 18:49
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
For Mobiflight there is no factor if you wire the Button or LED to a real device or if you "bridge" this 2 Pins.
This make no difference within the connector.

As i said.... i not understand what you mean with " the "Config reference" in Input is lost everytime in this setup with a restart of MF. "
Is the checkmark gone ? is the checkmark active but the selected config is no longer selected and MF use the must upper config instead ?

I will say.... Mostly those things happen if there is a fatal issue in the config.... E.g. if you refference a Cinfig that is duplicarted and exist twice.... Or if the Save not work in case File is saved in a protected folder or so.

Please to check this....
Select the SAME Config ( you use as config refference here) within a other or a new config line for testing.
Is ist work (correctly saved) there ?
Second Test.... Refference for testing in the problematic Config a OTHER Config as refference.....
Does it work or does it also not save it ?

In easy words..... Find out if the Cofnig ( You use for refference) OR if the Config where you define the refference is the issue spot !
Good Luck !
2022-02-22 00:40
Avatar
Peau
Posts: 44
On the "InputConfigWizard" you got three tabs; Precondition, Config reference and Input. When I add a reference in "Config reference" as a placeholder for input it works as expected. But when I shut down MF and restart it the "Config reference" tab is empty, the config reference is gone. Tested with some of my other references, as Landing Light, Pressure Altitude, Servo aso, same result. Also tested my other inputs by adding random references, they all remain in "Config referense" after restart. Something weird with the connection to the workaround/fakebutton config or I am missing something ?

Cheers, Peter
2022-02-22 08:46
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
May the Config is corrupted.
As i said... MF not know that you use this "Fake" logik.
For MF this config is a simple INPUT of a Button and work same way like every other!

Your "test" was good but one important fact is missing....

You tested other INput Configs with "random" references..... More interesting would be if these other Inputs work with exactly the SAME Refference you get in trouble at the moment.

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

Whatever.... Logical next step is to delete this Input Config, and create it for new ( NOT Duplicate) . Maybe there is just a issue in it and the new one work fine.
Good Luck !
2022-02-22 14:20
Avatar
Peau
Posts: 44
The config was obviously corrupted ! Created a new one with the same prerequsties and the Placeholder seems to survive a MF restart.
Will have that in mind if this will happen again. Maybe I was too fucused on my workaround.

Cheers, Peter
2022-02-22 17:36
icon