Yet another get_port question
2 posts
• Page 1 of 1
Yet another get_port question
Hello experts!
Having another problem with get_port here.
Two devices (TM Warthog an VPC MongoosT-50CM2) are connected to ports A and B respectively
I am trying to differentiate same input click or hold coming from these two ports.
The below code seems somewhat working for the momentary clicks, but holding a button (or, more precisely, flipping a switch, which is FLOWR on throttle in this case) apparently blocks get_port from reporting an input coming from the other port:
So, while the throttle FLOWR switch is flipped on, only "TMH FLOWR" messages are appearing, whether the grip hat is pressed or not.
Am I missing something here?
Can be there any solution other then to wait for the full hid access in GPC?
Having another problem with get_port here.
Two devices (TM Warthog an VPC MongoosT-50CM2) are connected to ports A and B respectively
I am trying to differentiate same input click or hold coming from these two ports.
The below code seems somewhat working for the momentary clicks, but holding a button (or, more precisely, flipping a switch, which is FLOWR on throttle in this case) apparently blocks get_port from reporting an input coming from the other port:
- Code: Select all
#include <ps4.gph>
bool FLOWR; // TMW FLOWR BUTTON3
bool LCP; // VPC lower center hat BUTTON3
main {
set_val(BUTTON_3, 0.0);
combo_run(b3t);
combo_run(b3v);
combo_run(Logger);
}
combo b3t {
FLOWR = ((get_port(BUTTON_3) == PORT_USB_A) && get_actual(BUTTON_3))?TRUE:FALSE;
}
combo b3v {
LCP = ((get_port(BUTTON_3) == PORT_USB_B) && get_actual(BUTTON_3))?TRUE:FALSE;
}
combo Logger {
if(FLOWR) { printf("TMH FLOWR"); }
if(LCP) { printf("VPC lower center press"); }
wait(0);
wait(1000);
}
So, while the throttle FLOWR switch is flipped on, only "TMH FLOWR" messages are appearing, whether the grip hat is pressed or not.
Am I missing something here?
Can be there any solution other then to wait for the full hid access in GPC?
-
trancaruas - Private First Class
- Posts: 3
- Joined: Fri Sep 20, 2019 7:23 pm
Re: Yet another get_port question
I guess the current implementation of get_port is limited to return only one value, so it can't be PORT_USB_A and PORT_USB_B.
Looks like we need a new function like "check_port(BUTTON_3,PORT_USB_A)" to check for different ports activity on the same button.
Looks like we need a new function like "check_port(BUTTON_3,PORT_USB_A)" to check for different ports activity on the same button.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
2 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 78 guests