-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Expose number of rows/lines on multiline braille displays #15386
Conversation
… multi line braille displays
… brl in gesture names
One thing that can probably be ignored. the ecoBraille and lilli implement _get_numCells explicitly, so in that case numCells and numColls wil differ. That shouldn't be a problem though. |
@LeonarddeR For Lilli we could probably solve this by just making numCells a simple assignment and get rid of the getter, which returns a static value anyway and should trigger |
Still not really happy with the Lilli/Ecobraille situation, but see no clear way to fix this. So I would like an initial review and am still open for changes. |
May be we should leave numCols and numRows alone for single line braille display drivers. This can be done by removing the setter from numCells from the base class. Of course this means you need to undo the changes to the unit test as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you confirm these changes?
Co-authored-by: Sean Budd <[email protected]>
Co-authored-by: Sean Budd <[email protected]>
Co-authored-by: Sean Budd <[email protected]>
@seanbudd Thanks for your review suggestions, I have applied them. If we accept the slightly API breaking change I think this is ready for merging. |
@bramd - I don't think this counts as an API breaking change - could you explain how the API would break for an add-on? |
Drivers providing their own get_numCells implementation may and up with a difference in numCols and numCells, but since nothing consumes numCols yet, this is not an issue for now. As long as we stick with numCells in NVDA core for single line displays, I don't see any issues. |
Link to issue number:
None
Summary of the issue:
Currently, NVDA assumes that braille displays always have one line of output. There are no native braille drivers in NVDA that support multi line displays.
However, BRLTTY supports a few multi line displays such as the Canute and the DotPad. A first step to supporting these displays would be to treat them as one large display so we can at least output to all their cells. Multi line displays now crash the BRLTTY driver.
Description of user facing changes
Multi line braille displays can now be used through BRLTTY and will no longer cause the driver to crash. Please note that the display is handled as one large continuous display and no specific features exist to use the multiple braille lines for multi line output.
Description of development approach
The BRLTTY driver only reads the number of columns and uses that as numCells. This causes a crashing braille driver with multi line displays, since we send not enough cells to fill the display.
This PR adds numCols and numRows properties to the BrailleDisplayDriver class and the default for numCells is to return the total number of cells on the display. Setting numCells is still supported for single line displays, but for multi line displays this will raise a ValueError and numCols/numRows should be set explicitly.
The BRLTTY driver is modified to set numRows/numCols correctly based on the info from BrlAPI.
Testing strategy:
Known issues with pull request:
None
Change log entries:
New features
Changes
Bug fixes
For Developers
Code Review Checklist: