Jam improvements, USB fixes and 7 segment AVTKA support#66
Merged
harryhaaren merged 14 commits intomasterfrom Dec 4, 2017
Merged
Jam improvements, USB fixes and 7 segment AVTKA support#66harryhaaren merged 14 commits intomasterfrom
harryhaaren merged 14 commits intomasterfrom
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>
foolswood
approved these changes
Dec 4, 2017
ctlra/usb.c
Outdated
| @@ -1,8 +1,10 @@ | |||
| #define _BSD_SOURCE | |||
Contributor
There was a problem hiding this comment.
Out of interest, what's this for?
Member
Author
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jam improvements, USB fixes and 7 segment AVTKA support