To start with...I discovered this by taking a look at the files that get included when you compile your script.

The files I see are;

target.tmh (everyone includes this in their .tmc file)
defines.tmh (gets included from target.tmh)
hid.tmh (gets included from target.tmh)
sys.tmh (gets included from hid.tmh)

Here's a snip from sys.tmh...

Code:
int fopen(alias name, alias mode){} // returns file handle, NULL if error
int fclose(int handle){}						// returns 0 if OK, -1 on error
int fgetc(int handle){}							// returns the character read, or -1 on error or EOF
int fputc(int c, int handle){}			// returns the written character, -1 on error
int fread(alias buffer, int size, int count, int handle){}	// returns number of items read
int fwrite(alias buffer, int size, int count, int handle){}	// returns number of items written
int ftell(int handle){}							// returns the file position
int fseek(int handle, int offset, int origin){}							// origin: 0=set, 1=cur, 2=end. Returns 0 on success, -1 else
int feof(int handle){}							// returns != 0 if EOF

...by a bit of trial and error I got the following working...

Code:
	int initCaptureStatus() {		// Capture variables to a status file "edstatus.dat"

		int fp = fopen("edstatus.dat", "w");
		
		fputc(SRunning, fp);
		fputc(CargoSc, fp);
		fputc(Gears, fp);
		fputc(Lights, fp);

		fclose(fp);

		}

...and...

Code:
	int initReadStatus() {			// Read variables from a status file "edstatus.dat"
	
		int fp = fopen("edstatus.dat", "r");

		int Silent = fgetc(fp);
		int Scoop = fgetc(fp); 
		int Gear = fgetc(fp);
		int HeadLights = fgetc(fp); 

		fclose(fp);

		}

I've not been able to suss out how to use fwrite and fread yet as I can't work out how to declare a buffer etc.
(i am not a programmer and never learnt 'c' beyond a very basic understanding and that was like 20+ years ago)

I did send a support request to support.thrustmaster.com and here's what I got back...

Code:
All programming possibility can be found in the manual at the link below - we do recommend checking page 53/60 for custom events:
> http://ts.thrustmaster.com/download/accessories/pc/hotas/software/target/target_script_editor_basics_v1.5_eng.pdf
Be informed that we only provide support for T.A.R.G.E.T if the program malfunctions (crash, no startup, not detecting device).

Didn't really expect much more than that, at least they replied.

Also, whilst my code snippets do work when called, I suspect this stuff really ought to be inside eventhandle();

Cheers
Clicker
 
Last edited:
Regarding WIN10+New TARGET+New Firmware issue...

I uninstalled Target and went back to version v3016(615v2) ... it's now had the issue twice since Wednesday.

Which means the issue is caused by the firmware....and I don't think you can uninstall or install an older firmware version (can you?)
And if I recall correctly, I had a few issues running the new Target with the older firmware.
So for a rock solid experience with WIN10, I'd recommend sticking with the old firmware and old TARGET.

Clicker

p.s. I'll raise a support ticket with Thrustmaster and see what they say.
 
Last edited:
Hi All,

More trial and error...I got fread() and fwrite() working...

Code:
	int initCaptureStatus() {

		int nom1 = "ABCDEF";
		
		int fp = fopen("edstatus.dat", "w");
		int res = fwrite(nom1, 1, 6, fp);

		fclose(fp);

		}
		
	int initReadStatus() {

		int nom2 = "000000";
		
		int fp = fopen("edstatus.dat", "r");
		int res = fread(nom2, 1, 6, fp);
		
		fclose(fp);

		}

Any "c" programmers out there who read this...all say "duh!".
But also advise the proper way to initialise a read buffer variable.
(coz, I'm pretty sure it isn't how I fluked it above)

To prove and/or display in console use...

Code:
printf("String = %s\x0a", nom2);

Clicker
 
Last edited:
After the Gnosis fiasco this week, I going to be taking an extended break away from ED & will not be responding/visiting the forums/comments. I'll probably drop back in around Chapter 4 update at some point if the desire to play has returned.

Games should be enjoyable & fun to play, and for the most over past years, ED has filled that requirement, but more recent events/updates have left me with only disappointment & anger whenever I muster enough enthusiasm to log in. So not to dwell on the negative, it's time to take a break from everything Elite & find that fun elsewhere.

Please continue to report any issues/errors you encounter & I will try to investigate/resolve when I can.

AD
 
Fully understandable, but sorry to hear.

Hope to see you back here around Christmas (Q4) time and if not, thanks heaps for all the help and encouragement.

Clicker
 
Newb Question

Ok, so I am running through the training exercises, have the script running and everything appears to be working great....but I need a tutorial in a couple of areas to avoid the keyboard.


Warthog HOTAS without pedals or IRTracking


1. How do I access the Target and Comm panels? (and exit)

2. How do I drop out of FSD?

3. To help me find these types of questions on my own, I can see that Comm Mode is bound to [JOY 19] + [JOY 27], but can't find a good map of the Joystick and System to identify which buttons those are. Does anyone have a good map for that?


Thanks again, love the tool, but it is taking a bit to wrap my head around all of the options and layers on the mappings:) We almost need a simpler mapping for running through the basic tutorials for beginners.

-Rodney
 
Hi Rodney,

Not at my pc so cant answer right now, but will have a look when i get home and see if i can help.

In the meantime, can you please confirm whcih version of aussiedroids script you are using, and also confirm you are using his included keybind file?

Clicker
 
v3.2.0, and yes I copied the keybinds and selected them.

I did figure out how to identify the different joy numbers now (using Target GUI, Joystick Control Panel, Properties) to figure out what buttons are what. Also read/absorbed that the 2nd modifier key is pushing down the joystick thumb hat, so I can read the map more completely now. Getting into FSD is modifier 1 and full throttle, I going to assume the same thing can be done to drop out of FSD now, but was too worried about speed coming into a destination to try it. I will try it again later.

I think I have absorbed the map via use now to understand how things should work, and have also found the tools to identify the buttons to diagnose if something isn't working. I appreciate the offer of help, and may have a question later this week if the theory isn't panning out. I did test what should get me to the different modes last night, but it wasn't working...because I had remapped the functions to something I could find :)

Awesome script, awesome game. I hope they continue to develop it to keep people interested long term.

-Dwight
 
Thanks for your great profile.

since yesterday I have been experiencing issues.
1. The left hand menu does not response, all others work fine.
2. Flight assist switches itself on and off.
3. The flight assist toggles changes to system/galaxy map toggles.

i think it might be a Win10 update

Sarge788
 
Thanks for your great profile.

since yesterday I have been experiencing issues.
1. The left hand menu does not response, all others work fine.
2. Flight assist switches itself on and off.
3. The flight assist toggles changes to system/galaxy map toggles.

i think it might be a Win10 update

Sarge788

Hi,

Can you confirm that you are using Aussiedroid's .binds file and that you haven't modified any of the bindings in game?

Cheers
Clicker
 
Hi Clicker,

Thanks for getting back to me.

I can confirm I am using Aussiedroids binds file and I have not changed any bindings in the game

When I used the Target Device Analyser and noticed that when moved any of the to switches in any direction. Multiple events light up i.e 5, 6 19 29 and 30 when i move the coolie up which is Thrusters up in the script.

Sarge788
 
Last edited:
Hi Clicker,

My issues are resolved. Its seems the older version of Target that I had wasn't compiling AussieDroid profile correctly.

I downloaded the latest version of Target and bingo. Everything was fine.

Sarge788
 
Hi Clicker,

My issues are resolved. Its seems the older version of Target that I had wasn't compiling AussieDroid profile correctly.

I downloaded the latest version of Target and bingo. Everything was fine.

Sarge788

Cool!
Great to see this worked for you.

Still a bit strange it didn’t work with the older software.

Cheers
Clicker
 
Which ED Preset?

Silly question perhaps. But what in game ED control preset should be set in order to use the TARGET profile?

The in game presets being: Classic Keyboard, Empty, Generic Joystick, Keyboard and Mouse, Thrustmaster Warthog, Custom.

I actually was pretty happy with the built in Thrustmaster Warthot preset, but I'd like to try Aussiedroid's setup.
 
Silly question perhaps. But what in game ED control preset should be set in order to use the TARGET profile?

The in game presets being: Classic Keyboard, Empty, Generic Joystick, Keyboard and Mouse, Thrustmaster Warthog, Custom.

I actually was pretty happy with the built in Thrustmaster Warthot preset, but I'd like to try Aussiedroid's setup.

you need to load Aussiedroids Binds file into the Bindings folder then you can select it.

Sarge788
 
Cool!
Great to see this worked for you.

Still a bit strange it didn’t work with the older software.

Cheers
Clicker

I spoke to soon, my problems are back I thought at first 2 of my stitches were broken as i mentioned earlier I was getting multiple event when moving either in a direction. But I tested using joy.cpl and they
are fine.

The script ran fine but during game play the problems occur as follows:
1. I can't call up my Nav menu,
2. My right thruster on my Mic switch now opens my Galaxy map. The left works fine.
3. Target next system only works when I am 0% Throttle.

I have downloaded the latest version of Target, deleted the Aussiedroids bind file, restarted renistalled Target copied a freshly downloading Auusiedroid Bind file into the Binding folder. But my problems still happen.

Cheers

Sarge788
 
ED Binding fails to load

When I launch ED I get the following in the BindingLoadingErrors.log file

Code:
There where errors when loading preset file: Aussiedroid Warthog Enhanced 3.2.0.binds
Failed to find GUID for device: 16D00A38

Inside the bind file I see...

Code:
<RollAxisRaw>
        <Binding Device="16D00A38" Key="Joy_RZAxis" />
        <Inverted Value="1" />
        <Deadzone Value="0.09000000" />
    </RollAxisRaw>

Not sure how to fix that.
 
NM on above question. The issue was that I copied the "WITH MFG Crosswind" profile to the ED bindings folder.
(I don't have an MFG Crosswind). Doh!

After copying the "WITHOUT MFG Crosswind" file. Things loaded up correctly.
 
Other Mappings?

The readme states:

First Run: If you are not using MFG Crosswind Pedals, at this point, you will need to map the 'Other Mappings' outlined in the Legend Section. This will configure Roll & some Galaxy Map axes (along with some optional custom configurations highlighed you may like).

For the life of me I'm not finding an Other Mappings section in any of the macro files. Where do I configure this?
 
I spoke to soon, my problems are back I thought at first 2 of my stitches were broken as i mentioned earlier I was getting multiple event when moving either in a direction. But I tested using joy.cpl and they
are fine.

The script ran fine but during game play the problems occur as follows:
1. I can't call up my Nav menu,
2. My right thruster on my Mic switch now opens my Galaxy map. The left works fine.
3. Target next system only works when I am 0% Throttle.

I have downloaded the latest version of Target, deleted the Aussiedroids bind file, restarted renistalled Target copied a freshly downloading Auusiedroid Bind file into the Binding folder. But my problems still happen.

Cheers

Sarge788

Hi Sarge,

What firmware are you running on the throttle and stick?

You can check this by opening the TARGET GUI app then click the "Get Firmware" text.
The latest firmware for Throttle is 23 and Joystick is 12.

Also, which binds file are you using... "with" or "without" Crosswinds?

Cheers
Clicker

p.s. the above won't be the issue, but gives you something to do while I'm taking a bit of a look!
 
Last edited:
Back
Top Bottom