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

Add a timeout when waiting for RX #11

Merged
merged 1 commit into from
Jan 18, 2018
Merged

Add a timeout when waiting for RX #11

merged 1 commit into from
Jan 18, 2018

Conversation

fjullien
Copy link
Contributor

When setting some keys, we sometimes expect receive a command from the
host (e.g. caps lock). Some host send commands to set LED status during
set or break.

For example, when it comes to turn on a LED host commands are sent just
after the key is pushed and nothing when released. The second time the key
is pushed no command are sent but when the key is released commands are
sent.

Corrent firmware does not handle this and always expect a command from
the host after sending some set commands. In this situation firmware is
stuck waiting for some commands that won't come.

This patch adds a timeout when waiting for commands from host. If the
command is not received after RX_TIMEOUT (which is expressed as timer
tick) its not waited anymore.

Signed-off-by: Franck Jullien franck.jullien@odyssee-systemes.fr

When setting some keys, we sometimes expect receive a command from the
host (e.g. caps lock). Some host send commands to set LED status during
set _or_ break.

For example, when it comes to turn on a LED host commands are sent just
after the key is pushed and nothing when released. The second time the key
is pushed no command are sent but when the key is released commands are
sent.

Corrent firmware does not handle this and always expect a command from
the host after sending some set commands. In this situation firmware is
stuck waiting for some commands that won't come.

This patch adds a timeout when waiting for commands from host. If the
command is not received after RX_TIMEOUT (which is expressed as timer
tick) its not waited anymore.

Signed-off-by: Franck Jullien <franck.jullien@odyssee-systemes.fr>
@fjullien
Copy link
Contributor Author

May be not the bast way to fix it but at least it's a solution.

@fjullien
Copy link
Contributor Author

Capture of a HOST command just after caps set:
https://pasteboard.co/H3kphmX.png

Capture of a HOST command just after caps break:
https://pasteboard.co/H3kpIaP.png

@fjullien
Copy link
Contributor Author

Cool we can upload directly here !

After set:

cmd_just_after_set

After break:

cmd_just_after_break

@showjean showjean merged commit 6aff9e8 into showjean:master Jan 18, 2018
@showjean
Copy link
Owner

Thank you very much 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants