Latest Titan Two update + XIM4

Titan Two general support. Questions, firmware update, feature request.

Re: Latest Titan Two update + XIM4

Postby monty34 » Tue Mar 13, 2018 6:57 pm

Sillyasskid wrote:I have not received my Apex yet. I should have it this week. So I cant be of much help until then. Sorry.

Other news, I figured out how to have both sticks working along with the mouse.
Both sticks will remain fullly analog using this script.

Unfortunately The triggers will have to remain digital. There is no work around to this.

Code: Select all
#pragma METAINFO("Xim4 Mouse/key/Joystick Passthu", 1, 0, "Sillyasskid")
#define MODE == // Don't Edit or Delete This Line.
#define TRUE !FALSE // Don't Edit or Delete This Line.
#define \
        \
          SET_KEYS FALSE // Change to TRUE if you need to bind your keys in the Xim Manager.

        \
        \
init {
mousemapping();
}
main {
mouse_passthru();
key_passthru();
joystick_passthru();
}
 
void joystick_passthru(bool val){
 
  if(get_actual(22) >= 0.0) set_val(4, 50.2); else set_val(4, 48.2);
  if(get_actual(21) <= 0.0) set_val(7, 48.2); else set_val(7, 50.2);
 
  if(get_actual(24) < -99.0) key_set(26, 1); if(get_actual(24) > 99.0) key_set(22, 1);
  if(get_actual(23) < -99.0) key_set(04, 1); if(get_actual(23) > 99.0) key_set(07, 1);
 
  set_val(21, get_actual(22)), set_val(22, get_actual(21));
 
  mouse_set(4, ((get_actual(4) > 1f) == 1 ? 1 : mouse_status(4)));
  key_set(104, get_actual(7) > 1f && 1 || 0);
 
#define DEADZONE_SET(IO_BUTTON, neg, pos) if(get_actual(IO_BUTTON) > (fix32) pos && get_actual(IO_BUTTON) < (fix32) neg) set_val(IO_BUTTON, 0) 
  DEADZONE_SET(22, -10, 10);
  DEADZONE_SET(21, -10, 10);
 
  if(val != NULL) set_val(4, 0), set_val(7, 0);
 
  return;
}
 
#if SET_KEYS MODE TRUE // Don't Edit or Delete This Line.
init{printf("Set Keys in Xim Manager Mode");} main {joystick_passthru(1);}  // Don't Edit or Delete This Line.
#else // Don't Edit or Delete This Line.
init{printf("Start");} // Don't Edit or Delete This Line. 
#endif // Don't Edit or Delete This Line.


Thanks for this, it works very well with the G13 Stick :smile0203:
User avatar
monty34
Command Sergeant Major
Command Sergeant Major
 
Posts: 165
Joined: Wed Jun 28, 2017 7:25 pm

Re: Latest Titan Two update + XIM4

Postby MAL8010 » Wed Mar 14, 2018 2:42 pm

J2Kbr wrote:
J2Kbr wrote:
MAL8010 wrote:Been using this with a NAV and Mouse with passthrough to the XIM4 (i.e. T2 plugged into XIM4) successfully, but unfortunately it won't work with the XIM APEX - when playing fornite I just look up at the sky and spin round in circles constantly - anyone have any ideas how to correct this?

It seems the Joystick interface is still being recognized by Apex even with the option to disable it is checked. I have already changed the firmware with a better approach to disable this interface. The new firmware should be out soon.

The updated released yesterday should have take care of this. I couldn't test though because don't have a Apex yet. Please let me know. Thanks.



Missed this post. Tested and the disable joystick option works to disable the joystick.

But using the script posted above by Sillyasskid that allowed Nav passthrough from T2 to XIM doesn't work (i.e. disable joystick option and use this - character just points to the sky and keeps spinning round in circles.

Code: Select all
#include <mouse.gph>
#include <keyboard.gph>
const uint8 mmap[] = {
        MOUSE_X,            STICK_1_X,
        MOUSE_Y,            STICK_1_Y,
        MWHEEL_FORWARD,     BUTTON_14,
        MWHEEL_BACKWARD,    BUTTON_14,
      MBUTTON_4,            BUTTON_4,
//    Back                  Left Bumper 
      MBUTTON_5,            BUTTON_7,
//    Forward               Right Bumper 
      };
init{
mousemapping(mmap);
}
main {
  mouse_passthru();
  key_passthru();
// Make Sure Output Protocol is set to USB Multi Interface HID
 
  set_val(STICK_1_X, 98.818954);
  set_val(STICK_1_Y, 98.822006);
//Disables STICK_1_X & STICK_1_Y for Joystick, this allows the Mouse to work.
 
set_val(BUTTON_5,0);
set_val(BUTTON_8,0);
//These buttons have to remain disabled as XIM4 sees them as an Axis rather than Buttons
 
if (mouse_status(MBUTTON_1) || get_actual(BUTTON_5)) mouse_set(MBUTTON_1,1);
if (mouse_status(MBUTTON_2 || get_actual(BUTTON_8)) mouse_set(MBUTTON_2,1);
//Allows the Mouse buttons, aswell as the triggers to work.
}


I basically just want to be able to use passthrough for the Nav or G13, scripts worked before with XIM but not for the APEX. J2k if you need an APEX I have a spare one and am happy for you to have it?
User avatar
MAL8010
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 263
Joined: Sun Feb 05, 2017 3:12 pm

Re: Latest Titan Two update + XIM4

Postby monty34 » Wed Mar 14, 2018 8:46 pm

Try the one which i quoted from Sillyasskid, this work for with g13 and apex. Enable the Joystick output in Gtuner.
User avatar
monty34
Command Sergeant Major
Command Sergeant Major
 
Posts: 165
Joined: Wed Jun 28, 2017 7:25 pm

Re: Latest Titan Two update + XIM4

Postby MAL8010 » Thu Mar 15, 2018 10:01 am

monty34 wrote:Try the one which i quoted from Sillyasskid, this work for with g13 and apex. Enable the Joystick output in Gtuner.


Thanks, I tried that but have the same issue.

So with the NAV you get WASD (and not analogue) movement but none of the buttons are recognised in XIM (setting the correct option in the script to true) with 'Disable Joystick from Multi Interface HID Output' checked. Uncheck it and I just move around in circles constantly.

It's the same when I try the G13 too.

Code: Select all
#pragma METAINFO("<author_name>", 1, 0, "")
#include <mouse.gph>
#include <keyboard.gph>
#define MODE == // Don't Edit or Delete This Line.
#define TRUE !FALSE // Don't Edit or Delete This Line.
#define \
        \
          SET_KEYS TRUE // Change to TRUE if you need to bind your keys in the Xim Manager.

        \
        \
 
main {
 
    mouse_passthru();
    key_passthru();
    joystick_passthru();
}
 
 
 
 
void joystick_passthru(bool val){
 
  if(get_actual(22) >= 0.0) set_val(4, 50.2); else set_val(4, 48.2);
  if(get_actual(21) <= 0.0) set_val(7, 48.2); else set_val(7, 50.2);
 
  if(get_actual(24) < -99.0) key_set(26, 1); if(get_actual(24) > 99.0) key_set(22, 1);
  if(get_actual(23) < -99.0) key_set(04, 1); if(get_actual(23) > 99.0) key_set(07, 1);
 
  set_val(21, get_actual(22)), set_val(22, get_actual(21));
 
  mouse_set(4, ((get_actual(4) > 1f) == 1 ? 1 : mouse_status(4)));
  key_set(104, get_actual(7) > 1f && 1 || 0);
 
#define DEADZONE_SET(IO_BUTTON, neg, pos) if(get_actual(IO_BUTTON) > (fix32) pos && get_actual(IO_BUTTON) < (fix32) neg) set_val(IO_BUTTON, 0) 
  DEADZONE_SET(22, -10, 10);
  DEADZONE_SET(21, -10, 10);
 
  if(val != NULL) set_val(4, 0), set_val(7, 0);
 
  return;
}
 
#if SET_KEYS MODE TRUE // Don't Edit or Delete This Line.
init{printf("Set Keys in Xim Manager Mode");} main {joystick_passthru(1);}  // Don't Edit or Delete This Line.
#else // Don't Edit or Delete This Line.
init{printf("Start");} // Don't Edit or Delete This Line. 
#endif // Don't Edit or Delete This Line.
 
 
 
User avatar
MAL8010
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 263
Joined: Sun Feb 05, 2017 3:12 pm

Re: Latest Titan Two update + XIM4

Postby monty34 » Mon Mar 19, 2018 6:16 am

Well, i got only circle movements if i set the set key option to true, with false everything is fine with the G13. Only thing what i see is the cpu load goes up to 50% if it's set to true.
User avatar
monty34
Command Sergeant Major
Command Sergeant Major
 
Posts: 165
Joined: Wed Jun 28, 2017 7:25 pm

Re: Latest Titan Two update + XIM4

Postby MAL8010 » Mon Mar 19, 2018 8:12 am

monty34 wrote:Well, i got only circle movements if i set the set key option to true, with false everything is fine with the G13. Only thing what i see is the cpu load goes up to 50% if it's set to true.


Yeah, it's the same for me. But you're supposed to set it to TRUE so you can enable key binds in the XIM Manager. With it set to FALSE it fixes the spinning round in circles aspect but then only a few of the keys are registered in XIM Manager, how are you setting key binds in XIM?

If someone could help with this it would be much appreciated. I just want to be able to use NAV or G13 passthrough from T2 to APEX in the same way it worked find with XIM4. At the moment my Fortnite scripts are useless to me because I'm a NAV plus APEX user.
User avatar
MAL8010
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 263
Joined: Sun Feb 05, 2017 3:12 pm

Previous

Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 104 guests