mxyconverter_voffset output delay

GPC2 script programming for Titan Two. Code examples, questions, requests.

mxyconverter_voffset output delay

Postby Soichi » Fri Feb 07, 2020 2:39 pm

Im testing mxyconverter_voffset function for making anti-recoil script.
I convined time_active() func and mxyconverter_voffset() func for controling complicated recoil.
It seems like mxyconverter_voffset is not immediately reflected to output.
Do you know y this happens.


example code
Code: Select all
 
if(get_actual(BUTTON_5) && time_active(BUTTON_5) < 500 ){
    mxyconverter_voffset(15);
}
else{
    set_val(BUTTON_5, 0.0);
    mxyconverter_voffset(0);
}
 


example code output
measure.png
measure.png (209.39 KiB) Viewed 755 times
User avatar
Soichi
Corporal
Corporal
 
Posts: 5
Joined: Fri Feb 07, 2020 2:10 pm

Re: mxyconverter_voffset output delay

Postby J2Kbr » Wed Feb 12, 2020 7:19 pm

I tested your script and for me the times seems to be consistent:
mouse.png
mouse.png (34.72 KiB) Viewed 721 times

What mouse you are using? it is set to 1000HZ?
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: mxyconverter_voffset output delay

Postby Soichi » Fri Feb 14, 2020 3:12 pm

Thanks to reply.
Im using logitech G Pro Gaming mouse with 12000dpi 1000Hz settings.
Using Titan two without external power adapter.

I found mxyconverter_voffset output enabled at the moment mouse status updated.
I checked my mouse by using mouse_status(MREPORT_UPDATED) func.
When i keep the mouse still, mouse status is not updated.
I guess this is the point of problem.

J2Kbr, what mouse you are using?
Are you using external power adapter?
When you keep the mouse still, does mouse_status(MREPORT_UPDATED) func return TRUE or FALSE?
User avatar
Soichi
Corporal
Corporal
 
Posts: 5
Joined: Fri Feb 07, 2020 2:10 pm

Re: mxyconverter_voffset output delay

Postby DontAtMe » Fri Feb 14, 2020 7:51 pm

Soichi wrote:does mouse_status(MREPORT_UPDATED) func return TRUE or FALSE?
This function only returns true once it has received a new mouse report.

If you are not pressing or releasing any of the mouse buttons and not moving the mouse what so ever, it will return false.
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: mxyconverter_voffset output delay

Postby J2Kbr » Fri Feb 14, 2020 8:12 pm

Soichi wrote:J2Kbr, what mouse you are using?

Logitech G502 configured to 12000dpi and 1000Hz.

Soichi wrote:Are you using external power adapter?

Normally I don't use external power supply, only when needed. Which is not the case when I play with mouse.

Soichi wrote:When you keep the mouse still, does mouse_status(MREPORT_UPDATED) func return TRUE or FALSE?

With mouse still, this GPC function returns FALSE.

BTW: When I tested your code I also had a PS4 controller plugged to the Titan Two. I will test with only the mouse to check if there is any difference on my results.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: mxyconverter_voffset output delay

Postby Soichi » Sat Feb 15, 2020 12:40 am

I always unplug PS4 controller from Titan Two when I debug gpc, cause its has just 4 USB ports(mouse, keyboard, debug cable, output cable).
So I tested voffset func while PS4 controller plugged to Titan Two.

voffset_output_2.jpg
voffset_output_2.jpg (73.49 KiB) Viewed 685 times


Everything is perfect.
Thanks J2Kbr,
User avatar
Soichi
Corporal
Corporal
 
Posts: 5
Joined: Fri Feb 07, 2020 2:10 pm

Re: mxyconverter_voffset output delay

Postby J2Kbr » Wed Feb 19, 2020 6:43 am

Glad you got working as expected with the controller.

In any case, I will be taking a look to check why set to 0 does not apply the value immediately without the controller.

https://github.com/J2Kbr/TitanTwo/issues/259
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 91 guests