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

Update brailleNote driver to use hwIo and thus make it thread safe. #7581

Merged
merged 1 commit into from Oct 3, 2017

Conversation

jcsteh
Copy link
Contributor

@jcsteh jcsteh commented Sep 11, 2017

Link to issue number:

Fixes #7574.

Summary of the issue:

From #7574 (comment):

The current HumanWare BrailleNote driver, although native, does not yet utilize the hwIo module. This driver should be updated to support braille display auto detection, since we agreed in #1271 that this will be a prerequisite.

Description of how this pull request fixes the issue:

Updates the driver to use hwIo.Serial.

Testing performed:

I don't have a BrailleNote, so couldn't test this. However, @josephsl confirmed in #7574 (comment) that it works for him.

Known issues with pull request:

None known.

Change log entry:

Not user visible at this stage, so no change log entry. However, this can safely be merged before braille display detection. It should provide a slight performance improvement when there are lots of writes and should mean we aren't waking our main thread as often due to continual polling.

@LeonarddeR
Copy link
Collaborator

Is there a particular reason why you did not do a self._serial.close() in the finally block of terminate, like this is executed for Baum and brailliantB? I'm afraid this can lead to unexpected issues when you terminate the display and running init again without destroying the BrailleDisplayDriver object.

@jcsteh
Copy link
Contributor Author

jcsteh commented Sep 11, 2017

It does call close in the finally block. I think you're confused by the fact that the diff shows the removal of the _closeComPort method, except for the last line, which is the bit that calls self._serial.close.

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.

Make HumanWare BrailleNote driver thread safe
4 participants