Forums » Technology » Flight Sim Controllers » T.A.R.G.E.T. (Thrustmaster) » Advanced question: How to make a profile modular for either Cougar or Warthog Active Topics You are not logged in. [Log In] [Register User]
Topic Options
Rate This Topic
Hop to:
#4088368 - 03/06/15 12:51 AM Advanced question: How to make a profile modular for either Cougar or Warthog
HomeFries Online   cool
Air Dominance Project
Member

Registered: 01/01/01
Posts: 1863
You may be familiar with my DCS World TARGET Profile for the Cougar. I would like to make this profile Warthog compatible but with the complexity of the code I don't want to maintain two versions of the profile. I would actually like to make it modular with the primary controller selectable in declarations, and keeping if/else statements to a minimum. Having the profile compatible with both the Warthog and Cougar at the same time would be ideal for people with both controllers, but I need to get over the first hump.

I'm hoping for a straight-up solution to the problem; namely, I want to use the variables FLCS and TQS (I can't use Joystick and Throttle because those are the Warthog names) and have them assigned to either HCougar or Joystick/Throttle with a couple of lines in the file.

Here is the concept, though I get error messages no matter what I try:
Code:
include "target.tmh"

int FLCS;
int TQS;

//program startup
int main()
{
    if(Init(&EventHandle)) return 1; // declare the event handler, return on error
	
	//add initialization code here
FLCS=HCougar;
TQS=HCougar;


			MapAxis(&FLCS, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
			MapAxis(&FLCS, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
			
			MapKey(&FLCS, S2, DX2);
			
			MapAxis(&TQS, THROTTLE, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
			
			MapKey(&TQS, T6, DX24);
}

//event handler
int EventHandle(int type, alias o, int x)
{
    DefaultMapping(&o, x);

}

I have also tried
FLCS=&HCougar;
TQS=&HCougar;
but got an error in target.tmh line 282

Any help would be greatly appreciated.

EDIT: I realize that the throttle nomenclature is completely different, but even making this work for the stick would be great.


Edited by HomeFries (03/06/15 12:57 AM)
_________________________
-Home Fries
XBL: The Mad Gonzo

The average Naval Aviator, despite the sometimes swaggering exterior, is very much capable of such feelings as love, affection, intimacy, and caring.
These feelings just don't involve anyone else.


Top
#4092604 - 03/16/15 12:08 AM Re: Advanced question: How to make a profile modular for either Cougar or Warthog [Re: HomeFries]
Aullido Offline
Member

Registered: 03/08/07
Posts: 325
As you said the button nomenclature is different. You can have both throttles working at the same time, maybe you will need only a little axis configuration. Send me an PM and I will try to help you, I am working on a script for IL-2 4.12.2 and HSFX right now.

Top
#4092859 - 03/16/15 02:28 PM Re: Advanced question: How to make a profile modular for either Cougar or Warthog [Re: HomeFries]
HomeFries Online   cool
Air Dominance Project
Member

Registered: 01/01/01
Posts: 1863
Thanks, Aullido. PM sent.

FYI, what I would like to do is monumentally more complicated than a couple of axes (which could be done with if/else staements). I used the axis commands as an example to keep things simple and on point.


Edited by HomeFries (03/16/15 02:30 PM)
_________________________
-Home Fries
XBL: The Mad Gonzo

The average Naval Aviator, despite the sometimes swaggering exterior, is very much capable of such feelings as love, affection, intimacy, and caring.
These feelings just don't involve anyone else.


Top
Topic Options
Rate This Topic
Hop to:

Moderator:  RacerGT 
 
Quick Search
Recent Articles
Support SimHQ
.
Social


Recent Topics
Traffic Cant wait for human drivers to be outlawed
by Linebacker
10:54 PM
Diary of a B-17 Tailgunner
by shan2
08:17 PM
Half a month and finally, GTA V for PC!
by letterboy1
08:03 PM
Flintlock 2015
by Timothy
06:55 PM
Newest Mad Max Trailer
by Mechanus
05:50 PM
They called him Sweetness
by wheelsup_cavu
05:37 PM
Get on Google maps and play Pac Man
by Top Gun
03:15 PM
A Small House In Sad Condition That Sold For $1.2 Million Cash
by Haggart
01:07 PM
The big four-oh.
by Immermann
10:01 AM
Skylar Neese's murder: what was the motive?
by CG2015
03:30 AM
 

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