| 1 |
Pre Release Testing: |
| 2 |
==================== |
| 3 |
|
| 4 |
* check the version number |
| 5 |
|
| 6 |
VERSION="0.1.0" |
| 7 |
TAG="v${VERSION}" |
| 8 |
git tag -s "${TAG}" -m "jstest-gtk ${TAG}" |
| 9 |
git archive --format=tar --prefix="jstest-gtk-${VERSION}/" ${TAG} | bzip2 -c > /tmp/jstest-gtk-${VERSION}.tar.bz2 |
| 10 |
git push --tags |
| 11 |
|
| 12 |
========== |
| 13 |
[[ TODO ]] |
| 14 |
========== |
| 15 |
|
| 16 |
* add ability to plot axis values into a dynamic 2d graph (good for seeing steps/noise) |
| 17 |
|
| 18 |
* use libudev for automatic detection of newly plugged in joysticks |
| 19 |
(would allow getting the correct evdev and doing proper reset of |
| 20 |
joystick calibration values without replug) |
| 21 |
|
| 22 |
* axis mapping seems to behave broken |
| 23 |
|
| 24 |
* grey out Properties when no joystick is present in the list |
| 25 |
|
| 26 |
* Refresh doesn't work (can't find images) |
| 27 |
|
| 28 |
* display "No joystick found" when no joystick is available |
| 29 |
|
| 30 |
* [ Save Profile ] |
| 31 |
|-----------------------| |
| 32 |
| Name: ............... | |
| 33 |
| [*] save calibration | |
| 34 |
| [*] save calibration | |
| 35 |
| [Cancel] [Ok] | |
| 36 |
|
| 37 |
Give Overwrite warning when name matches existing one. |
| 38 |
|
| 39 |
* implement command line profile load |
| 40 |
|
| 41 |
* use while loop in Joystick::update |
| 42 |
|
| 43 |
* don't pop up new dialogs when old ones are still present |
| 44 |
|
| 45 |
* [FEATURE] Load and save presets in devices, and to load them automatically |
| 46 |
when you connect the device. |
| 47 |
|
| 48 |
* [CLEANUP] sync evtest_helper.?pp, make sure no boost dependency is |
| 49 |
present |
| 50 |
|
| 51 |
* [CLEANUP] center font in ButtonWidget (current way is a dirty hack) |
| 52 |
|
| 53 |
* [FEATURE] axis names (ABS_X, ...) should be used instead of raw axis numbers |
| 54 |
to guess which layout is correct, also the layout should be properly |
| 55 |
labeled |
| 56 |
|
| 57 |
* [BUG] add some more checks to catch invalid button/axis mappings supplied |
| 58 |
to the joydev interface |
| 59 |
|
| 60 |
* [FEATURE] provide additional support for SDL and evdev devices |
| 61 |
|
| 62 |
|
| 63 |
================================= |
| 64 |
[[ Possible Future Improvments ]] |
| 65 |
================================= |
| 66 |
|
| 67 |
* [FEATURE] Possibility of activate noise reduction in joystick axis |
| 68 |
(read only field, but can't hurd to have it, in case any app wants |
| 69 |
to play with it) |
| 70 |
|
| 71 |
* Joystick Database, base it on evdev, not joydev: |
| 72 |
|
| 73 |
* [FEATURE] Watch the system, maybe being in systray, to protect the |
| 74 |
device from accidental reconfiguration by another |
| 75 |
application. (unlikely, as that would mean polling and other then |
| 76 |
jscalibrator there isn't much to mess up joystick calibration) |
| 77 |
|
| 78 |
* draw calibration icon |
| 79 |
|
| 80 |
* draw mapping icon |
| 81 |
|
| 82 |
* Joystick name of a joydev is taken from USB and build up of |
| 83 |
(iManufacturer + iProduct), but thats ugly, (idVendor + idProduct) |
| 84 |
or just idProduct would give much prettier name: |
| 85 |
|
| 86 |
idVendor 0x045e Microsoft Corp. |
| 87 |
idProduct 0x0007 SideWinder Game Pad |
| 88 |
bcdDevice 1.05 |
| 89 |
iManufacturer 1 Microsoft<AE> |
| 90 |
iProduct 2 Microsoft<AE> SideWinder<AE> Game Pad USB |
| 91 |
|
| 92 |
* the joystick name seems to be the only way to link from a joydev to |
| 93 |
a evdev, hack some code together to accomplish that as it would |
| 94 |
allow proper reset of calibration data |
| 95 |
|
| 96 |
* axis names very buggy: |
| 97 |
- ABS_RZ instead of ABS_RUDDER (Sidewinder2) |
| 98 |
- ABS_RZ,ABS_THROTTLE instead of ABS_RX,ABS_RY (Thrustmaster gamepad) |
| 99 |
- BTN_TL2,BTN_TR2 instead of BTN_START, BTN_MODE (Sidewinder gamepad) |
| 100 |
- ... |
| 101 |
|
| 102 |
* create a small database with most common joysticks, maybe add a way |
| 103 |
how a user can automatically submit his joystick profile, to ease |
| 104 |
the database generation |
| 105 |
|
| 106 |
================== |
| 107 |
[[ Random Notes ]] |
| 108 |
================== |
| 109 |
|
| 110 |
* jscal: |
| 111 |
|
| 112 |
# Remove any calibration and report raw USB data |
| 113 |
jsscal -s 6,0,0,0,0,0,0,0,0,0,0,0,0 /dev/input/js0 |
| 114 |
|
| 115 |
jscal -s |
| 116 |
6, // number of axes |
| 117 |
|
| 118 |
.--- type (0: raw, 1: "broken line") |
| 119 |
| .--- prec (seems to be read only, taken for evdev's absfuzz) |
| 120 |
| | .---.- coef[0], coef[1], ... |
| 121 |
v v v v |
| 122 |
1, 0, -15, 15, 5534751, 5534751, ??? |
| 123 |
1, 0, -15, 15, 5534751, 5534751, |
| 124 |
1, 0, -15, 15, 5534751, 5534751, |
| 125 |
1, 0, 112, 142, 5534751, 5534751, |
| 126 |
1, 0, 0, 0, 536870912, 536870912, (1<<29) |
| 127 |
1, 0, 0, 0, 536870912, 536870912 |
| 128 |
|
| 129 |
type == 0 -> none of coef used |
| 130 |
type == 1 -> coef[0:4] used |
| 131 |
|
| 132 |
type == 0 -> "none (raw)" |
| 133 |
type == 1 -> "broken line" |
| 134 |
|
| 135 |
# Original |
| 136 |
jscal -s 6,1,0,-15,15,5534751,5534751,1,0,-15,15,5534751,5534751,1,0,-15,15,5534751,5534751,1,0,112,142,5534751,5534751,1,0,0,0,536870912,536870912,1,0,0,0,536870912,536870912 /dev/input/js0 |
| 137 |
|
| 138 |
# No Dead |
| 139 |
jscal -s 6,1,0,0,0,5534751,5534751,1,0,0,0,5534751,5534751,1,0,0,0,5534751,5534751,1,0,112,142,5534751,5534751,1,0,0,0,536870912,536870912,1,0,0,0,536870912,536870912 /dev/input/js0 |
| 140 |
|
| 141 |
|
| 142 |
int solve_broken(int *results /* coef[4] */, struct correction_data inputs) |
| 143 |
{ |
| 144 |
results[0] = inputs.cmin[CENTER]; |
| 145 |
results[1] = inputs.cmax[CENTER]; |
| 146 |
results[2] = (32767.0 / (inputs.cmin[CENTER] - inputs.cmax[MINIMUM])) * 16384.0; |
| 147 |
results[3] = (32767.0 / (inputs.cmin[MAXIMUM] - inputs.cmax[CENTER])) * 16384.0; |
| 148 |
|
| 149 |
results[2] = (32767 * 16384) / left_range |
| 150 |
results[3] = (32767 * 16384) / left_range |
| 151 |
|
| 152 |
// in float terms: |
| 153 |
// [2] = 1.0f / left_range; |
| 154 |
// [3] = 1.0f / right_range; |
| 155 |
|
| 156 |
return 1; |
| 157 |
} |
| 158 |
|
| 159 |
Apply coef: |
| 160 |
=========== |
| 161 |
|
| 162 |
if (value > corr->coef[0]) |
| 163 |
{ |
| 164 |
if (value < corr->coef[1]) |
| 165 |
{ |
| 166 |
value = 0; |
| 167 |
} |
| 168 |
else |
| 169 |
{ |
| 170 |
value = (corr->coef[3] * (value - corr->coef[1])) / 16384; |
| 171 |
} |
| 172 |
} |
| 173 |
else |
| 174 |
{ |
| 175 |
value = (corr->coef[2] * (value - corr->coef[0])) / 16384; |
| 176 |
} |
| 177 |
|
| 178 |
return value < -32767 ? -32767 : (value > 32767 ? 32767 : value); |
| 179 |
|
| 180 |
Set coef: |
| 181 |
========= |
| 182 |
|
| 183 |
joydev->corr[i].type = JS_CORR_BROKEN; |
| 184 |
joydev->corr[i].prec = dev->absfuzz[j]; |
| 185 |
joydev->corr[i].coef[0] = (dev->absmax[j] + dev->absmin[j]) / 2 - dev->absflat[j]; |
| 186 |
joydev->corr[i].coef[1] = (dev->absmax[j] + dev->absmin[j]) / 2 + dev->absflat[j]; |
| 187 |
|
| 188 |
t = (dev->absmax[j] - dev->absmin[j]) / 2 - 2 * dev->absflat[j]; |
| 189 |
if (t) |
| 190 |
{ |
| 191 |
joydev->corr[i].coef[2] = (1 << 29) / t; |
| 192 |
joydev->corr[i].coef[3] = (1 << 29) / t; |
| 193 |
} |
| 194 |
|
| 195 |
# EOF # |