Using throttle LEDs for Falcon ingame status
-
The warthog has 5 Leds that can be accessed in the script.
But can they represent also the status for example, of the gear light bulbs?
Yes, your hog can!
I tried to make a simple as possible interface to read shared memory (also for other games/applications/whatever) with T.A.R.G.E.T. Script.
It works pretty well, reliable and fast (at least in my opinion).
So what do you get?
a tiny explanation:shm.tmc (depends on shm.tmh and functions.tmc):
Contains the functions that you need, to open and map shared memory.falcon.tmc (depends on FlightData.h, shm.tmc and const.tmh):
I use it as an interface between falcon BMS and my joystick scripts.FlightData.h:
This is the file from Falcon BMS 4.33\Tools\SharedMem.
If you want to use other things then the gear bulbs, you will need to check that file.
Due T.A.R.G.E.T. script doesn’t know enumerators, classes, unsigned types, long types etc, I did:- comment out enumerators (instead “define” the enumerator items you want to use)
- unsigned data types became signed (or atleast removed unsigned, the Comment contains UNSIGNED)
- long types have become 2 variables as “int”, on the trail it contains _hi/_lo (perhaps vice versa!!!)
- functions at the end have become commented out. I guess you can’t read anything behind the functions because those values would have been shifted (I think the functions would be pointers in the struct).
FalconBMS-Warthog_ss.tmc is the script that I use for falcon.
On top you can see the difference checker. It checks wheter I am moving my throttle forward or backward. Depending on movements, led 5 or 1 are on/off. I use this while refueling to check if I really moved my hand.
Led 2 and 4 will flash if the gear handle is lighting. If it is not lighting, nr 2 represents the gear status of the nose, nr 4 the gear status of the main gear. If one or both of the maingear don’t work correctly, the led remains off.
Led 3 is simply depending on my FUEL NORM -> ENG L (Used as Laser switch)SharedMemoryMirror: This is a console application that simply reads one shared memory, and copies the content to a different shared memory.
You will need this tool on systems newer than Windows XP because TARGET script is running as a service in an isolated session. The games memory is in your local session.
In order to get the thing to work, you need to mirror the shared memory into the Global\ space.
To write into Global, you need to start SharedMemoryMirror with administrator level (otherwhise you will see the app crashing).
example of my Desktop link: D:\Benutzerdaten\SnowSky\Tools\SharedMemoryMirror.exe -s FalconSharedMemoryArea -d Global\FalconSharedMemoryArea -b 2400Reason why I made this:
I did the Failure TE, and when I landed, I didn’t check the gear status.
It’s simply a question of FOV, while keeping an eye on the runway, I am able to notice the leds on my throttle (On LG Press I make the leds blinking and then steady).
But I simply don’t think about turning the view in the cockpit to look down to the virtual lights.It would have been possible through sockets and my head would have much more hair - taking the simple solution.
But I choose the shared memory way - First of all because I wanted to get experience with shared memory. -
This post is deleted! -
This post is deleted! -
This post is deleted! -
Nice, Still working on programming my new Warthog, but for sure will look in to this!
-
TARGET Script is really a mighty tool,
enjoy the programming phase :)!