-
-
Notifications
You must be signed in to change notification settings - Fork 634
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 support for the Dot Pad tactile graphic Braille Display from Dot Inc #17007
Conversation
…hat help with displaying tactile graphics. For now just a TactileGraphicsBuffer in which you can set (turn on) dots, and a drawBrailleCells function which takes standard braille cells and draws them onto the TactileGrapicsBuffer.
… display from Dot Inc.
See test results for failed build of commit 70e524017d |
@michaelDCurran I would love to see better support for the Dot Pad in core. However, I've been working on an add-on for Dot to do this for a while now. We have lots of stuff that is in my opinion experimental and does not belong in core yet. However, if there is interest in adding tactile display support to core from NVAccess I would be glad to discuss which parts could be in core and how we can work together on that. Feel free to get in touch outside of Github as well for a more in depth discussion. Unfortunately the addon code base is not open source right now, but will of course release it under GPL when we have a first public release. |
See test results for failed build of commit 70e524017d |
@bramd thanks for making contact. I've sent you an email about collaborating. |
…t brailleDestination property value.
WalkthroughThe recent updates to the NVDA project introduce native support for the Dot Pad tactile graphics device, significantly enhancing accessibility for visually impaired users. This includes comprehensive drivers for the DotPad display, a new abstract class for managing tactile graphics, and functions for rendering Braille on tactile buffers. User documentation has also been updated to guide users on configuring and utilizing the Dot Pad effectively. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add Documentation and Community
|
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.
Actionable comments posted: 2
Outside diff range, codebase verification and nitpick comments (2)
source/tactile/__init__.py (1)
31-34
: Enhance the docstring forsetDot
.Consider providing more details on the expected behavior or constraints for the
setDot
method to guide implementers.""" Sets a dot at the given coordinates. Implementations should ensure that coordinates are within the buffer's bounds. """
source/brailleDisplayDrivers/dotPad.py (1)
243-260
: Improve logging in_onReceive
.Enhance logging to include more details about the received data and potential errors for better traceability.
def _onReceive(self, header1): if ord(header1) != DP_PacketSyncByte.SYNC1: log.error(f"Unexpected header1: {header1}") raise RuntimeError(f"Bad {header1=}") header2 = self._dev.read(1) if ord(header2) != DP_PacketSyncByte.SYNC2: log.error(f"Unexpected header2: {header2}") raise RuntimeError(f"bad {header2=}") length = struct.unpack(">H", self._dev.read(2))[0] packetBody = self._dev.read(length) dest, cmdHigh, cmdLow, seqNum, *data, checksum = packetBody data = bytes(data) if checksum != functools.reduce(operator.xor, packetBody[:-1], DP_CHECKSUM_BASE): log.error("Checksum mismatch") raise RuntimeError("bad checksum") cmd = DP_Command(struct.unpack(">H", bytes([cmdHigh, cmdLow]))[0]) log.debug(f"Received response {cmd.name}, {dest=}, {seqNum=}, data={bytes(data)}") if cmd.name.startswith("RSP_"): self._recordCommandResponse(cmd, data, dest, seqNum) elif cmd.name.startswith("NTF_"): self._handleNotification(cmd, data, dest, seqNum)
Co-authored-by: Sean Budd <[email protected]>
…iver stuff into driver.py.
See test results for failed build of commit ea25d5b0e6 |
See test results for failed build of commit ea25d5b0e6 |
See test results for failed build of commit 44ef991013 |
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.
Great work, will be a good asset to Dot Pad users :)
Can you please resolve the merge conflicts? |
Link to issue number:
None
Summary of the issue:
The Dot Pad from Dot Inc is a device that can display refreshable tactile graphics and braille. The A320 model can show tactile graphics of 120 by 80 dots (which could comfortably fit 8 lines of 20 cells each.
The device also has a dedicated line of 20 cells specifically for text.
Currently you can use the Dot Pad with NVDA via Brltty I believe, though I did not manage to get that working on my machine. There are also some NVDA add-ons to support Dot Pad in various forms, using the Dot Pad SDK.
NVDA should add native support for the Dot pad device, removing the requirement for Brltty or add-ons, at least for basic functionality.
Description of user facing changes
It is now possible to use the Dot Pad braille display with NVDA.
Features:
Description of development approach
Write a native braille display driver that communicates with the device over serial. Borrowed many of the constants and structures from BrlTty.
Also added a new
tactile
package, which contains untilities and classes for working with tactile graphics. So far just aTactileGraphicsBuffer
which represents a buffer in which single dots can be set, and adrawBrailleCells
function which can take bytes representing a string of standard braille cells, and draws them onto the graphics buffer.Testing strategy:
Tested with a Dot pad A320 via USB. Used NVDA normally with braille over a period of time.
Known issues with pull request:
Code Review Checklist:
Summary by CodeRabbit
New Features
Documentation