Author Topic: Using two T16000 and T.A.R.G.E.T. in Diaspora  (Read 10478 times)

0 Members and 1 Guest are viewing this topic.

Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
I am so noobish, lol. I have to look it up in a few hours when I am ready to give it some time. Been busy with other stuff this few days, and just watched some scating in the Olympics. It's raining medals for the Dutch :). Just watched a titan race... again 3 medal :P.

Ahum... back on topic... I also posted this thread on Roberts. (You know...Space Citizen..)
In case anybody there got idea's about my code that gets posted there (and still have to edit it there the way I did here)..here's the post:
Got to give away my secret ID there now, lol..

https://forums.robertsspaceindustries.com/discussion/105534/using-two-t16000-and-t-a-r-g-e-t-in-diaspora#latest

Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

  
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
arrgg... F1-F12= nonbindable keys the game says!
Got to redo the entire right POV options in code. 8+ of them.
Short of logical options now... I feel two more days of puzzling coming up...:P

Sorry for the dead horse guys... I feel it's still possible, but I need to get into it for a lot of hours again...


and.....done stuff that should solve the F1-9 problem :)


''Never give up....never back down!''  :lol: -commander Taggart
« Last Edit: February 19, 2014, 02:07:33 pm by Rakebuzz »
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Hello,

Got some (97%) working code now. Sorry it took a while. Lot's of other stuff I had to do at home  :nod:

I still (only) have some POV-issues left, and my C is lacking the knowhow. I posted on several sites, and expect an answer soon (I hope)
Here is one site I swamped with code and question about the POV..
http://cboard.cprogramming.com/game-programming/162353-programming-t-r-g-e-t-uses-c.html

If any C expert(s) want to help out? Please click on the link and read the issue? I am sure there is C-code to solve the POV-issues (I got two, and one of them looks simple if you know your C ),  My C logic is at flaw here... 'almosts' do not work in C, lol..

Maybe I will program the two sliders I haven't done anything with yet too soon. Not sure if they are handy in case I don't get my POV issues resolved. I guess they might ...

I will leave the code on page one here unaltered, because it explaines the following code a lot. Too much work to integrate page-1-stuff in the following. It kinda speaks for itself.

Code: [Select]

include "target.tmh"
include "Macros_test1.ttm"
alias T16001; // second T16000 handle, which will be used all mapping commands

//program startup
int main()
{
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
&T16001 = GetIndexJoy (SelectUsbDevice ("VID_044F&PID_B10A"));

//right one
MapAxis(&T16000, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
MapAxis(&T16000, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetCustomCurve(&T16000, JOYY, LIST (0,100, 25,75, 50,50, 75,75, 100,100)); //this little trick lets you use thrusters at both the push and the pull , cause the stick is now programmed to do this if I am correct, lol
KeyAxis(&T16000, JOYY, 0, AXMAP2 (3, USB[0x4B], 0, USB[0x4E])); //PGUP & PGDN
MapAxis(&T16000, RUDDER, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
KeyAxis(&T16000, RUDDER, 0, AXMAP2 (3, USB[0x52], 0, USB[0x51])); //'UARROW',0 , 'DARROW'

//left one
MapAxis(&T16001, JOYX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
KeyAxis(&T16001, JOYX, 0, AXMAP2 (3, USB[0x50], 0, USB[0x4F])); //'LARROW', 'RARROW'
MapAxis(&T16001, JOYY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
MapAxis(&T16001, RUDDER, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);

// everything behind two of these is ignored by the program T.A.R.G.E.T.
//this second (right) POV is not seen at all, need to ask about it to smart people...
//MapKey(&T16000, H1U, Match_Target_Speed);

//MapKey(&T16000, H1R, Toggle_Gliding);

//MapKey(&T16000, H1D, Launch_Countermeasures);

//MapKey(&T16000, H1L, Afterburners);



MapKey(&T16000, TS1, Fire_Primary_Weapon);
MapKey(&T16000, TS2, L_SHIFT);
MapKey(&T16000, TS3, L_ALT);
MapKey(&T16000, TS4, Cycle_Forward_Primary_Weapon);


MapKey(&T16000, B5, Rearm_Me);
MapKey(&T16000, B6, Augment_Forward_Shield);
MapKey(&T16000, B7, Equalize_Energy);

MapKey(&T16000, B10, Disarm_My_Target);
MapKey(&T16000, B9, Attack_My_Target);
MapKey(&T16000, B8, Capture_My_Target);

MapKey(&T16000, B13, Ignore_My_Target);
MapKey(&T16000, B12, Communication_Menu);
MapKey(&T16000, B11, Toggle_Auto_Speed_Matching);

MapKey(&T16000, B14, Engage_the_Enemy);
MapKey(&T16000, B15, Cover_Me);
MapKey(&T16000, B16, Return_To_Base);


MapKey(&T16001, H1U, Center_View);

MapKey(&T16001, H1R, View_Right);

MapKey(&T16001, H1D, View_Rear);

MapKey(&T16001, H1L, View_Left);



MapKey(&T16001, TS1, Fire_Secondary_Weapon);
MapKey(&T16001, TS2, L_SHIFT);
MapKey(&T16001, TS3, Cycle_Secundary_Weapon_Bank);
MapKey(&T16001, TS4, Target_Next_Closest_Hostile_Ship);


MapKey(&T16001, B11, Target_Ship_In_Reticle);
MapKey(&T16001, B12, Target_subsystem_In_Reticle);
MapKey(&T16001, B13, Target_Targets_Nearest_Attacker);

MapKey(&T16001, B16, Toggle_Auto_Targeting);
MapKey(&T16001, B15, Target_Last_Ship_That_Transmitted);
MapKey(&T16001, B14, Target_Next_Live_Turret);

MapKey(&T16001, B7, Target_Next_Ship);
MapKey(&T16001, B6, Decreaee_View_Distance);
MapKey(&T16001, B5, Increase_View_Distance);

MapKey(&T16001, B8, Target_Closest_Friendly_Ship);
MapKey(&T16001, B9, Cycle_Radar_Range);
MapKey(&T16001, B10, Target_Newest_ship_In_Area);



}

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

//add event handling code here
}


and here the Macros_test1.ttm code

Code: [Select]
//T16001 POV, left one
define Center_View '1'
//define View_Up '2'
define View_Right '3'
//define Free_Look '4'
define View_Rear '5'
//define External_View '6'
define View_Left '7'
//define Current_Target_View '8'
//even ones are in-betweens, and not seen as seperates ones yet, but as both ones neighbouring it. asked about it... no reply yet.

define Fire_Secondary_Weapon '9'
define Cycle_Secundary_Weapon_Bank 'm'
define Target_Next_Closest_Hostile_Ship 'r'
define Target_Ship_In_Reticle 'q'
define Target_subsystem_In_Reticle 'w'
define Target_Targets_Nearest_Attacker 'e'
define Toggle_Auto_Targeting 'a'
define Target_Last_Ship_That_Transmitted 's'
define Target_Next_Live_Turret 'd'
define Target_Next_Ship 't'
define Decreaee_View_Distance 'y'
define Increase_View_Distance 'u'
define Target_Closest_Friendly_Ship 'f'
define Cycle_Radar_Range 'g'
define Target_Newest_ship_In_Area 'h'


//this POV not seen at all...
//define Match_Target_Speed KP1
//define Toggle_Gliding KP3
//define Launch_Countermeasures KP5
//define Afterburners KP7

define Fire_Primary_Weapon KP9
define Cycle_Forward_Primary_Weapon '0'

define Rearm_Me 'i'
define Augment_Forward_Shield 'o'
define Equalize_Energy 'p'
define Disarm_My_Target 'z'
define Attack_My_Target 'x'
define Capture_My_Target 'c'
define Ignore_My_Target 'j'
define Communication_Menu 'k'
define Toggle_Auto_Speed_Matching 'l'
define Engage_the_Enemy 'v'
define Cover_Me 'b'
define Return_To_Base 'n'
« Last Edit: March 29, 2014, 02:12:12 pm by Rakebuzz »
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 
 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Yo, take a look at this thread and a bit of a gander potentially at these too. Personally, I use vJoy to create a virtual joystick and then UCR to actually map the axes/buttons from my real HOTAS/pedal setup to the virtual stick, boot Knossos with the virtual joystick selected, and it works a treat. I only had a skim of this thread, but I daresay that broad method should work for your two joystick setup. Let us know how you go.