Forums » Technology » Flight Sim Controllers » T.A.R.G.E.T. (Thrustmaster) » 5 LED Programming Active Topics You are not logged in. [Log In] [Register User]
Page 1 of 3 1 2 3 >
Topic Options
Rate This Topic
Hop to:
#3154955 - 12/11/10 08:31 AM 5 LED Programming
komemiute Offline
Hell Drummer
Senior Member

Registered: 05/03/09
Posts: 2679
Sorry if this is a double post but...

As the title implies, how do I program the 5 LEDs available on the throttle base?!?!

Looked all over the place or manual to no avail.
It's just me?

Peace,
K'mute
_________________________
"Himmiherrgottksakramentzefixhallelujah!"
Para_Bellum

"It takes forever +/- 2 weeks for the A-10 to get anywhere significant..."
Ice

"Ha! If it gets him on the deck its a start!"
MigBuster

"What people like and what critics praise are rarely the same thing. 'Critic' is just another one of those unnecessary, overpaid, parasitic jobs that the human race has churned out so that clever slackers won't have to actually get a real job and possibly soil their hands."
Sauron


Top
#3155231 - 12/11/10 07:20 PM Re: 5 LED Programming [Re: komemiute]
Paradaz Offline
Member

Registered: 03/20/03
Posts: 2084
Loc: Andover, UK
Can't do it yet......awaiting T.A.R.G.E.T update.
_________________________
On the Eighth day God created Paratroopers and the Devil stood to attention.

Top

#3155375 - 12/12/10 07:39 AM Re: 5 LED Programming [Re: komemiute]
komemiute Offline
Hell Drummer
Senior Member

Registered: 05/03/09
Posts: 2679
*sigh*
Feared that.

Thanks abunch.

K'mute
_________________________
"Himmiherrgottksakramentzefixhallelujah!"
Para_Bellum

"It takes forever +/- 2 weeks for the A-10 to get anywhere significant..."
Ice

"Ha! If it gets him on the deck its a start!"
MigBuster

"What people like and what critics praise are rarely the same thing. 'Critic' is just another one of those unnecessary, overpaid, parasitic jobs that the human race has churned out so that clever slackers won't have to actually get a real job and possibly soil their hands."
Sauron

Top
#3207319 - 02/14/11 07:20 AM Re: 5 LED Programming [Re: komemiute]
komemiute Offline
Hell Drummer
Senior Member

Registered: 05/03/09
Posts: 2679
So? Now? Are we there yet?
_________________________
"Himmiherrgottksakramentzefixhallelujah!"
Para_Bellum

"It takes forever +/- 2 weeks for the A-10 to get anywhere significant..."
Ice

"Ha! If it gets him on the deck its a start!"
MigBuster

"What people like and what critics praise are rarely the same thing. 'Critic' is just another one of those unnecessary, overpaid, parasitic jobs that the human race has churned out so that clever slackers won't have to actually get a real job and possibly soil their hands."
Sauron

Top
#3207417 - 02/14/11 09:27 AM Re: 5 LED Programming [Re: komemiute]
Teej Offline
Member

Registered: 07/02/05
Posts: 1503
Almost. The code is being tested.
_________________________
Virtual Thunderbirds, LLC | Sponsored by Thrustmaster

Top
#3207550 - 02/14/11 11:58 AM Re: 5 LED Programming [Re: Teej]
komemiute Offline
Hell Drummer
Senior Member

Registered: 05/03/09
Posts: 2679
Originally Posted By: Teej
Almost. The code is being tested.


twoweeks

This sounds like waht parents say to kids who asks "So? Now? Are we there yet?"
_________________________
"Himmiherrgottksakramentzefixhallelujah!"
Para_Bellum

"It takes forever +/- 2 weeks for the A-10 to get anywhere significant..."
Ice

"Ha! If it gets him on the deck its a start!"
MigBuster

"What people like and what critics praise are rarely the same thing. 'Critic' is just another one of those unnecessary, overpaid, parasitic jobs that the human race has churned out so that clever slackers won't have to actually get a real job and possibly soil their hands."
Sauron

Top
#3229441 - 03/09/11 12:50 PM Re: 5 LED Programming [Re: komemiute]
352nd Persecutor Offline
Member

Registered: 05/01/04
Posts: 103
Loc: Southern California
The code has been released and is available on the Thrustmaster driver site.
_________________________
Persecutor
a proud member of the 352ndVFG

http://www.352ndfg.com/IL2

Top
#3230881 - 03/10/11 07:14 PM Re: 5 LED Programming [Re: komemiute]
hsth Offline
Junior Member

Registered: 11/12/10
Posts: 37
Code works fine, with GUI you can now switch backlight off when not using the Warthog.Smile2
Only wish now, that you could also switch it on/off with the Script Editor. That would make sense for the initial state as explained in the script manual.


***************** Edit **********************************
Sorry, too hasty.. WinkNGrin
The backlight is actually LED 0 (zero) and you can therefore switch it on & off in the Script Editor. clapping


Edited by hsth (03/10/11 07:31 PM)

Top
#3232487 - 03/12/11 11:47 AM Re: 5 LED Programming [Re: komemiute]
Dachs Offline
Member

Registered: 08/13/02
Posts: 307
Loc: Denmark
Hi, I just installed the latest TARGET version, but I dont really see an option for turning off or adjusting backlighting.. dizzy Could one of you, more experienced TARGET guys maybe give me a litlle hint?
_________________________
Fortes Fortuna Juvat

Top
#3232573 - 03/12/11 01:27 PM Re: 5 LED Programming [Re: Dachs]
Shadow=ASP= Offline
Member

Registered: 03/04/05
Posts: 1116
Loc: Ski, Norway
Try this smile

Code:
include "target.tmh"

int main()	// initialize the physical devices and create the virtual devices
{
	if(Init(&EventHandle)) return 1;							// declare the event handler, return on error
	//SetKBLayout(KB_GER);
	
	MapKey(&Joystick, S2, LED(&Throttle, LED_INTENSITY, 0));
	MapKey(&Joystick, S1, LED(&Throttle, LED_INTENSITY, 215));
	MapKey(&Joystick, TG1, LED(&Throttle, LED_ONOFF, LED_CURRENT+LED4^LED2));	// mind the precedence, ^LED MUST be the latest
	MapKeyR(&Joystick, TG1, LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4^LED3));	// mind the precedence, ^LED MUST be the latest
//	ActKey(KEYON+REXEC(0, 500, "ActKey(KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT^LED1));"));
	KeyAxis(&Throttle, THR_FC, 0, AXMAP2(6, LED(&Throttle, LED_INTENSITY, 0),
										 LED(&Throttle, LED_INTENSITY, 45),
										LED(&Throttle, LED_INTENSITY, 90),
											LED(&Throttle, LED_INTENSITY, 135),
											LED(&Throttle, LED_INTENSITY, 180),
											LED(&Throttle, LED_INTENSITY, 215)));
											
	KeyAxis(&Joystick, JOYX, 0, AXMAP2(6,
	LED(&LMFD, LED_INTENSITY, 0),
	LED(&Throttle, LED_INTENSITY, 45),
	LED(&Throttle, LED_INTENSITY, 90),
	LED(&Throttle, LED_INTENSITY, 135),
	LED(&Throttle, LED_INTENSITY, 180),
	LED(&LMFD, LED_INTENSITY, 80)));

	KeyAxis(&Joystick, JOYY, 0, AXMAP2(6,
	LED(&RMFD, LED_INTENSITY, 0),
	LED(&Throttle, LED_INTENSITY, 45),
	LED(&Throttle, LED_INTENSITY, 90),
	LED(&Throttle, LED_INTENSITY, 135),
	LED(&Throttle, LED_INTENSITY, 180),
	LED(&RMFD, LED_INTENSITY, 80)));

	//MapKey(&Joystick, TG1, PULSE+'1');
}

int EventHandle(int type, alias o, int x)
{
	DefaultMapping(&o, x);
}

LED_INTENSITY range from 0 to 255.

This sets the lights at start: LMFD at 50, RMFD at 50, Throttle backlight at 50, LED1, 2 and 3 off, LED4 and 5 on.
Code:
ActKey(PULSE+KEYON+LED(&LMFD, LED_INTENSITY, 50));
ActKey(PULSE+KEYON+LED(&RMFD, LED_INTENSITY, 50));
ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, 50));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED4));
ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED5));


Here are some snippets from my A-10C scipt. Pretty self explanatory.
Code:
//LED1 blinking when TG1 is pressed, stops blinking and sets LED1 to off when TG1 is released
MapKey(&Joystick, TG1, CHAIN((Gun_trigger_stage1), REXEC(0, 200, "ActKey(KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT^LED1));")));
MapKeyR(&Joystick, TG1, EXEC("ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));"));

//LED1 is constantly on when TG1 is pressed, LED1 returns to off when TG1 is released
//MapKey(&Joystick, TG1, CHAIN((Gun_trigger_stage1),(LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1))));
//MapKeyR(&Joystick, TG1, LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));

//Same as above but with LED2 and TG2
MapKey(&Joystick, TG2, CHAIN((Gun_trigger),(LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2))));
MapKeyR(&Joystick, TG2, LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2));

// Joystick Switches
// S4+S1 Toggles intensity on Throttle, LMFD and RMFD simultaneously
MapKeyIO(&Joystick, S1, SEQ(
CHAIN(LED(&LMFD, LED_INTENSITY, 100),D(10),LED(&RMFD, LED_INTENSITY, 100),D(10),LED(&Throttle, LED_INTENSITY, 100)),
CHAIN(LED(&LMFD, LED_INTENSITY, 150),D(10),LED(&RMFD, LED_INTENSITY, 150),D(10),LED(&Throttle, LED_INTENSITY, 150)),
CHAIN(LED(&LMFD, LED_INTENSITY, 255),D(10),LED(&RMFD, LED_INTENSITY, 255),D(10),LED(&Throttle, LED_INTENSITY, 255)),
CHAIN(LED(&LMFD, LED_INTENSITY, 0),D(10),LED(&RMFD, LED_INTENSITY, 0),D(10),LED(&Throttle, LED_INTENSITY, 0)),
CHAIN(LED(&LMFD, LED_INTENSITY, 50),D(10),LED(&RMFD, LED_INTENSITY, 50),D(10),LED(&Throttle, LED_INTENSITY, 50))));



Edited by Shadow=ASP= (03/12/11 01:31 PM)
_________________________
LB2 Mission-pack 1

Top
Page 1 of 3 1 2 3 >
Topic Options
Rate This Topic
Hop to:

Moderator:  531 Ghost, RacerGT 
 

Forum Use Agreement | Privacy Statement
Copyright 1997-2013, SimHQ Inc. All Rights Reserved.