1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
|
______________________________________________________________________________
- switch to snprintf
in hid_darwin.c, replace all sprintf()s with snprintf()s.
______________________________________________________________________________
- deal with hatswitches!!
Because of the currnently implementation of the conversion of the MacOS X
style event to the Linux style event, an event with a value of zero is output
on the unchanged axis when the hatswitch is moved in along the X or Y axis (as
opposed to diagonally). but this might be fixed...
- fix up hatswitch logic... hmmm
on Mac OS X, just make the next element in the array always be the Y axis of
the hatswitch, then when receiving a hatswitch event, output, increment,
then output again (yes, its a hack).
- what do standard hatswitches output on the various platforms? they should
probably always output like axes, but then the CUI will be screwed
______________________________________________________________________________
= fix key names on Mac OS X
I think they are unimplemented... :-(
______________________________________________________________________________
= array lookups for symbols
implementation idea #2:
this array should be built by hid_build_elements_list(). Then each time it
fetches an event using the element_pointer array, it would also get the stored
usage_page and usage symbols, and instance t_float. So I need to make an
element struct like:
struct _hid_element
{
void *element;
t_symbol *type; // HID "usage page"
t_symbol *usage; // Linux "code"
t_float instance;
t_float previous_value; //only output on change on abs and buttons
} t_hid_element;
For Linux input.h, instead void *element, store the type and code numbers to
compare against
______________________________________________________________________________
= make only the first executed instance fetch the data
the function is ugen_getsortno() -- returns
an integer which increases eachtime DSP is restarted. You can add the
function call (to the ugen chain for instance) each time you see
ugen_getsortno() return an integer greater than the previous one you've
______________________________________________________________________________
= output one value per poll
- for relative axes, sum up all events and output one
http://lists.apple.com/archives/mac-games-dev/2005/Oct/msg00060.html
- current method only works for instances in the same patch...
______________________________________________________________________________
= [poll 1( message set to exact delay based on block size
to eliminate the jitter of the messages being processed every block, have
[poll 1( set the time to the poll size (~1.5ms for 44,100)
______________________________________________________________________________
= iterate through elements and do a proper queue of the ones we want:
- also, label multiple instances of the same usage
http://mud.5341.com/msg/8455.html
______________________________________________________________________________
= make second inlet for specific status requests [human->pd])
- [vendor(, [product(
- [range(
- [poll(
- [name(
- [type(
______________________________________________________________________________
= output device data on open
- Logical Min/Max i.e. [range -127 127(
- device string [name Trackpad(
______________________________________________________________________________
= get tablets working on Mac OS X
http://www.versiontracker.com/php/feedback/article.php?story=20051221163326829
http://www.wacom-europe.com/forum/topic.asp?TOPIC_ID=2719&ARCHIVE=
______________________________________________________________________________
= block devices like mice/keyboards etc from outputting
at least document the procedure needed
Mac OS X:
http://lists.apple.com/archives/usb/2005/Aug/msg00068.html
______________________________________________________________________________
= open devices by name
i.e "Trackpad" a la Max's [hi]
______________________________________________________________________________
=
= autoscaling based on Logical min/max
- this is probably essential for input, the question is how to find out what
the data range is easily.
- output would be handy, rather than autoscale, to save on CPU
- this should probably be done in Pd space
______________________________________________________________________________
= test verbose names
- matju says symbols are compared by pointer, so they are fast
- try verbose names like:
syn = sync
snd = sound
msc = misc
rep = repeat
pwr = power
- maybe these too
abs = absolute
rel = relative
btn = button
- maybe make the type the full name, with the code using the abbreviation
- change generic ev_9 to type_9
- change word "code" to "element"
______________________________________________________________________________
= event name changes
- make key/button Type "button" rather than "key" (undecided on this one)
______________________________________________________________________________
= hid/serial
- open/close status outlet
- [send ( to send data
- [tgl] 1/0 for open/close
______________________________________________________________________________
= linux input synch events (EV_SYN)
- these seem to be generated by the Linux kernel, so they probably don't fit
in with the [hid] scheme. Probably the best thing is to ditch them, or
figure out whether they should be used in controlling the flow of event
data, as they are intended.
______________________________________________________________________________
= writing support!
- Linux example: http://www.linuxjournal.com/article/6429
______________________________________________________________________________
= profile [hid] object and usage
- find out if [autoscale] takes a lot of CPU power, or where in [hid] is using
CPU where it doesn't have to be
______________________________________________________________________________
= Report available FF effects
- check against HID Utilities Source/PID.h
______________________________________________________________________________
= pollfn for mouse-like devices
- determine whether using a pollfn is actually better than using a t_clock
- any device that acts like a system mouse can be used with a pollfn, since
the mouse data will go thru Pd's network port, triggering the pollfn.
- this is probably unnecessary since the t_clock seems to run well at 1ms delay
- at standard block size (64 samples), one block = ~1.5ms
______________________________________________________________________________
= check out using USB timestamp
- use the USB timestamp to correctly space the output data
(meh, probably not useful)
/----------------------------------------------------------------------------\
------------------------------------------------------------------------------
BUGS BUGS BUGS BUGS BUGS BUGS BUGS BUGS BUGS BUGS BUGS BUGS BUGS BUGS BUGS
------------------------------------------------------------------------------
\----------------------------------------------------------------------------/
______________________________________________________________________________
- BUG: crashes when you try yo open "mouse" with no args
______________________________________________________________________________
- BUG: on Mac OS X, polling starts without hid_build_device_list() or hid_open()
- when polling starts, hid_build_device_list() should be called before starting
______________________________________________________________________________
- BUG: figure out how to prevent segfaults on mismapped devices/elements
- it should gracefully ignore things where it currently segfaults
- looks like its in build_device_list
______________________________________________________________________________
- BUG: multiple instances pointing to the same device don't have seperate close/free
- closing the device on one instance closing that same device on all other
instances of [hid]
- deleting that instance also closes the device for all other instances
pointing to that same device
______________________________________________________________________________
- BUG: getting events from the queue doesn't output a 0 value event when the
motion stops, so when the mouse stops, the sound keeps playing.
This is probably only a problem on relative axes.
This will probably have to be implemented on a platform-specific level:
- On Darwin/MacOSX, I think that the HIDGetEvent() loop will have to be
followed by one call to HIDGetElementValue()
______________________________________________________________________________
- BUG: on MacOS X, two keyboard key codes are reported as hatswitches
abs abs_hat0x Button Input, Keyboard Usage 0x39
abs abs_hat0y Button Input, Keyboard Usage 0x39
I am pretty sure this is just a hid_print_element_list() display problem.
|