summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2015-11-18 08:54:03 -0500
committerknolax <1339802534.kk@gmail.com>2015-11-18 08:54:03 -0500
commit5e7fdbdd1c0d0b04f7e8f2219b5ee33ba3aa276f (patch)
tree69dd4dede14aef0fa411e497691a1f82fcc32722
parente076ef80732463e020ffd9cd93670b21094533c7 (diff)
testing
-rw-r--r--Finch.c3
-rw-r--r--README.md2
-rwxr-xr-xmainbin15260 -> 15264 bytes
3 files changed, 4 insertions, 1 deletions
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
--- a/main
+++ b/main
Binary files differ