Is there a way to "monitor" the state of switches/knobs/buttons in this game?
-
Dunc, I understand the concept of cockpit builders but like I said, I am not building a physical cockpit and therefore I can have my IN-PROGRAM switches magically sync with the IN-SIM switch No need to manually have to move a physical toggle to sync with the pit.
-
There is no difference between physical switches and software switches. The physical stuff always uses software to do the communication. So from a BMS point of view, there is no difference, and all which has been said above is applicable for ânon-pyhsicalâ switches as well.
-
Iâm sorry, one of us is confused. Probably me.
As RD stated, one way to ensure switches are in sync is to check them at ramp start. But what if you start a quick mission with the jet already in the air? Another point made was to use proper position callbacks and not the toggle ones, so if I start with the gear lever down but the sim starts the aircraft in the air, I could put the gear lever up and it would command the âgear upâ callback (instead of the âgearâ toggle) and I would be safe.
However, this is where the physical and software switches are different, and this is why I ask on this thread. In the gear example above, you could fly the entire mission and only realize the âout of syncâ as you come in to land, but no big deal as you can simply bring your physical gear lever up, and now you are âin syncâ with the actual gear lever state as shown in the sim. Then simply put the physical gear lever down, and the gears come down. PHYSICAL switches. Now what I want to do is âautomateâ this system a bit. Same scenario but with a âsoftwareâ switch this time. The âsoftwareâ switch starts off in the lever down position, but the mission starts the aircraft in the air. Again we have the âout of syncâ problem as before. At this point, I want the program to query the sim, realize that the gear in the sim is actually up, so I want the program to realize this âout of syncâ scenario and change the âsoftwareâ switch to show a lever up position, bringing the two âin sync.â The pilot never realized he was âout of syncâ, he does the mission, brings the gear down (sync step skipped because the program did this already!), lands, mission complete.
So the question is â- how do I query the sim to make this âautomationâ possible?
-
Youâre complicating whatâs really simple.
Donât bother with syncroniztion⌠if your using âswitch position-callbacksâ, then next time you use a switch (physical) youâll be synced with that switch.
Think by logic⌠If you start mission flying, gear is obviously up. So when it comes the need to lower it and you find your gear switch (physical) already down, then simply pull it up then down again. see? -
as Dunc said, you canât do that
Switch states are not externalized, so you canât ask a software to do it as the information is not available from BMS shared memThe only way to do it, is to consider the user that clever software that put all switches in sync
And thatâs done with the preflight cockpit checks -
@Red:
The only way to do it, is to consider the user that clever software that put all switches in sync
And thatâs done with the preflight cockpit checksLol⌠some of us are too impatient we start the flight in the air⌠so no âpreflight checksââŚ
-
doesnât matter
You still have to place the switch in sync yourself, using the all position relevant callback -
Hmmm⌠okay, thank you, I think I got that part correct.
Now I know Falcon does make information available that allows cockpit builders to replicate the cockpit state â is this the âshared memoryâ you are talking about? So what exactly is in this shared memory? Is it just gauges and cockpit lights? Is that how MFDE and other cockpit extractors work, by reading this shared memory? So the cockpit switch states are not included in this?
-
yes, cockpit stuff is possible thanks to the information available in the sharedmemory
You can see what is in there by opening the flightdata.h in your doc folderitâs indeed gauge & lights stuff, but many other things - but no switch state
-
Yep, took a look, nothing about switches, mostly just lights and gauges.
-
Hereâs my keyfile.
903 (different) callbacks without cougar (SSC/TQS) ones. These are included at end of file. -
Hmmm⌠okay, how do I make use of Flight Data.h information? How does it work? I was just hoping to be able to âwatch forâ the Master Arm switch coming on and would be able to reflect the On/Off state of the light in my project.
-
you need a sharedmemory reader, Iâd check Viperpit for those, but they are in maintenance
-
I am curious how programs like Helios or MFDE reads the information. For example, how does MFDE know when to put on the caution light? If I can find out how it âreadsâ this info, Iâll try incorporating that to my program.
-
⌠I was just hoping to be able to âwatch forâ the Master Arm switch coming on and would be able to reflect the On/Off state of the light in my project.
WTH are you talking about?
Master Arm switch comming on�?? ON/OFF light�?? (What light ?)
Anyway, sharedmemory reflects all light states. Any sharedmemory reader will indicate lights states.
hereâs a SM reader; https://www.assembla.com/code/lightningstools/subversion/nodes/releases/Programming%20Tools%20and%20Source%20Code/Falcon%204%20Shared%20Memory%20Reader%20for%20dotNet%20and%20COM?rev=95 (Work of âMr.â Lightning)MFDE (and other) tools combine SM readers and video memory readings, coz MFDs and other Displays cannot be read from SM.
Also, follow this thread about SM structure and WIPs; https://www.benchmarksims.org/forum/showthread.php?5914-Shared-memory-documentation
-
I LOL at myself⌠I meant âMaster Cautionâ light⌠sorry. Thanks for the links!
-
We can reverse the subject just to find a temporary solution. The key is:
Does exist a reachable falcon 4 database with all the âpresetâ button positions for every ramp start,taxyway, runway, Instant action, tac. engagement, dogfight campaign modes etc.?
If yes, the 99% of the job is done, just read that database for the mision you are are going to fly and sync your buttons before to start the mission.I´m almost sure the database exist in any way not sure if readable from the operating system.
Any help over there ?
-
maybe u can try dig out WDP.
before i use it, some info about HUD & MFD stored in myname.ini, but they only apply after âloadâ from MFD>>DTE page.
after using WDP, i dont need to âloadâ them any more, every time i jump in cockpit, all switch ready( i dont run WDP every time). -
Is there a way to âmonitorâ the state of switches/knobs/buttons in this game?
now that 4.33 is out, I want to ask that exact same question again in hope that there is now a new flightdata.h section or equivalent in place where i can read the current state of a switch in the sim.
checking the switches on startup (ramp or âin the airâ) doesnât help for every situation. desync can also occure for example with magnet-switches like jfs or autopilot in flight (for jfs not really âin flightâ :-)) as well. -
i had a look at the flightdata.h file and I found at least the bits for the magnet-switches to determine whether jfs or ap is active or not.