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
Verify bounds when setting dots in drawBrailleCell
  • Loading branch information
michaelDCurran committed Aug 18, 2024
commit cf5a144fd6bcbfb7663e2066d122c17a616e9628
4 changes: 3 additions & 1 deletion source/tactile/braille.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ def drawBrailleCells(tgBuf: TactileGraphicsBuffer, x: int, y: int, cells: list[i
for dot in range(0, 8):
if 1 << dot & cell:
dotX, dotY = _brailleDotCoords[dot]
tgBuf.setDot(x + dotX, y + dotY)
# Check if the coordinates are within bounds
if 0 <= x + dotX < tgBuf.width and 0 <= y + dotY < tgBuf.height:
Comment thread
michaelDCurran marked this conversation as resolved.
Outdated
tgBuf.setDot(x + dotX, y + dotY)
x += CELL_WIDTH + hCellPadding
Comment thread
seanbudd marked this conversation as resolved.