OSDN Git Service

freedomScientific braille display driver: Support the Focus 40 Blue when connected...
authorJames Teh <jamie@jantrid.net>
Wed, 9 Feb 2011 01:09:29 +0000 (11:09 +1000)
committerJames Teh <jamie@jantrid.net>
Wed, 9 Feb 2011 01:09:29 +0000 (11:09 +1000)
Fixes #1345.

source/brailleDisplayDrivers/freedomScientific.py
user_docs/en/changes.t2t
user_docs/en/userGuide.t2t

index 9f337fa..0c63481 100755 (executable)
@@ -1,12 +1,13 @@
 #brailleDisplayDrivers/freedomScientific.py\r
 #A part of NonVisual Desktop Access (NVDA)\r
-#Copyright (C) 2006-2009 NVDA Contributors <http://www.nvda-project.org/>\r
 #This file is covered by the GNU General Public License.\r
 #See the file COPYING for more details.\r
+#Copyright (C) 2008-2011 Michael Curran <mick@kulgan.net>, James Teh <jamie@jantrid.net>\r
 \r
 from ctypes import *\r
 from ctypes.wintypes import *\r
 import itertools\r
+import hwPortUtils\r
 import braille\r
 import inputCore\r
 from baseObject import ScriptableObject\r
@@ -112,7 +113,10 @@ class BrailleDisplayDriver(braille.BrailleDisplayDriver,ScriptableObject):
                self._messageWindowClassAtom=windll.user32.RegisterClassExW(byref(nvdaFsBrlWndCls))\r
                self._messageWindow=windll.user32.CreateWindowExW(0,self._messageWindowClassAtom,u"nvdaFsBrlWndCls window",0,0,0,0,0,None,None,appInstance,None)\r
                fbHandle=-1\r
-               for port in ("usb","serial"):\r
+               for port in itertools.chain(("USB",),\r
+                       (portInfo["port"].encode("mbcs") for portInfo in hwPortUtils.listComPorts(onlyAvailable=True)\r
+                               if portInfo.get("bluetoothName") == "Focus 40 BT")\r
+               ):\r
                        fbHandle=fbOpen(port,self._messageWindow,nvdaFsBrlWm)\r
                        if fbHandle!=-1:\r
                                break\r
index a27ea0a..36b1614 100644 (file)
@@ -23,6 +23,7 @@ Highlights of this release include automatic reporting of new text output in mIR
 - Handy Tech braille displays can now be used without installing the Handy Tech universal driver. (#854)\r
 - Support for several Baum, HumanWare and APH braille displays. (#937)\r
 - The status bar in Media Player Classic Home Cinema is now recognised.\r
+- The Freedom Scientific Focus 40 Blue braille display can now be used when connected via bluetooth. (#1345)\r
 \r
 \r
 == Changes ==\r
index edcf49f..8852e1e 100644 (file)
@@ -879,7 +879,7 @@ To download this synthesizer, please visit the downloads section of the Russian
 This section contains information about the Braille displays supported by NVDA.\r
 \r
 ++ Freedom Scientific Focus/PAC Mate Series ++\r
-All Focus and PAC Mate displays from [Freedom Scientific http://www.freedomscientific.com/] are supported.\r
+All Focus and PAC Mate displays from [Freedom Scientific http://www.freedomscientific.com/] are supported when connected via USB or bluetooth.\r
 You will need the Freedom Scientific braille display drivers installed on your system.\r
 If you do not have them already, you can obtain them from http://www.freedomscientific.com/downloads/focus-40-blue/focus-40-blue-downloads.asp.\r
 Although this page only mentions the Focus 40 Blue display, the driver supports all Freedom Scientific displays.\r