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

Albatross driver doesn't respect already connected displays #15226

Closed
LeonarddeR opened this issue Jul 31, 2023 · 2 comments · Fixed by #15239
Closed

Albatross driver doesn't respect already connected displays #15226

LeonarddeR opened this issue Jul 31, 2023 · 2 comments · Fixed by #15239
Labels
component/braille-display-drivers p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Milestone

Comments

@LeonarddeR
Copy link
Collaborator

Steps to reproduce:

  1. Connect a Handy Tech Modular Evolution to your system
  2. Select the Handy Tech driver in an installed copy of NVDA
  3. Go to the secure desktop.
  4. Select the albatross driver to emulate behavior of automatic display detection.

Actual behavior:

Driver tries to connect for around 10 seconds before failing.

Expected behavior:

Driver instantly reports not being able to initialize as the serial port is busy,

cc @burmancomp Could you please look into this? This is one of the reasons why Albatross should be last in automatic display detection order. While I understand the complexity of connecting to these displays, it does make the driver very complicated. In any case, the driver should instantly fail when the port is busy.

@LeonarddeR
Copy link
Collaborator Author

The driver catches IOError and sleeps in that case. It should not try to connect again when the raised error is a PermissionError.

@seanbudd seanbudd added p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority component/braille-display-drivers labels Jul 31, 2023
@seanbudd
Copy link
Member

Please fill out the issue template fully. Is this a recent regression?
Please reproduce this issue and provide a log file of the behaviour. Ensure your log level is set to debug in general preferences.

seanbudd pushed a commit that referenced this issue Aug 22, 2023
Fixes #15226

Summary of the issue:
Driver continued port initialization retries although there was IOError exception.

Description of user facing changes
Port initialization is stopped when there is IOError exception.

Description of development approach
If there is IoError exception, _initPort function returns None which causes _initConnection function to raise RuntimeError. No need to try with 9600 bps, and there is no other port to try.
@nvaccessAuto nvaccessAuto added this to the 2023.3 milestone Aug 22, 2023
seanbudd pushed a commit that referenced this issue Aug 24, 2023
Fixes #15226

Summary of the issue:
Driver continued port initialization retries although there was IOError exception.

Description of user facing changes
Port initialization is stopped when there is IOError exception.

Description of development approach
If there is IoError exception, _initPort function returns None which causes _initConnection function to raise RuntimeError. No need to try with 9600 bps, and there is no other port to try.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/braille-display-drivers p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants