-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Native driver for Freedom Scientific displays #8853
Conversation
…ss. Braille output and wizWheels are working. Tested on a Focus 40 blue
* Use a writeSize of 0 to dynamically allocate a write buffer * Enable extended keys for newer Focus models * Handle keys and extended keys
…ate displays (hotkeys)
* Queue cells when an ACK is pending, so we don't overflow the display with new output * Set the correct serial parameters for the Bluetoot hconnection * Handle serial communication in _onReceive * Fix bug in the _getBluetoothPorts method
* Implement a custom translation table for Focus 1 models. This is untested for now, since I don't have such a display * Better initialization logic to better handle failing ports and correctly raise an exception if no display is found * Better error handling in hwIo.IoBase and hwIo.Bulk if close is called when the device is not initialized or failed to open. This might happen if __init__ fails and close is called by __dell_
…it and use generic ACK handling
…nnected, even if it's still connected via Bluetooth. If there is a Bluetooth connection, we keep the scan for USB devices active for the current driver, so if a Focus is plugged in it will automatically reconnect via USB and drop the Bluetoot h connection.
…nnected, even if it's still connected via Bluetooth. If there is a Bluetooth connection, we keep the scan for USB devices active for the current driver, so if a Focus is plugged in it will automatically reconnect via USB and drop the Bluetoot h connection.
…anufacturer/model/firmwareVersion
@jcsteh You are right, I didn't have a test device while making the last changes. Now I have and I reproduced and fixed the issue. Thanks for testing. |
Just fixed the last issues and found a problem in the custom translation code for the very first Focus displays. If anyone here has such an old display, please test it with this driver to ensure it now works as expected. |
After extended use I encountered the following issue two times: After pressing an unassigned key on the display, I get the following traceback:
I didn't find a way to reproduce this reliably. Any thoughts @jcsteh, @michaelDCurran, @LeonarddeR? |
Any chance for combining the routing keys with other keys on the display or is it simply impossible with these models? |
This looks unrelated to this pr. May be you could file a separate issue? |
@feerrenrut: Requested another round of review as @bramd noted that this is ready. This is most likely going to change a bit as soon as Python 3 arrives, however it is as good as finished and there's some demand for this being included soon. |
We would really like to get this PR merged before we get into the python3 migration. I will take a look at clarifying some of the remaining numbers and adding comments, I'll submit a PR to you against this branch. Hopefully this process will illuminate whether or not I have understood how this works. |
Co-Authored-By: Leonard de Ruijter <leonardder@users.noreply.github.com>
Documentation and code clarification.
Edited by @LeonarddeR
Link to issue number:
Fixes #7727
fixes #4464
fixes #8849
fixes #8729
Summary of the issue:
The current Freedom Scientific braille display driver requires a binary component from Freedom Scientific. This prevents the driver from integrating fully with NVDA features like braille display auto detection. Also, braille input is not supported by the current driver.
Description of how this pull request fixes the issue:
This is a rewrite of the driver in pure Python. It still requires the USB driver from Freedom Scientific for working with displays over USB, but the communication with the display is now handled in Python.
It also supports braille input and auto detection.
This PR adds a new feature to braille auto detection as well. It keeps searching for a USB display when a Bluetooth connection is active, it will only connect to USB devices for the same driver. This is because a Focus display switches to USB when a cable is plugged in, even if a Bluetooth connection is active. The old binary driver does auto switching to USB as well, so not supporting this would be a regression for users. This also works for other display brands.
Testing performed:
Tested with a Focus 40 blue 4th generation over USB and Bluetooth by me
Tested with a Focus 40 fifth generation by @MarcoZehe over USB and Bluetooth
Other users have done tests as well during development of this driver, see Native driver for Freedom Scientific braille displays #7727
@LeonarddeR tested the new bdDetect behavior as follows:
Known issues with pull request:
Change log entry:
New features
Changes
Bugfixes