Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4305789 - 10/23/16 09:07 PM Problems with Cougar MFD and TARGET!  
Joined: Oct 2011
Posts: 14
Pelle_H Offline
Junior Member
Pelle_H  Offline
Junior Member

Joined: Oct 2011
Posts: 14
Mölnbo, Sweden
As said, I have been using the MFD;s for some years now but after some W10(64) update this summer I have the strangest problem, I use the same script for the MFD;s tfor IL2 1946 and IL2 BoS, BoM and DCS, except A10C.
Now,when I load the script after a few seconds the MFD;s blinks and the script stops!
The TARGET script editor reprts as the first part of the attached text, the script follows below that.

Running script: C:\Users\Pelle\AppData\Roaming\Thrustmaster\TARGET\Scripts\IL2komp.tmc
*** Allocated ProcInstances found from the previous run: use FreeProcInstance() ***
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[4]:
1: "F16 MFD 2" - "USB\VID_044F&PID_B352&REV_0100"
2: "Joystick - HOTAS Warthog" - "USB\VID_044F&PID_0402&REV_0100"
3: "Throttle - HOTAS Warthog" - "USB\VID_044F&PID_0404&REV_0100"
4: "F16 MFD 1" - "USB\VID_044F&PID_B351&REV_0100"
USB HID device "Throttle - HOTAS Warthog"(USB\VID_044F&PID_0404\8&EEDEDF1&0&1) selected
USB HID device "Joystick - HOTAS Warthog"(USB\VID_044F&PID_0402\7&167A4D3F&0&2) selected
USB HID device "F16 MFD 2"(USB\VID_044F&PID_B352\8&EEDEDF1&0&4) selected
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse (absolute axes)...Done

main returned 0
Error:One of the selected USB devices (2) has been unplugged. Aborting script!
Aborting script (check output above for reason)...
Script stopped!


Without the slashes the MFD;s act as DX buttons but if I erase them the script chrashes! I´ve tried reinstalling with updated driver for the setup but that was a NOGO! Any help would be appreciated as I want to be able to make working scripts for the devices.

include "target.tmh"
int main()
{
Configure(&HCougar, MODE_EXCLUDED);
Configure(&T16000, MODE_EXCLUDED);
//Configure(&LMFD, MODE_EXCLUDED);
//Configure(&RMFD, MODE_EXCLUDED);
if(Init(&EventHandle)) return 1;
SetKBRate(50, 33);
SetKBLayout(KB_ENG);
//system("spawn -w\"H:\\IL2VP\"\"H:\\IL2VP\\il2fb.exe\"");
//MapKey(&Joystick, S4, 0);
SetShiftButton(&Joystick, S4, 0);
//Joystick keymapping below
MapKeyIO(&Joystick, TG1, BSP,
SPC);
MapKeyIO(&Joystick, S2, PULSE+L_CTL+SPC,
L_SHIFT+BSP);
MapKeyIO(&Joystick, S3, 0,
PULSE+L_SHIFT+SPC);
MapKeyIO(&Joystick, S1, PULSE+L_CTL+F9,
PULSE+L_ALT+'b');
MapKeyIO(&Joystick, TG2, PULSE+R_CTL+SPC,
0);
MapKeyIO(&Joystick, H2U, PULSE+F7,
PULSE+F5);
MapKeyIO(&Joystick, H2R, PULSE+F6,
PULSE+L_ALT+F6);
MapKeyIO(&Joystick, H2D, PULSE+L_SHIFT+F7,
PULSE+L_ALT+F5);
MapKeyIO(&Joystick, H2L, PULSE+L_ALT+'l',
PULSE+L_CTL+'l');
MapKeyIO(&Joystick, H3U, PULSE+L_ALT+'y',
PULSE+L_SHIFT+'y');
MapKeyIO(&Joystick, H3R, PULSE+L_CTL+'z',
PULSE+L_CTL+'y');
MapKeyIO(&Joystick, H3D, PULSE+L_ALT+'u',
PULSE+L_SHIFT+'u');
MapKeyIO(&Joystick, H3L, PULSE+L_CTL+'x',
PULSE+L_CTL+'u');
MapKeyIO(&Joystick, H4U, PULSE+L_SHIFT+F1,
PULSE+F1);
MapKeyIO(&Joystick, H4R, PULSE+'u',
PULSE+F4);
MapKeyIO(&Joystick, H4D, PULSE+F2,
PULSE+F8);
MapKeyIO(&Joystick, H4L, PULSE+L_ALT+F4,
PULSE+L_SHIFT+F4);
MapKeyIO(&Joystick, H4P, PULSE+'c',
PULSE+'c');
MapKeyIO(&Joystick, H1U, UARROW,
UARROW);
MapKeyIO(&Joystick, H1D, DARROW,
DARROW);
MapKeyIO(&Joystick, H1L, KP7,
LARROW);
MapKeyIO(&Joystick, H1R, KP9,
RARROW);
MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Joystick, JOYX, 0, 0, 0, 0, 0);
MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Joystick, JOYY, 0, 0, 0, 0, 0);
//Throttle keymapping below.
MapKeyIO(&Throttle, SC, PULSE+'p',
PULSE+'p');
MapKeyIO(&Throttle, MSP, PULSE+'0',
PULSE+TAB);
MapKeyIO(&Throttle, MSU, PULSE+'5',
PULSE+'1');
MapKeyIO(&Throttle, MSR, PULSE+'6',
PULSE+'2');
MapKeyIO(&Throttle, MSD, PULSE+'7',
PULSE+'3');
MapKeyIO(&Throttle, MSL, PULSE+'8',
PULSE+'4');
MapKeyIO(&Throttle, SPDF, PULSE+L_ALT+'b',
PULSE+L_ALT+'b');
MapKeyIO(&Throttle, SPDB, PULSE+'9',
PULSE+L_ALT+'c');
MapKeyIO(&Throttle, BSF, PULSE+'w',
PULSE+PGDN);
MapKeyIO(&Throttle, BSB, PULSE+'r',
PULSE+PGUP);
MapKeyIO(&Throttle, CHF, PULSE+L_CTL+'m',
PULSE+L_CTL+USB[87]);
MapKeyIO(&Throttle, CHB, PULSE+L_SHIFT+'m',
PULSE+L_CTL+USB[86]);
MapKeyIO(&Throttle, PSF, PULSE+L_SHIFT+'o',
PULSE+'l');
MapKeyIO(&Throttle, PSB, PULSE+L_CTL+'f',
PULSE+L_SHIFT+'l');
MapKeyIO(&Throttle, LTB, PULSE+R_CTL+R_ALT+F12,
PULSE+'m');
MapKeyIO(&Throttle, EFLNORM, PULSE+L_SHIFT+'d',
PULSE+L_SHIFT+'d');
MapKeyIO(&Throttle, EFRNORM, PULSE+L_ALT+'m',
PULSE+L_ALT+'m');
MapKeyIO(&Throttle, EOLMOTOR, PULSE+R_CTL+KP1,
PULSE+R_CTL+KP1);
MapKeyIO(&Throttle, EORMOTOR, PULSE+R_CTL+KP3,
PULSE+R_CTL+KP3);
MapKeyIO(&Throttle, APUON, PULSE+L_ALT+'h',
PULSE+L_CTL+'c');
MapKeyIO(&Throttle, LDGH, L_CTL+'e',
L_CTL+'e');
MapKeyIO(&Throttle, FLAPU, PULSE+'v',
PULSE+'v');
MapKeyIO(&Throttle, FLAPD, PULSE+'f',
PULSE+'f');
MapKeyIO(&Throttle, RDRNRM, PULSE+L_ALT+'r',
PULSE+L_ALT+'r');
MapKeyIO(&Throttle, APENG, PULSE+L_CTL+'a',
PULSE+L_CTL+'a');
MapKeyIO(&Throttle, APPAT, PULSE+'a',
PULSE+'a');
MapKeyIO(&Throttle, APALT, PULSE+L_SHIFT+'a',
PULSE+L_SHIFT+'a');
MapKeyIO(&Throttle, EOLIGN, PULSE+R_CTL+KP2,
PULSE+R_CTL+KP2);
MapKeyIO(&Throttle, EORIGN, PULSE+R_CTL+KP4,
PULSE+R_CTL+KP4);
MapKeyIOUMD(&Throttle, EACON, PULSE+'g',
PULSE+'g');
MapKeyIO(&Throttle, CSU, PULSE+PGUP,
PULSE+L_ALT+KP1);
MapKeyIO(&Throttle, CSD, PULSE+PGDN,
PULSE+L_ALT+KP2);
MapKeyIO(&Throttle, CSR, PULSE+L_ALT+KP3,
PULSE+L_ALT+KP3);
MapKeyIO(&Throttle, CSL, PULSE+L_ALT+KP4,
PULSE+L_ALT+KP4);
MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCX, 0, 0, 0, 0, 0);
MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCY, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetJCurve(&Throttle, THR_RIGHT, 50, 75);
MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetJCurve(&Throttle, THR_LEFT, 50, 75);
MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_FC, 0, 0, 0, 3, 0);
//L & R MFD keymapping below.
//L & R MFD keymapping below.
MapKeyIO(&LMFD, OSB01,0,
PULSE+'1');
MapKeyIO(&LMFD, OSB02,0,
PULSE+'2');
MapKeyIO(&LMFD, OSB03,0,
PULSE+'3');
MapKeyIO(&LMFD, OSB04,0,
PULSE+'4');
MapKeyIO(&LMFD, OSB05,0,
PULSE+'5');
MapKeyIO(&LMFD, OSB06,0,
PULSE+'6');
MapKeyIO(&LMFD, OSB07,0,
PULSE+'7');
MapKeyIO(&LMFD, OSB08,0,
PULSE+'8');
MapKeyIO(&LMFD, OSB09,0,
PULSE+'9');
MapKeyIO(&LMFD, OSB10,0,
PULSE+'q');
MapKeyIO(&LMFD, OSB11,0,
PULSE+'w');
MapKeyIO(&LMFD, OSB12,0,
PULSE+'e');
MapKeyIO(&LMFD, OSB13,0,
PULSE+DX13);
MapKeyIO(&LMFD, OSB14,0,
PULSE+DX14);
MapKeyIO(&LMFD, OSB15,0,
PULSE+'t');
MapKeyIO(&LMFD, OSB16,0,
PULSE+'g');
MapKeyIO(&LMFD, OSB17,0,
PULSE+DX17);
MapKeyIO(&LMFD, OSB18,0,
PULSE+DX18);
MapKeyIO(&LMFD, OSB20,0,
PULSE+L_CTL+'0');
MapKeyIO(&LMFD, SYMU,0,
PULSE+L_SHIFT+'n');
MapKeyIO(&LMFD, SYMD,0,
PULSE+L_CTL+'n');
MapKeyIO(&LMFD, CONU,0,
PULSE+L_CTL+'o');
MapKeyIO(&LMFD, COND,0,
PULSE+L_ALT+'o');
MapKeyIO(&LMFD, BRTU,0,
DOWN+L_SHIFT+'g');
MapKeyIO(&LMFD, BRTD,0,
PULSE+L_CTL+'g');
MapKeyIO(&LMFD, GAINU,0,
L_CTL+'m');
MapKeyIO(&LMFD, GAIND,0,
L_SHIFT+'m');
MapKeyIO(&RMFD, OSB01,0,
PULSE+L_CTL+'f');
MapKeyIO(&RMFD, OSB02,0,
PULSE+L_SHIFT+'o');
MapKeyIO(&RMFD, OSB03,0,
PULSE+KP4);
MapKeyIO(&RMFD, OSB04,0,
PULSE+KP5);
MapKeyIO(&RMFD, OSB05,0,
L_ALT+'f');
MapKeyIO(&RMFD, OSB06,0,
PULSE+L_ALT+KP1);
MapKeyIO(&RMFD, OSB07,0,
PULSE+L_ALT+KP2);
MapKeyIO(&RMFD, OSB08,0,
PULSE+'i');
MapKeyIO(&RMFD, OSB11,0,
PULSE+L_CTL+'/');
MapKeyIO(&RMFD, OSB14,0,
PULSE+L_SHIFT+'.');
MapKeyIO(&RMFD, OSB15,0,
PULSE+L_SHIFT+'^');
MapKeyIO(&RMFD, OSB20,0,
PULSE+L_ALT+KP3);
MapKeyIO(&RMFD, BRTU,0,
DOWN+L_CTL+USB[87]);
MapKeyIO(&RMFD, BRTD,0,
DOWN+L_CTL+USB[86]);
MapKeyIO(&RMFD, GAINU,0,
PULSE+L_CTL+'1');
MapKeyIO(&RMFD, GAIND,0,
PULSE+L_CTL+'2');
}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
}

Inline advert (2nd and 3rd post)

#4305866 - 10/24/16 08:59 AM Re: Problems with Cougar MFD and TARGET! [Re: Pelle_H]  
Joined: Sep 2010
Posts: 104
Dimebug Offline
Member
Dimebug  Offline
Member

Joined: Sep 2010
Posts: 104
France
tested your script, it works well. Your facing some bad usb port management from windows...
Check that you have the latest T.A.R.G.E.T version and update your MFD drivers https://support.thrustmaster.com/en/product/mdfcougar-en/

then reboot and retry. The script may not run well th efirst time because Windows may takes some times to detect and install the virtual controller.

If you still have problems, check this, your issue is coming from the power management of windows : https://support.microsoft.com/en-us/kb/2900614

https://forums.eagle.ru/showthread.php?t=115816&page=4


Guillaume "Dimebug" Leleve
#4306030 - 10/24/16 07:26 PM Re: Problems with Cougar MFD and TARGET! [Re: Pelle_H]  
Joined: Oct 2011
Posts: 14
Pelle_H Offline
Junior Member
Pelle_H  Offline
Junior Member

Joined: Oct 2011
Posts: 14
Mölnbo, Sweden
THX Dimebug, good to know I hadné srewed up the script! I went into dedv.manager and found a few USB port being managed by windows so I changed them. I´ll do some tests and report back soon. (Is the M$ support note valid for W10 too?)

#4306313 - 10/25/16 09:36 PM Re: Problems with Cougar MFD and TARGET! [Re: Pelle_H]  
Joined: Oct 2011
Posts: 14
Pelle_H Offline
Junior Member
Pelle_H  Offline
Junior Member

Joined: Oct 2011
Posts: 14
Mölnbo, Sweden
Well, sorry to say updating and reinstalling didn´t help, neither the powermanagement routine! I even tried the PM routine described inthe DCS forum topic but NO! Guess i´ll haveto use the MFDs as DX devices then.

#4314865 - 11/24/16 01:52 PM Re: Problems with Cougar MFD and TARGET! [Re: Pelle_H]  
Joined: Oct 2010
Posts: 83
Nicu Offline
Junior Member
Nicu  Offline
Junior Member

Joined: Oct 2010
Posts: 83
Try installing the drivers from Thrustmaster support site.


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Actors portraying US Presidents
by PanzerMeyer. 04/19/24 12:19 PM
Dickey Betts was 80
by Rick_Rawlings. 04/19/24 01:11 AM
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
Grumman Wildcat unique landing gear
by Coot. 04/17/24 03:54 PM
Peter Higgs was 94
by Rick_Rawlings. 04/17/24 12:28 AM
Whitey Herzog was 92
by F4UDash4. 04/16/24 04:41 PM
Anyone can tell me what this is?
by NoFlyBoy. 04/16/24 04:10 PM
10 Years ago MV Sewol
by wormfood. 04/15/24 08:25 PM
Pride Of Jenni race win
by NoFlyBoy. 04/15/24 12:22 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0