Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 602271 Details for
Bug 845768
jscal cannot calibrate a joystick with an always-on button
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to allow jscal to calibrate joysticks that leave a button pressed all the time
joystick-1.2.15-base_buttons.patch (text/plain), 1.11 KB, created by
Kevin L. Mitchell
on 2012-08-04 19:28:28 UTC
(
hide
)
Description:
Patch to allow jscal to calibrate joysticks that leave a button pressed all the time
Filename:
MIME Type:
Creator:
Kevin L. Mitchell
Created:
2012-08-04 19:28:28 UTC
Size:
1.11 KB
patch
obsolete
>diff -ruN joystick-1.2.15/jscal.c joystick-1.2.15-base_buttons/jscal.c >--- joystick-1.2.15/jscal.c 1999-11-17 11:44:11.000000000 -0600 >+++ joystick-1.2.15-base_buttons/jscal.c 2012-08-04 14:10:32.728801528 -0500 >@@ -201,6 +201,7 @@ > void calibrate() > { > int i, j, t; >+ int base_buttons; > > for (i=0; i<MAX_AXES; i++) { > corr[i].type = JS_CORR_NONE; >@@ -252,13 +253,13 @@ > } > #endif > >- >+ base_buttons = js.buttons; > for (j = 0; j < axes; j++) > for (i = 0; i < NUM_POS; i++) { >- while(js.buttons) wait_for_event(fd, &js); >+ while(js.buttons != base_buttons) wait_for_event(fd, &js); > printf("Move axis %d to %s position and push any button.\n", j, pos_name[i]); > >- while (!js.buttons) { >+ while (js.buttons == base_buttons) { > print_position(j, js.axis[j]); > wait_for_event(fd, &js); > } >@@ -270,7 +271,7 @@ > > t = get_time(); > >- while (get_time() < t + 2000 && js.buttons) { >+ while (get_time() < t + 2000 && js.buttons != base_buttons) { > if (js.axis[j] < corda[j].cmin[i]) corda[j].cmin[i] = js.axis[j]; > if (js.axis[j] > corda[j].cmax[i]) corda[j].cmax[i] = js.axis[j]; > wait_for_event(fd, &js);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 845768
: 602271