Repository navigation
Native support for the Dot Pad tactile graphic Braille Display from Dot Inc #17007
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
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f31c249
Add a package called 'tactile' which provides utilities and classes t…
michaelDCurran 30ed73c
Add a braille display driver for the Dot Pad tactile graphics braille…
michaelDCurran 2879521
Pre-commit auto-fix
pre-commit-ci[bot] 752fe1c
Add translator comments.
michaelDCurran 9b19353
dotPad braille driver: save braille destination in config, and correc…
michaelDCurran 73cca03
Update user guide.
michaelDCurran bbeb180
Update what's new
michaelDCurran a719902
Pre-commit auto-fix
pre-commit-ci[bot] 1c320b6
drawBrailleCells: pass in desired cell padding. Update docstrings.
michaelDCurran 470c866
Apply suggestions from code review
michaelDCurran efb0e29
Remove incorrect comment.
michaelDCurran cf5a144
Verify bounds when setting dots in drawBrailleCell
michaelDCurran 56d2e46
Correct case of BrailleDestination constants.
michaelDCurran 6fc04e6
Add type information.
michaelDCurran 85b7095
dotPad: move Dot Pad device enums and constants into defs.py, move dr…
michaelDCurran 2042d07
Update source/tactile/braille.py
michaelDCurran bdea59d
Pre-commit auto-fix
pre-commit-ci[bot] 6928fef
setup.py include dotPad braille display driver package.
michaelDCurran f9d391f
Update user_docs/en/userGuide.md
seanbudd fe53dd8
Merge branch 'master' into dotPad
michaelDCurran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
dotPad: move Dot Pad device enums and constants into defs.py, move dr…
…iver stuff into driver.py.
- Loading branch information
commit 85b7095a78ad98c8cd8d6c1427104f9d729033f0
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # A part of NonVisual Desktop Access (NVDA) | ||
| # This file is covered by the GNU General Public License. | ||
| # See the file COPYING for more details. | ||
| # Copyright (C) 2024 NV Access Limited | ||
|
|
||
| """Braille display driver for the Dot Pad Tactile Graphic braille display from Dot Inc.""" | ||
|
|
||
| # Imported here so that braille._getDisplayDriver can import | ||
| from .driver import BrailleDisplayDriver # noqa: F401 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # A part of NonVisual Desktop Access (NVDA) | ||
| # Copyright (C) 2024 NV Access Limited | ||
| # This file is covered by the GNU General Public License. | ||
| # See the file COPYING for more details. | ||
|
|
||
|
|
||
| import enum | ||
| import ctypes | ||
|
|
||
|
|
||
| class DP_Command(enum.IntEnum): | ||
| REQ_FIRMWARE_VERSION = 0x0000 | ||
| RSP_FIRMWARE_VERSION = 0x0001 | ||
| REQ_DEVICE_NAME = 0x0100 | ||
| RSP_DEVICE_NAME = 0x0101 | ||
| REQ_BOARD_INFORMATION = 0x0110 | ||
| RSP_BOARD_INFORMATION = 0x0111 | ||
| REQ_DISPLAY_LINE = 0x0200 | ||
| RSP_DISPLAY_LINE = 0x0201 | ||
| NTF_DISPLAY_LINE = 0x0202 | ||
| REQ_DISPLAY_CURSOR = 0x0210 | ||
| RSP_DISPLAY_CURSOR = 0x0211 | ||
| NTF_DISPLAY_CURSOR = 0x0212 | ||
| NTF_KEYS_SCROLL = 0x0302 | ||
| NTF_KEYS_PERKINS = 0x0312 | ||
| NTF_KEYS_ROUTING = 0x0322 | ||
| NTF_KEYS_FUNCTION = 0x0332 | ||
| NTF_ERROR = 0x9902 | ||
|
|
||
|
|
||
| class DP_ErrorCode(enum.IntEnum): | ||
| LENGTH = 1 | ||
| COMMAND = 2 | ||
| CHECKSUM = 3 | ||
| PARAMETER = 4 | ||
| TIMEOUT = 5 | ||
|
|
||
|
|
||
| class DP_DisplayResponse(enum.IntEnum): | ||
| ACK = 0 | ||
| NACK = 1 | ||
| WAIT = 2 | ||
| CHECKSUM = 3 | ||
|
|
||
|
|
||
| class DP_Features(enum.IntFlag): | ||
| HAS_GRAPHIC_DISPLAY = 0x80 | ||
| HAS_TEXT_DISPLAY = 0x40 | ||
| HAS_PERKINS_KEYS = 0x20 | ||
| HAS_ROUTING_KEYS = 0x10 | ||
| HAS_NAVIGATION_KEYS = 0x08 | ||
| HAS_PANNING_KEYS = 0x04 | ||
| HAS_FUNCTION_KEYS = 0x02 | ||
|
|
||
|
|
||
| class DP_DisplayDescriptor(ctypes.Structure): | ||
| _fields_ = [ | ||
| ("rowCount", ctypes.c_ubyte), | ||
| ("columnCount", ctypes.c_ubyte), | ||
| ("dividedLine", ctypes.c_ubyte), | ||
| ("refreshTime", ctypes.c_ubyte), | ||
| ] | ||
|
|
||
|
|
||
| class DP_BoardInformation(ctypes.Structure): | ||
| _fields_ = [ | ||
| ("features", ctypes.c_ubyte), | ||
| ("dotsPerCell", ctypes.c_ubyte), | ||
| ("distanceBetweenPins", ctypes.c_ubyte), | ||
| ("functionKeyCount", ctypes.c_ubyte), | ||
| ("text", DP_DisplayDescriptor), | ||
| ("graphic", DP_DisplayDescriptor), | ||
| ] | ||
|
|
||
|
|
||
| class DP_PacketSeqFlag(enum.IntEnum): | ||
| SEQ_TEXT = 0x80 | ||
|
|
||
|
|
||
| class DP_PacketSyncByte(enum.IntEnum): | ||
| SYNC1 = 0xAA | ||
| SYNC2 = 0x55 | ||
|
|
||
|
|
||
| class DP_PerkinsKey(enum.IntEnum): | ||
| DOT7 = 0 | ||
| DOT3 = 1 | ||
| DOT2 = 2 | ||
| DOT1 = 3 | ||
| DOT4 = 4 | ||
| DOT5 = 5 | ||
| DOT6 = 6 | ||
| DOT8 = 7 | ||
| SPACE = 8 | ||
| SHIFT_LEFT = 9 | ||
| CONTROL_LEFT = 10 | ||
| SHIFT_RIGHT = 11 | ||
| CONTROL_RIGHT = 12 | ||
| PAN_LEFT = 13 | ||
| PAN_RIGHT = 14 | ||
| NAV_CENTER = 16 | ||
| NAV_UP = 17 | ||
| NAV_RIGHT = 18 | ||
| NAV_DOWN = 19 | ||
| NAV_LEFT = 20 | ||
|
|
||
|
|
||
| DP_CHECKSUM_BASE = 0xA5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.