Update of /cvsroot/pure-data/externals/hcs/hid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16637
Modified Files: TODO hid-help.pd hid.c hid_darwin.c joystick-help.pd joystick.pd make-arrays-from-input.h.pl mouse-help.pd mouse.pd Log Message: removed the ev_ from the types
Index: TODO =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/TODO,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TODO 7 Nov 2004 16:28:25 -0000 1.3 --- TODO 14 Nov 2004 22:29:43 -0000 1.4 *************** *** 94,97 **** --- 94,109 ----
+ ============================================================================== + = event name changes + + - make key/button Type ev_btn rather than ev_key + + - perhaps remove the "ev_" prefix on event Types for efficiency and clarity + + ============================================================================== + = mapping object ideas + + - [mousefilter]-like object to easily control things with a button + ______________________________________________________________________________ ------------------------------------------------------------------------------
Index: mouse.pd =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/mouse.pd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mouse.pd 6 Nov 2004 21:15:04 -0000 1.2 --- mouse.pd 14 Nov 2004 22:29:43 -0000 1.3 *************** *** 1,3 **** ! #N canvas 305 189 693 438 10; #X obj 125 38 inlet; #X obj 5 346 outlet; --- 1,3 ---- ! #N canvas 305 189 713 458 10; #X obj 125 38 inlet; #X obj 5 346 outlet; *************** *** 5,9 **** #X obj 220 346 outlet; #X obj 500 347 outlet; - #X obj 586 347 outlet; #X msg 355 119 open $1; #X obj 356 94 makefilename mouse%d; --- 5,8 ---- *************** *** 13,20 **** #X text 115 369 Y; #X text 222 367 wheel; - #X text 485 368 button code; - #X text 574 368 button value; - #X obj 125 155 route ev_rel ev_key; - #X obj 500 238 unpack s f; #X msg 187 84 open $1; #X obj 187 61 f $1; --- 12,15 ---- *************** *** 27,45 **** #X text 343 139 this is for once this feature is implemented; #X obj 125 115 hid $1; ! #X connect 0 0 26 0; #X connect 7 0 6 0; #X connect 8 0 7 0; ! #X connect 9 0 8 0; ! #X connect 15 0 23 0; ! #X connect 15 1 16 0; ! #X connect 16 0 4 0; ! #X connect 16 1 5 0; ! #X connect 18 0 17 0; ! #X connect 19 0 18 0; ! #X connect 20 0 1 0; ! #X connect 21 0 2 0; ! #X connect 22 0 3 0; ! #X connect 23 0 20 0; ! #X connect 23 1 21 0; ! #X connect 23 2 22 0; ! #X connect 26 0 15 0; --- 22,45 ---- #X text 343 139 this is for once this feature is implemented; #X obj 125 115 hid $1; ! #X obj 125 155 route rel key; ! #X text 484 368 button code/value list; ! #X text 1 422 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ! ; ! #X text 218 436 released under the GNU GPL; ! #X text 414 436 $Author$; ! #X text 414 423 $Revision$; ! #X connect 0 0 21 0; ! #X connect 6 0 5 0; #X connect 7 0 6 0; #X connect 8 0 7 0; ! #X connect 13 0 12 0; ! #X connect 14 0 13 0; ! #X connect 15 0 1 0; ! #X connect 16 0 2 0; ! #X connect 17 0 3 0; ! #X connect 18 0 15 0; ! #X connect 18 1 16 0; ! #X connect 18 2 17 0; ! #X connect 21 0 22 0; ! #X connect 22 0 18 0; ! #X connect 22 1 4 0;
Index: hid_darwin.c =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/hid_darwin.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** hid_darwin.c 7 Nov 2004 16:28:25 -0000 1.7 --- hid_darwin.c 14 Nov 2004 22:29:43 -0000 1.8 *************** *** 77,86 **** if (element->relative) { ! sprintf(linux_type,"ev_rel"); sprintf(linux_code,"rel_%c",axis); } else { ! sprintf(linux_type,"ev_abs"); sprintf(linux_code,"abs_%c",axis); } --- 77,86 ---- if (element->relative) { ! sprintf(linux_type,"rel"); sprintf(linux_code,"rel_%c",axis); } else { ! sprintf(linux_type,"abs"); sprintf(linux_code,"abs_%c",axis); } *************** *** 95,99 **** { case kIOHIDElementTypeInput_Button: ! sprintf(linux_type, "ev_key"); break; } --- 95,99 ---- { case kIOHIDElementTypeInput_Button: ! sprintf(linux_type, "key"); break; } *************** *** 111,119 **** case kHIDUsage_GD_Rz: convertAxis(element, linux_type, linux_code, 'z'); break; case kHIDUsage_GD_Wheel: ! sprintf(linux_type,"ev_rel");sprintf(linux_code,"rel_wheel");break; } break; case kHIDPage_Button: ! sprintf(linux_type, "ev_key"); sprintf(linux_code, "btn_%ld", element->usage); break; --- 111,119 ---- case kHIDUsage_GD_Rz: convertAxis(element, linux_type, linux_code, 'z'); break; case kHIDUsage_GD_Wheel: ! sprintf(linux_type,"rel");sprintf(linux_code,"rel_wheel");break; } break; case kHIDPage_Button: ! sprintf(linux_type, "key"); sprintf(linux_code, "btn_%ld", element->usage); break; *************** *** 173,176 **** --- 173,179 ---- DEBUG(post("[hid] found %d elements:",numElements);); + post("-----------------------------------------------------------"); + post(" TYPE\t\tCODE\tEVENT NAME"); + post("-----------------------------------------------------------"); for(i=0; i<numElements; i++) { *************** *** 178,185 **** HIDGetTypeName((IOHIDElementType) pCurrentHIDElement->type, type_name); HIDGetUsageName(pCurrentHIDElement->usagePage, pCurrentHIDElement->usage, usage_name); ! post("\tType: %s \t code: %s \t event name: \t %s, %s",type,code,type_name,usage_name);
pCurrentHIDElement = HIDGetNextDeviceElement (pCurrentHIDElement, kHIDElementTypeInput); } return (0); } --- 181,190 ---- HIDGetTypeName((IOHIDElementType) pCurrentHIDElement->type, type_name); HIDGetUsageName(pCurrentHIDElement->usagePage, pCurrentHIDElement->usage, usage_name); ! post(" %s\t%s\t%s, %s",type,code,type_name,usage_name);
pCurrentHIDElement = HIDGetNextDeviceElement (pCurrentHIDElement, kHIDElementTypeInput); } + post("-----------------------------------------------------------"); + return (0); } *************** *** 231,235 **** convertDarwinElementToLinuxTypeCode(pCurrentHIDElement,type,code); ! DEBUG(post("type: %s code: %s event name: %s",type,code,event_output_string););
// TODO: convert this to a common time format, i.e. Linux struct timeval --- 236,240 ---- convertDarwinElementToLinuxTypeCode(pCurrentHIDElement,type,code); ! // DEBUG(post("type: %s code: %s event name: %s",type,code,event_output_string););
// TODO: convert this to a common time format, i.e. Linux struct timeval
Index: joystick.pd =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/joystick.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** joystick.pd 6 Nov 2004 21:15:04 -0000 1.1 --- joystick.pd 14 Nov 2004 22:29:43 -0000 1.2 *************** *** 1,20 **** ! #N canvas 353 77 803 591 10; #X msg 96 64 start; #X msg 105 83 stop; #X obj 77 30 inlet; #X obj 207 160 print UNKNOWN_JOYSTICK_EVENT_TYPE; - #X text 260 134 types (1=buttons 3=abs axes); #X obj 218 286 print UNKNOWN_JOYSTICK_EVENT_CODE; #X obj 38 508 outlet; ! #X obj 143 327 outlet; ! #X obj 164 307 outlet; #X text 52 244 codes (0=X 1=Y 6=throttle 7=rudder , 16=hat0X , 17=hat0Y) ; #X obj 411 417 outlet; - #X text 401 433 button_num; - #X text 492 434 button_value; - #X obj 511 418 outlet; #X obj 77 107 hid $1; - #X obj 38 264 route abs_x abs_y 7 16 17 6; #X obj 38 489 autoscale -1 1; #X obj 68 468 outlet; --- 1,15 ---- ! #N canvas 368 109 807 595 10; #X msg 96 64 start; #X msg 105 83 stop; #X obj 77 30 inlet; #X obj 207 160 print UNKNOWN_JOYSTICK_EVENT_TYPE; #X obj 218 286 print UNKNOWN_JOYSTICK_EVENT_CODE; #X obj 38 508 outlet; ! #X obj 180 327 outlet; ! #X obj 201 307 outlet; #X text 52 244 codes (0=X 1=Y 6=throttle 7=rudder , 16=hat0X , 17=hat0Y) ; #X obj 411 417 outlet; #X obj 77 107 hid $1; #X obj 38 489 autoscale -1 1; #X obj 68 468 outlet; *************** *** 24,47 **** #X obj 130 388 outlet; #X obj 130 369 autoscale -1 1; - #X obj 79 139 route ev_abs ev_key; #X obj 221 91 print RAW; ! #X obj 411 351 unpack s f f; ! #X connect 0 0 14 0; ! #X connect 1 0 14 0; ! #X connect 2 0 14 0; ! #X connect 14 0 23 0; ! #X connect 15 0 16 0; ! #X connect 15 1 18 0; ! #X connect 15 2 20 0; ! #X connect 15 3 22 0; ! #X connect 15 4 7 0; ! #X connect 15 5 8 0; ! #X connect 16 0 6 0; ! #X connect 18 0 17 0; ! #X connect 20 0 19 0; ! #X connect 22 0 21 0; ! #X connect 23 0 15 0; ! #X connect 23 1 25 0; ! #X connect 23 2 3 0; ! #X connect 25 0 10 0; ! #X connect 25 1 13 0; --- 19,49 ---- #X obj 130 388 outlet; #X obj 130 369 autoscale -1 1; #X obj 221 91 print RAW; ! #X obj 79 139 route abs key; ! #X text 401 433 button code/value list; ! #X obj 38 264 route abs_x abs_y abs_z 16 17 6; ! #X text 91 509 X-axis; ! #X text 117 468 Y-axis; ! #X text 152 430 twist; ! #X text 11 552 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ! ; ! #X text 228 566 released under the GNU GPL; ! #X text 424 566 $Author$; ! #X text 424 553 $Revision$$Date$; ! #X connect 0 0 10 0; ! #X connect 1 0 10 0; ! #X connect 2 0 10 0; ! #X connect 10 0 19 0; ! #X connect 11 0 5 0; ! #X connect 13 0 12 0; ! #X connect 15 0 14 0; ! #X connect 17 0 16 0; ! #X connect 19 0 21 0; ! #X connect 19 1 9 0; ! #X connect 19 2 3 0; ! #X connect 21 0 11 0; ! #X connect 21 1 13 0; ! #X connect 21 2 15 0; ! #X connect 21 3 17 0; ! #X connect 21 4 6 0; ! #X connect 21 5 7 0;
Index: joystick-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/joystick-help.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** joystick-help.pd 6 Nov 2004 21:15:04 -0000 1.1 --- joystick-help.pd 14 Nov 2004 22:29:43 -0000 1.2 *************** *** 1,44 **** ! #N canvas 182 322 672 437 10; ! #X symbolatom 339 141 0 0 0 0 - - -; ! #X obj 178 21 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1 ; ! #X floatatom 420 144 5 0 0 0 - - -; ! #X floatatom 93 184 7 0 0 3 Y - -; ! #X floatatom 39 184 7 0 0 3 X - -; ! #X obj 158 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 203 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 248 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 294 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 178 74 joystick 3; ! #X floatatom 153 184 5 0 0 0 - - -; ! #X floatatom 196 184 5 0 0 0 - - -; ! #X obj 158 271 route btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7 btn_8 btn_9; ! #X obj 339 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 384 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 430 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 475 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 338 115 unpack s f; ! #X connect 1 0 9 0; ! #X connect 9 0 4 0; ! #X connect 9 1 3 0; ! #X connect 9 2 10 0; ! #X connect 9 3 11 0; ! #X connect 12 0 5 0; ! #X connect 12 1 6 0; ! #X connect 12 2 7 0; ! #X connect 12 3 8 0; ! #X connect 12 4 13 0; ! #X connect 12 5 14 0; ! #X connect 12 6 15 0; ! #X connect 12 7 16 0; ! #X connect 17 0 0 0; ! #X connect 17 1 2 0; --- 1,72 ---- ! #N canvas 96 237 669 433 10; ! #X obj 168 41 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1 ; ! #X floatatom 63 184 7 0 0 3 Y-axis - -; ! #X floatatom 9 184 7 0 0 3 X-axis - -; ! #X obj 219 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 264 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 309 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 355 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X floatatom 123 184 7 0 0 3 twist - -; ! #X floatatom 182 184 5 0 0 0 - - -; ! #X obj 219 271 route btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7 btn_8 btn_9; ! #X obj 400 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 445 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 491 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 536 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 168 104 joystick 3; ! #X obj 581 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 ! 1; ! #X obj 627 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 ! 1; ! #X symbolatom 441 178 6 0 0 1 code - -; ! #X floatatom 569 178 5 0 0 1 value - -; ! #X obj 441 151 unpack symbol float; ! #X text 512 194 buttons; ! #X obj 2 2 cnv 15 650 20 empty empty [joystick] 2 11 1 18 -233017 -66577 ! 0; ! #X msg 215 43 open 1; ! #X msg 220 62 open 2; ! #X msg 225 81 open 3; ! #X text 1 382 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ! ; ! #X text 218 396 released under the GNU GPL; ! #X text 414 396 $Author$; ! #X text 414 383 $Revision$; ! #X obj 526 350 all_about_hid; ! #X text 417 351 For more info:; ! #X floatatom 225 184 5 0 0 0 - - -; ! #X floatatom 268 184 5 0 0 0 - - -; ! #X connect 0 0 14 0; ! #X connect 9 0 3 0; ! #X connect 9 1 4 0; ! #X connect 9 2 5 0; ! #X connect 9 3 6 0; ! #X connect 9 4 10 0; ! #X connect 9 5 11 0; ! #X connect 9 6 12 0; ! #X connect 9 7 13 0; ! #X connect 9 8 15 0; ! #X connect 9 9 16 0; ! #X connect 14 0 2 0; ! #X connect 14 1 1 0; ! #X connect 14 2 7 0; ! #X connect 14 3 8 0; ! #X connect 14 4 31 0; ! #X connect 14 5 32 0; ! #X connect 14 6 19 0; ! #X connect 14 6 9 0; ! #X connect 19 0 17 0; ! #X connect 19 1 18 0; ! #X connect 22 0 14 0; ! #X connect 23 0 14 0; ! #X connect 24 0 14 0;
Index: mouse-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/mouse-help.pd,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mouse-help.pd 7 Nov 2004 16:28:25 -0000 1.3 --- mouse-help.pd 14 Nov 2004 22:29:43 -0000 1.4 *************** *** 1,82 **** ! #N canvas 225 161 684 449 10; ! #X symbolatom 233 198 0 0 0 0 - - -; ! #X obj 200 36 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 ! ; ! #X floatatom 309 200 5 0 0 0 - - -; ! #X floatatom 190 199 5 0 0 3 wheel - -; ! #X floatatom 135 199 7 0 0 3 Y - -; ! #X floatatom 81 199 7 0 0 3 X - -; ! #X obj 28 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1 ; ! #X obj 108 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 188 294 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 28 271 route btn_left btn_middle btn_right; ! #X text 26 250 the standard three buttons; ! #X obj 268 323 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 342 323 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 417 323 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 491 323 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 566 323 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 268 295 route btn_side btn_extra btn_forward btn_back btn_task ! ; ! #X msg 245 23 open 0; ! #X msg 250 42 open 1; ! #X msg 255 61 open 2; ! #X obj 200 91 mouse 1; ! #N canvas 462 248 604 514 mouse-noise 0; ! #X obj 90 55 inlet; ! #X obj 113 173 mouse $1; ! #X obj 180 294 noise~; ! #X obj 125 293 osc~; ! #X obj 125 266 * 4000; ! #X obj 113 367 *~; ! #X msg 162 103 ; pd dsp 1; ! #X obj 103 418 dac~; ! #X obj 91 78 t f a b; ! #X connect 0 0 8 0; ! #X connect 1 0 5 0; ! #X connect 1 1 4 0; ! #X connect 2 0 5 1; ! #X connect 3 0 5 1; ! #X connect 4 0 3 0; ! #X connect 5 0 7 0; ! #X connect 5 0 7 1; ! #X connect 8 0 5 0; ! #X connect 8 1 1 0; ! #X connect 8 2 6 0; ! #X restore 464 163 pd mouse-noise 1; ! #X msg 505 95 open 0; ! #X msg 510 114 open 1; ! #X msg 515 133 open 2; ! #X obj 464 96 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 ; ! #X text 347 72 turn this on to make some noise with the mouse; ! #X connect 1 0 20 0; ! #X connect 9 0 6 0; ! #X connect 9 1 7 0; ! #X connect 9 2 8 0; ! #X connect 9 3 16 0; ! #X connect 16 0 11 0; ! #X connect 16 1 12 0; ! #X connect 16 2 13 0; ! #X connect 16 3 14 0; ! #X connect 16 4 15 0; ! #X connect 17 0 20 0; ! #X connect 18 0 20 0; ! #X connect 19 0 20 0; ! #X connect 20 0 5 0; ! #X connect 20 1 4 0; ! #X connect 20 2 3 0; ! #X connect 20 3 0 0; ! #X connect 20 4 2 0; ! #X connect 22 0 21 0; ! #X connect 23 0 21 0; ! #X connect 24 0 21 0; ! #X connect 25 0 21 0; --- 1,104 ---- ! #N canvas 354 179 662 416 10; ! #X symbolatom 211 218 6 0 0 1 code - -; ! #X obj 130 56 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 ; ! #X floatatom 339 218 5 0 0 1 value - -; ! #X floatatom 140 218 5 0 0 3 wheel - -; ! #X floatatom 85 218 7 0 0 3 Y - -; ! #X floatatom 31 218 7 0 0 3 X - -; ! #X obj 193 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 238 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 284 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X msg 175 43 open 0; ! #X msg 180 62 open 1; ! #X msg 185 81 open 2; ! #N canvas 462 248 632 542 mouse-noise 0; ! #X obj 100 25 inlet; ! #X obj 210 294 noise~; ! #X obj 155 293 osc~; ! #X obj 155 266 * 4000; ! #X obj 113 367 *~; ! #X msg 162 103 ; pd dsp 1; ! #X obj 103 418 dac~; ! #X obj 338 61 inlet; ! #X text 400 62 open msgs; ! #X obj 143 173 mouse $1; ! #X obj 101 78 t f b; ! #X obj 194 196 unpack s f; ! #X text 270 197 get button value only; ! #X obj 210 320 *~; ! #X connect 0 0 10 0; ! #X connect 1 0 13 0; ! #X connect 2 0 4 1; ! #X connect 3 0 2 0; ! #X connect 4 0 6 0; ! #X connect 4 0 6 1; ! #X connect 7 0 9 0; ! #X connect 9 0 4 0; ! #X connect 9 1 3 0; ! #X connect 9 3 11 0; ! #X connect 10 0 4 0; ! #X connect 10 0 9 0; ! #X connect 10 1 5 0; ! #X connect 11 1 13 1; ! #X connect 13 0 4 1; ! #X restore 425 136 pd mouse-noise 1; ! #X msg 536 68 open 0; ! #X msg 541 87 open 1; ! #X msg 546 106 open 2; ! #X obj 425 69 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 ! ; ! #X text 308 45 turn this on to make some noise with the mouse; ! #X obj 130 111 mouse 1; ! #X obj 211 191 unpack symbol float; ! #X text 282 234 buttons; ! #X obj 193 264 route btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7 btn_8 ! ; ! #X obj 330 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 376 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 421 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 467 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 513 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 ! 1; ! #X obj 2 2 cnv 15 650 20 empty empty [mouse] 2 11 1 18 -233017 -66577 ! 0; ! #X obj 559 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 ! 1; ! #X text 1 372 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ; ! #X text 218 386 released under the GNU GPL; ! #X text 414 386 $Author$; ! #X text 414 373 $Revision$; ! #X obj 526 340 all_about_hid; ! #X text 417 341 For more info:; ! #X connect 1 0 18 0; ! #X connect 9 0 18 0; ! #X connect 10 0 18 0; ! #X connect 11 0 18 0; ! #X connect 13 0 12 1; ! #X connect 14 0 12 1; ! #X connect 15 0 12 1; ! #X connect 16 0 12 0; ! #X connect 18 0 5 0; ! #X connect 18 1 4 0; ! #X connect 18 2 3 0; ! #X connect 18 3 19 0; ! #X connect 18 3 21 0; ! #X connect 19 0 0 0; ! #X connect 19 1 2 0; ! #X connect 21 0 6 0; ! #X connect 21 1 7 0; ! #X connect 21 2 8 0; ! #X connect 21 3 22 0; ! #X connect 21 4 23 0; ! #X connect 21 5 24 0; ! #X connect 21 6 25 0; ! #X connect 21 7 26 0; ! #X connect 21 8 28 0;
Index: hid.c =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/hid.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** hid.c 7 Nov 2004 16:28:25 -0000 1.12 --- hid.c 14 Nov 2004 22:29:43 -0000 1.13 *************** *** 33,46 **** #define DEBUG(x) x
- /* - * Various Max Refresh Rates: - ADB = 15.5 ms - USB mice on Windows = 8-10 ms - USB mice on GNU/Linux = 1-10 ms - USB wireless mice = 12-20 ms - PS/2 mouse = 5-25 ms - P5 Globe = 22 ms - */ - #define DEFAULT_DELAY 5
--- 33,36 ----
Index: make-arrays-from-input.h.pl =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/make-arrays-from-input.h.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** make-arrays-from-input.h.pl 23 Oct 2004 03:40:39 -0000 1.5 --- make-arrays-from-input.h.pl 14 Nov 2004 22:29:43 -0000 1.6 *************** *** 1,3 **** ! #!/usr/bin/perl -w
use Switch; --- 1,3 ---- ! #!/usr/bin/perl
use Switch; *************** *** 163,168 **** print(HEADER "#define _INPUT_ARRAYS_H\n\n\n");
# generate a C array for each array and stick them all in the same file ! printArray("ev",@EV); printArray("ev_syn",@SYN); printArray("ev_key",@KEY); --- 163,175 ---- print(HEADER "#define _INPUT_ARRAYS_H\n\n\n");
+ # strip the ev_ from the type names + for ($i=0; $i <= $#EV; ++$i) { + $_ = $EV[$i]; + s/ev_//; + $EVtemp[$i] = $_; + } + # generate a C array for each array and stick them all in the same file ! printArray("ev",@EVtemp); printArray("ev_syn",@SYN); printArray("ev_key",@KEY);
Index: hid-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/hid-help.pd,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** hid-help.pd 7 Nov 2004 16:28:25 -0000 1.8 --- hid-help.pd 14 Nov 2004 22:29:43 -0000 1.9 *************** *** 1,5 **** ! #N canvas 156 27 943 666 10; ! #X msg 390 265 ev_rel rel_x 2 3.57445e+09; ! #X obj 390 244 prepend set; #X obj 149 473 route rel_x rel_y; #X floatatom 149 493 5 0 0 0 - - -; --- 1,5 ---- ! #N canvas 267 62 963 686 10; ! #X msg 430 325 rel rel_x 0 3.31743e+09; ! #X obj 430 304 prepend set; #X obj 149 473 route rel_x rel_y; #X floatatom 149 493 5 0 0 0 - - -; *************** *** 7,12 **** #X msg 148 77 start; #X msg 174 96 stop; ! #X floatatom 531 375 12 0 0 1 time - -; ! #X obj 438 355 unpack s s f f; #X msg 239 57 open 0; #X msg 246 75 open 1; --- 7,12 ---- #X msg 148 77 start; #X msg 174 96 stop; ! #X floatatom 521 385 12 0 0 1 time - -; ! #X obj 428 365 unpack s s f f; #X msg 239 57 open 0; #X msg 246 75 open 1; *************** *** 16,29 **** #X floatatom 206 454 7 0 0 0 - - -; #X floatatom 264 454 7 0 0 0 - - -; ! #X obj 86 81 tgl 35 0 empty empty empty 0 -6 0 8 -24198 -1 -1 25 25 ; ! #X floatatom 500 392 12 0 0 1 value - -; ! #X symbolatom 468 409 10 0 0 1 eventcode - -; ! #X symbolatom 438 428 15 0 0 1 eventtype - -; ! #X obj 177 296 bng 35 250 50 0 empty empty event_received 38 18 1 9 ! -225280 -1 -1; #X obj 2 2 cnv 15 900 20 empty empty [hid] 2 11 1 18 -233017 -66577 0; ! #X text 362 287 outlet message format:; #X obj 742 104 ev-list; #X obj 742 155 ev_syn-list; --- 16,29 ---- #X floatatom 206 454 7 0 0 0 - - -; #X floatatom 264 454 7 0 0 0 - - -; ! #X obj 86 81 tgl 35 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 25 ; ! #X floatatom 490 402 12 0 0 1 value - -; ! #X symbolatom 459 419 10 0 0 1 event_code - -; ! #X symbolatom 428 438 15 0 0 1 event_type - -; ! #X obj 17 271 bng 35 250 50 0 empty empty event_received 38 18 1 9 ! -262144 -1 -1; #X obj 2 2 cnv 15 900 20 empty empty [hid] 2 11 1 18 -233017 -66577 0; ! #X text 363 234 outlet message format:; #X obj 742 104 ev-list; #X obj 742 155 ev_syn-list; *************** *** 39,55 **** #X text 710 85 Event Types:; #X text 710 136 Event Codes:; ! #X obj 223 287 print INPUT_EVENT; ! #X obj 223 266 spigot; ! #X obj 269 266 tgl 17 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 ! 1; ! #X obj 93 345 route ev_key ev_rel ev_abs ev_syn; #X floatatom 289 398 5 0 0 1 ev_syn - -; #X obj 262 397 +; #X msg 262 377 1; #X msg 336 136 close; - #X text 380 136 probably not needed; #X msg 336 113 refresh; #X text 397 111 refresh device list; - #X obj 248 225 hid 2; #X obj 94 524 unpack s f f; #X obj 133 542 tgl 25 0 empty empty any_button 27 13 1 9 -195568 -1 --- 39,52 ---- #X text 710 85 Event Types:; #X text 710 136 Event Codes:; ! #X obj 63 262 print INPUT_EVENT; ! #X obj 63 241 spigot; ! #X obj 109 241 tgl 17 0 empty empty console_print 19 9 1 9 -262131 ! -1 -1 0 1; #X floatatom 289 398 5 0 0 1 ev_syn - -; #X obj 262 397 +; #X msg 262 377 1; #X msg 336 136 close; #X msg 336 113 refresh; #X text 397 111 refresh device list; #X obj 94 524 unpack s f f; #X obj 133 542 tgl 25 0 empty empty any_button 27 13 1 9 -195568 -1 *************** *** 67,161 **** #X msg 336 180 poll 2; #X text 332 159 start polling and set the poll delay in ms; ! #X text 386 301 event_type event_code value timestamp; ! #X msg 465 180 poll 2000; ! #X text 371 56 !!! This software is very much alpha , so any aspect ! of it could change without notice !!!; ! #X text 650 400 REFRESH RATES; ! #X text 660 415 ADB = 15.5 ms; ! #X text 660 430 USB mice on Windows = 8-10 ms; ! #X text 660 445 USB mice on GNU/Linux = 1-10 ms; ! #X text 660 460 USB wireless mice = 12-20 ms; ! #X text 660 475 PS/2 mouse = 5-25 ms; ! #X text 660 490 P5 Glove = 22 ms; ! #N canvas 0 22 454 304 JustFOrTestng 0; ! #X msg 390 265 ev_rel rel_x 0 2.56485e+09; ! #X obj 390 244 prepend set; ! #X msg 148 77 start; ! #X msg 174 96 stop; ! #X msg 239 57 open 0; ! #X msg 246 75 open 1; ! #X msg 253 93 open 2; ! #X msg 259 111 open 3; ! #X msg 265 129 open 4; ! #X obj 86 81 tgl 35 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 25 ! ; ! #X obj 223 266 spigot; ! #X obj 269 266 tgl 17 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 ! 1; ! #X msg 336 136 close; ! #X text 380 136 probably not needed; ! #X msg 336 113 refresh; ! #X text 397 111 refresh device list; ! #X msg 398 180 poll 20; ! #X msg 336 180 poll 2; ! #X text 332 159 start polling and set the poll delay in ms; #X msg 465 180 poll 2000; #X text 371 56 !!! This software is very much alpha , so any aspect of it could change without notice !!!; #X obj 248 225 hid 1; ! #X connect 1 0 0 0; ! #X connect 2 0 21 0; ! #X connect 3 0 21 0; ! #X connect 4 0 21 0; ! #X connect 5 0 21 0; ! #X connect 6 0 21 0; ! #X connect 7 0 21 0; ! #X connect 8 0 21 0; ! #X connect 9 0 21 0; ! #X connect 11 0 10 1; ! #X connect 12 0 21 0; ! #X connect 14 0 21 0; ! #X connect 16 0 21 0; ! #X connect 17 0 21 0; ! #X connect 19 0 21 0; ! #X connect 21 0 10 0; ! #X connect 21 0 1 0; ! #X restore 446 483 pd JustFOrTestng; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 2 1 4 0; ! #X connect 5 0 47 0; ! #X connect 6 0 47 0; #X connect 8 0 19 0; #X connect 8 1 18 0; #X connect 8 2 17 0; #X connect 8 3 7 0; ! #X connect 9 0 47 0; ! #X connect 10 0 47 0; ! #X connect 11 0 47 0; ! #X connect 12 0 47 0; ! #X connect 13 0 47 0; ! #X connect 16 0 47 0; #X connect 37 0 36 0; #X connect 37 0 20 0; #X connect 38 0 37 1; ! #X connect 39 0 48 0; ! #X connect 39 1 2 0; ! #X connect 39 2 56 0; ! #X connect 39 3 42 0; ! #X connect 40 0 41 1; #X connect 41 0 40 0; ! #X connect 42 0 41 0; ! #X connect 43 0 47 0; ! #X connect 45 0 47 0; ! #X connect 47 0 37 0; ! #X connect 47 0 39 0; ! #X connect 47 0 1 0; ! #X connect 47 0 8 0; ! #X connect 48 1 49 0; ! #X connect 56 0 14 0; ! #X connect 56 1 15 0; ! #X connect 56 2 57 0; ! #X connect 58 0 47 0; ! #X connect 59 0 47 0; ! #X connect 62 0 47 0; --- 64,109 ---- #X msg 336 180 poll 2; #X text 332 159 start polling and set the poll delay in ms; ! #X text 387 248 event_type event_code value timestamp; #X msg 465 180 poll 2000; #X text 371 56 !!! This software is very much alpha , so any aspect of it could change without notice !!!; #X obj 248 225 hid 1; ! #X obj 93 345 route key rel abs syn; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 2 1 4 0; ! #X connect 5 0 61 0; ! #X connect 6 0 61 0; #X connect 8 0 19 0; #X connect 8 1 18 0; #X connect 8 2 17 0; #X connect 8 3 7 0; ! #X connect 9 0 61 0; ! #X connect 10 0 61 0; ! #X connect 11 0 61 0; ! #X connect 12 0 61 0; ! #X connect 13 0 61 0; ! #X connect 16 0 61 0; #X connect 37 0 36 0; #X connect 37 0 20 0; #X connect 38 0 37 1; ! #X connect 39 0 40 1; ! #X connect 40 0 39 0; #X connect 41 0 40 0; ! #X connect 42 0 61 0; ! #X connect 43 0 61 0; ! #X connect 45 1 46 0; ! #X connect 53 0 14 0; ! #X connect 53 1 15 0; ! #X connect 53 2 54 0; ! #X connect 55 0 61 0; ! #X connect 56 0 61 0; ! #X connect 59 0 61 0; ! #X connect 61 0 37 0; ! #X connect 61 0 1 0; ! #X connect 61 0 8 0; ! #X connect 61 0 62 0; ! #X connect 62 0 45 0; ! #X connect 62 1 2 0; ! #X connect 62 2 53 0; ! #X connect 62 3 41 0;