-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jam improvements, USB fixes and 7 segment AVTKA support #66
Conversation
Previously, the value would always jump to 0 as the touch-depart event message was interpreted as a value message. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
This removes "garbage" stuff that was being drawn by eg: device_test as it was reading off the end of an array and representing it as AVTKA widgets.. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
Also nuke some dead code Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
This commit removes #ifdef-ed code out of the driver, relying on libUSB to perform all communication. Testing shows that with the refactored USB code no events are dropped, so there's no reason to not switch to it. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
Still hacky code and an issue with writing both grid and touchstrips during the same function. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
Note that stable means that it is consistently performing the writes in a performant way, without drops of event messages. The colour table index still needs to be accessed to fix the colour-id lookups. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
Also usleep to allow the usb transactions to retire. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
This gives the USB subsystem / kernel / device a chance to turn off some LEDs before we terminate the USB connection, (and in doing so cancel any outstanding events..). Use the inflight write count to skip out of waiting if it isn't required. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
This commit fixes a possible segfault if a controller is virtualized, and the device returns NULL instead of a valid device_t from its connect() function. Previously a NULL pointer + offset would be passed to the application accept_dev_func(), which would often result in a segfault. Returning early before the app dev accept call handles this. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
Relates to feature request #18 Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
During debugging, a usleep() was added to allow USB writes progress to the device. This has since been fixed in the USB sub-system, to wait for a specific amount of time or until any outstanding writes have completed (whichever happens first), see commit 859ea9a for details. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks tidier, nice.
ctlra/usb.c
Outdated
@@ -1,8 +1,10 @@ | |||
#define _BSD_SOURCE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of interest, what's this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A remained of testing the wait code with a usleep() to delay the polling for completed events... will fix, thanks for reviewing!
Thanks @foolswood for noticing! Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
Jam improvements, USB fixes and 7 segment AVTKA support