How do I get my Fragpedal Quad to work?

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

How do I get my Fragpedal Quad to work?

Postby durpthesecond » Fri Feb 15, 2019 5:12 pm

*EDIT* see the post below, the text here wasn't relevant anymore.
Last edited by durpthesecond on Fri Feb 15, 2019 7:39 pm, edited 1 time in total.
User avatar
durpthesecond
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Sun Nov 25, 2018 1:53 pm

Re: How do I get my Fragpedal Quad to work?

Postby durpthesecond » Fri Feb 15, 2019 7:38 pm

Update: OK, I've now managed to connect the fragpedal quad, program one of the pedals to send out a "KEY_1" signal, and then use an input translator in Gtuner to convert "KEY_1" into "BUTTON_5". But is there any way to do, say, the following:

Code: Select all
 
if(event_active(KEY_1))
{
      combo_run(doublejump);
}
 


Basically, I've run out of inputs on the Xbox controller, so now I'm trying to use the pedals to free some of them up.
User avatar
durpthesecond
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Sun Nov 25, 2018 1:53 pm

Re: How do I get my Fragpedal Quad to work?

Postby Scachi » Fri Feb 15, 2019 7:53 pm

Download the xkeys example from the online resource and put the .gph header file into the same directory you put this script in:
Code: Select all
 
 
#define KEYS_TO_MONITOR_MAX 2 // set to the maximum of key states you want to track
 
#include "xkeys.gph"
 
uint8 KEY1, SomeName;
 
init {
  // use xkeys_add to add a key to monitoring, it return an uint8 number that has to be used for checking
  KEY1=xkeys_add(KEY_1); // add  key_1 to monitoring , using name KEY1
  SomeName=xkeys_add(KEY_2); // add a key_2 to monitoring, using name SomeName
}
 
main { 
  // **** events ****
  if (xkeys_event_active(KEY1))  {
    printf("key event active");
    combo_run(doublejump);
  }
  if (xkeys_event_release(SomeName)) printf("key event release for SomeName");
}
 
combo doublejump {
  printf("dblj_combo");
}


Take a look here for more information:
viewtopic.php?f=23&t=10201
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: How do I get my Fragpedal Quad to work?

Postby durpthesecond » Fri Feb 15, 2019 8:51 pm

Nice! Thanks very much = )
User avatar
durpthesecond
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Sun Nov 25, 2018 1:53 pm


Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 117 guests