Skip to content

Commit 1908a76

Browse files
Merge 656246c into 7afc3ed
2 parents 7afc3ed + 656246c commit 1908a76

3 files changed

Lines changed: 3 additions & 76 deletions

File tree

source/brailleDisplayDrivers/papenmeier.py

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
import hwPortUtils
2626
import serial
2727

28-
#for brxcom
29-
import ctypes
30-
import winreg
3128

3229
#for scripting
3330
from baseObject import ScriptableObject
@@ -127,26 +124,6 @@ def check(cls):
127124
"""should return false if there is a missing dependency"""
128125
return True
129126

130-
def connectBrxCom(self):#connect to brxcom server (provided by papenmeier)
131-
try:
132-
with winreg.OpenKey(
133-
winreg.HKEY_LOCAL_MACHINE,
134-
r"SOFTWARE\FHP\BrxCom"
135-
) as brxcomkey:
136-
value, vtype = winreg.QueryValueEx(brxcomkey, "InstallPath")
137-
assert vtype == winreg.REG_SZ # value is of type: str
138-
self._brxnvda = ctypes.cdll.LoadLibrary(value + r"\brxnvda.dll")
139-
if self._brxnvda.brxnvda_init(value + r"\BrxCom.dll"):
140-
self._baud=1 #prevent bluetooth from connecting
141-
self.numCells=self._brxnvda.brxnvda_numCells()
142-
self._voffset=self._brxnvda.brxnvda_numVertCells()
143-
log.info("Found Braille Display connected via BRXCom")
144-
self.startTimer()
145-
return None
146-
except:
147-
log.debugWarning("BRXCom is not installed")
148-
self._brxnvda = None
149-
150127
def connectBluetooth(self):
151128
"""try to connect to bluetooth device first, bluetooth is only supported on Braillex Trio"""
152129
if(self._baud == 0 and self._dev is None):
@@ -162,7 +139,7 @@ def connectBluetooth(self):
162139
log.debugWarning("connectBluetooth failed")
163140

164141
def connectUSB(self, devlist: List[bytes]):
165-
"""try to connect to usb device,is triggered when BRXCOM is not installed and bluetooth
142+
"""Try to connect to usb device, this is triggered when bluetooth
166143
connection could not be established"""
167144
try:
168145
self._dev = ftdi2.open_ex(devlist[0])
@@ -183,8 +160,6 @@ def __init__(self):
183160
self._dev = None
184161
self._proto = None
185162
devlist: List[bytes] = []
186-
self.connectBrxCom()
187-
if(self._baud == 1): return #brxcom is running, skip bluetooth and USB
188163

189164
#try to connect to usb device,
190165
#if no usb device is found there may be a bluetooth device
@@ -348,16 +323,11 @@ def terminate(self):
348323
self.stopTimer()
349324
if(self._dev is not None): self._dev.close()
350325
self._dev=None
351-
if(self._brxnvda): self._brxnvda.brxnvda_close()
352326
except:
353327
self._dev=None
354328

355329
def display(self, cells: List[int]):
356330
"""write to braille display"""
357-
if(self._brxnvda):
358-
newcells = bytes(cells)
359-
self._brxnvda.brxnvda_sendToDisplay(newcells)
360-
return
361331
if(self._dev is None): return
362332
try:
363333
self._dev.write(brl_out(cells, self._nlk, self._nrk, self._voffset))
@@ -372,11 +342,6 @@ def executeGesture(self,gesture):
372342
def _handleKeyPresses(self):
373343
"""handles key presses and performs a gesture"""
374344
try:
375-
if(self._brxnvda):
376-
k: int = self._brxnvda.brxnvda_keyIndex()
377-
if(k!=-1):
378-
self.executeGesture(InputGesture(k,self))
379-
return
380345
if(self._dev is None and self._baud>0):
381346
try:
382347
devlist: List[bytes] = ftdi2.list_devices()
@@ -551,24 +516,6 @@ def brl_join_keys(dec: List[str]) -> str:
551516
elif(len(dec) == 2): return dec[1] + "," + dec[0]
552517
else: return ''
553518

554-
def brl_keyname_decoded(key: int, rest: str) -> str:
555-
"""convert index used by brxcom to keyname"""
556-
if(key == 11 or key == 9): return 'l1' + rest
557-
elif(key == 12 or key == 10): return 'l2' + rest
558-
elif(key == 13 or key == 15): return 'r1' + rest
559-
elif(key == 14 or key == 16): return 'r2' + rest
560-
561-
elif(key == 3): return 'up' + rest
562-
elif(key == 7): return 'dn' + rest
563-
elif(key == 1): return 'left' + rest
564-
elif(key == 5): return 'right' + rest
565-
566-
elif(key == 4): return 'up2' + rest
567-
elif(key == 8): return 'dn2' + rest
568-
elif(key == 2): return 'left2' + rest
569-
elif(key == 6): return 'right2' + rest
570-
else: return ''
571-
572519

573520
class InputGesture(braille.BrailleDisplayGesture, brailleInput.BrailleInputGesture):
574521
"""Input gesture for papenmeier displays"""
@@ -583,7 +530,7 @@ def __init__(self, keys: Optional[Union[bytes, int]], driver: BrailleDisplayDriv
583530
self.id=brl_join_keys(brl_decode_key_names_repeat(driver))
584531
return
585532

586-
if driver._baud != 1 and keys[0] == ord(b'L'):
533+
if keys[0] == ord(b'L'):
587534
assert isinstance(keys, bytes)
588535
if (keys[3] - 48) >> 3:
589536
scancode = keys[5] - 48 << 4 | keys[6] - 48
@@ -613,22 +560,6 @@ def __init__(self, keys: Optional[Union[bytes, int]], driver: BrailleDisplayDriv
613560
else:self.dots = dots
614561
return
615562

616-
if(driver._baud==1):#brxcom
617-
assert isinstance(keys, int)
618-
if(keys>255 and keys<512):
619-
self.routingIndex = keys-256-driver._voffset
620-
self.id = "route"
621-
return
622-
elif(keys>511 and keys <786):
623-
self.routingIndex = keys-512-driver._voffset
624-
self.id="upperRouting"
625-
return
626-
else:
627-
key1 = (keys & 0xFFFF0000) >> 16
628-
key2 = keys & 0x0000FFFF
629-
self.id=brl_keyname_decoded(key1, ',')+brl_keyname_decoded(key2, '')
630-
return
631-
632563
if(driver._proto == 'A'):#non trio
633564
assert isinstance(keys, bytes)
634565
decodedkeys = brl_decode_keys_A(keys[3:], 4, driver._voffset*2)

user_docs/de/userGuide.t2t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3272,4 +3272,4 @@ Die folgenden Werte können geändert werden:
32723272
Wenn Sie weitere Informationen oder Hilfe bezüglich NVDA benötigen, besuchen Sie bitte die NVDA-Homepage unter NVDA_URL.
32733273
Neben Ressourcen der Community und dem technischen Support finden Sie auch zusätzliche Dokumentationen.
32743274
Auf diesen Seiten werden Informationen und Ressourcen zur NVDA-Entwicklung ebenfalls bereitgestellt.
3275-
3275+
-

user_docs/en/userGuide.t2t

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2858,10 +2858,6 @@ The following Braille displays are supported:
28582858

28592859
These displays do not support NVDA's automatic background braille display detection functionality.
28602860

2861-
If BrxCom is installed, NVDA will use BrxCom.
2862-
BrxCom is a tool that allows keyboard input from the braille display to function independently from a screen reader.
2863-
Keyboard input is possible with the Trio and BRAILLEX Live models.
2864-
28652861
Most devices have an Easy Access Bar (EAB) that allows intuitive and fast operation.
28662862
The EAB can be moved in four directions where generally each direction has two switches.
28672863
The C and Live series are the only exceptions to this rule.

0 commit comments

Comments
 (0)