Skip to content
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 Aug 15, 2024
30ed73c
Add a braille display driver for the Dot Pad tactile graphics braille…
michaelDCurran Aug 15, 2024
2879521
Pre-commit auto-fix
pre-commit-ci[bot] Aug 15, 2024
752fe1c
Add translator comments.
michaelDCurran Aug 15, 2024
9b19353
dotPad braille driver: save braille destination in config, and correc…
michaelDCurran Aug 15, 2024
73cca03
Update user guide.
michaelDCurran Aug 15, 2024
bbeb180
Update what's new
michaelDCurran Aug 15, 2024
a719902
Pre-commit auto-fix
pre-commit-ci[bot] Aug 15, 2024
1c320b6
drawBrailleCells: pass in desired cell padding. Update docstrings.
michaelDCurran Aug 15, 2024
470c866
Apply suggestions from code review
michaelDCurran Aug 18, 2024
efb0e29
Remove incorrect comment.
michaelDCurran Aug 18, 2024
cf5a144
Verify bounds when setting dots in drawBrailleCell
michaelDCurran Aug 18, 2024
56d2e46
Correct case of BrailleDestination constants.
michaelDCurran Aug 18, 2024
6fc04e6
Add type information.
michaelDCurran Aug 18, 2024
85b7095
dotPad: move Dot Pad device enums and constants into defs.py, move dr…
michaelDCurran Aug 18, 2024
2042d07
Update source/tactile/braille.py
michaelDCurran Aug 19, 2024
bdea59d
Pre-commit auto-fix
pre-commit-ci[bot] Aug 19, 2024
6928fef
setup.py include dotPad braille display driver package.
michaelDCurran Aug 19, 2024
f9d391f
Update user_docs/en/userGuide.md
seanbudd Aug 19, 2024
fe53dd8
Merge branch 'master' into dotPad
michaelDCurran Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Correct case of BrailleDestination constants.
  • Loading branch information
michaelDCurran committed Aug 18, 2024
commit 56d2e4657c2d5a3d9338d0a78f79eefce5809dff
18 changes: 9 additions & 9 deletions source/brailleDisplayDrivers/dotPad.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ def __init__(self, port: str):
self.model = self._requestDeviceName()
self._boardInformation = self._requestBoardInformation()
if self._boardInformation.features & DP_Features.HAS_TEXT_DISPLAY:
self._brailleDestination = BrailleDestination.text
self._brailleDestination = BrailleDestination.TEXT
elif self._boardInformation.features & DP_Features.HAS_GRAPHIC_DISPLAY:
self._brailleDestination = BrailleDestination.graphic
self._brailleDestination = BrailleDestination.GRAPHIC
else:
raise RuntimeError("No text or graphics displays")
super().__init__()
Expand All @@ -338,13 +338,13 @@ def _get_availableBrailledestinations(self):
dests = {}
if self._boardInformation.features & DP_Features.HAS_TEXT_DISPLAY:
dests[BrailleDestination.TEXT.value] = StringParameterInfo(
BrailleDestination.text.value,
BrailleDestination.TEXT.value,
# Translators: A destination for braille output.
_("Text"),
)
if self._boardInformation.features & DP_Features.HAS_GRAPHIC_DISPLAY:
dests[BrailleDestination.GRAPHIC.value] = StringParameterInfo(
BrailleDestination.graphic.value,
BrailleDestination.GRAPHIC.value,
# Translators: A destination for braille output.
_("Graphic"),
)
Expand All @@ -360,12 +360,12 @@ def _set_brailleDestination(self, value: str):
if value != self._brailleDestination:
self.display([0] * self.numRows * self.numCols)
if (
value == BrailleDestination.text
value == BrailleDestination.TEXT
and self._boardInformation.features & DP_Features.HAS_TEXT_DISPLAY
):
self._brailleDestination = value
elif (
value == BrailleDestination.graphic
value == BrailleDestination.GRAPHIC
and self._boardInformation.features & DP_Features.HAS_GRAPHIC_DISPLAY
):
self._brailleDestination = value
Expand All @@ -375,7 +375,7 @@ def _set_brailleDestination(self, value: str):
def _get_numRows(self) -> int:
if self._boardInformation is None:
return 0
if self._brailleDestination == BrailleDestination.graphic:
if self._brailleDestination == BrailleDestination.GRAPHIC:
return (self._boardInformation.graphic.rowCount * self.cellHeight) // (
self.cellHeight + self.vCellPadding
)
Expand All @@ -385,7 +385,7 @@ def _get_numRows(self) -> int:
def _get_numCols(self) -> int:
if self._boardInformation is None:
return 0
if self._brailleDestination == BrailleDestination.graphic:
if self._brailleDestination == BrailleDestination.GRAPHIC:
return (self._boardInformation.graphic.columnCount * self.cellWidth) // (
self.cellWidth + self.hCellPadding
)
Expand All @@ -406,7 +406,7 @@ def display(self, cells: list[int]):
while self._pendingCells is not None:
cells = self._pendingCells
self._pendingCells = None
if self._brailleDestination == BrailleDestination.graphic:
if self._brailleDestination == BrailleDestination.GRAPHIC:
tgBuf = DpTactileGraphicsBuffer(
hCellCount=self._boardInformation.graphic.columnCount,
vCellCount=self._boardInformation.graphic.rowCount,
Expand Down