Skip to content
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

Merged
merged 14 commits into from Dec 4, 2017
Merged

Conversation

@harryhaaren
Copy link
Member

@harryhaaren harryhaaren commented Dec 2, 2017

Jam improvements, USB fixes and 7 segment AVTKA support

harryhaaren added 13 commits Nov 10, 2017
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>
Copy link
Contributor

@foolswood foolswood left a comment

Looks tidier, nice.

ctlra/usb.c Outdated
@@ -1,8 +1,10 @@
#define _BSD_SOURCE

This comment has been minimized.

@foolswood

foolswood Dec 4, 2017
Contributor

Out of interest, what's this for?

This comment has been minimized.

@harryhaaren

harryhaaren Dec 4, 2017
Author Member

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>
@harryhaaren harryhaaren merged commit cfa723e into master Dec 4, 2017
3 checks passed
3 checks passed
Codacy/PR Quality Review Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.