From 5e7fdbdd1c0d0b04f7e8f2219b5ee33ba3aa276f Mon Sep 17 00:00:00 2001 From: knolax <1339802534.kk@gmail.com> Date: Wed, 18 Nov 2015 08:54:03 -0500 Subject: testing --- Finch.c | 3 ++- README.md | 2 ++ main | Bin 15260 -> 15264 bytes 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Finch.c b/Finch.c index 4cd1200..86468c0 100644 --- a/Finch.c +++ b/Finch.c @@ -145,10 +145,11 @@ int Fin_Init(void) // with a VID of 2354 (Hex) and a PID of 1111 (Hex) //takes the result of enumerate and gets device objects for them while (temphidptr != NULL) { - finch_handle[finchnum] = hid_open(0x2354, 0x1111, (*temphidptr).serial_number); + finch_handle[finchnum] = hid_open_path( (*temphidptr).path); temphidptr = (*temphidptr).next; finchnum = finchnum + 1; } + if (finch_handle == 0) { // failure... diff --git a/README.md b/README.md index adbc4c9..88f70f3 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,5 @@ Two new funchtions finchmaxnum() and finchswitch have been added to find the max the makefile compiles main.c in arch linux with the hidapi package installed, it is NOT called hidapi32 as the website suggests but hidapi-libusb the main program has been modified so that pressing C will allow you to switch the finchbot with finchswitch() a compiled version of main for i686 archetecture for arch linux, you need root permisions to run + +I have modified it and it works now, contrary to what the documentations said, hidopen() does not work , i changed that hidopenpath() and it finally works. Also only one hid can be open at a time which is strange since the fact that they gave us handles implies multiple could be used. diff --git a/main b/main index 425f601..e230334 100755 Binary files a/main and b/main differ -- cgit v1.1