desson104 / nulldc

Automatically exported from code.google.com/p/nulldc
0 stars 0 forks source link

Purupuru triggers #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using a wheel and pedals in F355 Challenge, the throttle would die off when the 
pedal was near or at the maximum amplitude.

In PuruPuru.cpp I found this:

if(axis > 0)  return  axis/128

But I thought the reach of the trigger was 255 and the the axis 32767 which 
would make the return value 256 I guess. I found this formula produces better 
values if the maximum values are as I assumed:

if(axis > 0)  return  (axis * 2 + 1)/257

Original issue reported on code.google.com by torkel...@gmail.com on 11 Jun 2010 at 3:04

GoogleCodeExporter commented 9 years ago
Well, 32767/128 gives 255.99 which I assume should be truncated to 255 since 
it's INT/INT.

I'll compile one with your method, so you can test it.

Original comment by KrossX3 on 11 Jun 2010 at 3:22

GoogleCodeExporter commented 9 years ago
Here: http://www.mediafire.com/?zlyuddzozhi

I changed every Axis to Trigger with your method.

Original comment by KrossX3 on 11 Jun 2010 at 3:30

GoogleCodeExporter commented 9 years ago
This is the problem.... Axis: -32768 to 32767. The negative case... would give 
256. XD

Original comment by KrossX3 on 11 Jun 2010 at 3:41

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
KrossX3,

I got an issue that revolves around setting the trigger inputs to other inputs. 
In Test Drive Le Mans, midway thro a race, i changed the trigger inputs to my 
right analog stick input. RT > RY+, LT > RY- 

RT > RY+ works, however, LT > RY- doesn't. That means the brake doesn't work. 
Could you look at that? Thanks.

I'm using the xbox360 controller with purupuru input plugin.

Original comment by vadimurputi on 11 Jun 2010 at 4:13

GoogleCodeExporter commented 9 years ago
It's probably the same thing. Give the link a try and test it.

Original comment by KrossX3 on 11 Jun 2010 at 4:27

GoogleCodeExporter commented 9 years ago
Tried it.

I think i understand the issue now. If I move the stick all the way down (max), 
it will register nothing, anything less than max will register the brakes. The 
issue is still there with your new r46.

Original comment by vadimurputi on 11 Jun 2010 at 6:24

GoogleCodeExporter commented 9 years ago
That is odd. It should've worked with torkel104's method. I'll change it and 
add some safety checks.

Original comment by KrossX3 on 11 Jun 2010 at 6:32

GoogleCodeExporter commented 9 years ago
Try this one: http://www.mediafire.com/?zujmmmme2mj

Is the way it was before, but with the safety checks.

Original comment by KrossX3 on 11 Jun 2010 at 6:45

GoogleCodeExporter commented 9 years ago
Sorry, my bad. I left the plugin in the main folder.

It worked!! Thanks!

Original comment by vadimurputi on 11 Jun 2010 at 8:25

GoogleCodeExporter commented 9 years ago
Both links worked great for me. Thanks.

Original comment by torkel...@gmail.com on 11 Jun 2010 at 10:38

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r47.

Original comment by KrossX3 on 11 Jun 2010 at 10:05

GoogleCodeExporter commented 9 years ago
I used the safety checks of the second file. Basically, because it was already 
done so I only had to review it. =P

Original comment by KrossX3 on 11 Jun 2010 at 10:07