Skip to content

Fix how the Seika Notetaker Driver processes data#12581

Merged
seanbudd merged 5 commits into
betafrom
fixSeika
Jun 24, 2021
Merged

Fix how the Seika Notetaker Driver processes data#12581
seanbudd merged 5 commits into
betafrom
fixSeika

Conversation

@seanbudd

@seanbudd seanbudd commented Jun 24, 2021

Copy link
Copy Markdown
Member

Link to issue number:

Discussed/raised here: #11514 (comment)

Summary of the issue:

Seika Notetaker braille device still does not load in NVDA.

Description of how this pull request fixes the issue:

Fixes several minor logic errors in _onReceive

Testing strategy:

Unit tests have been added for this function. To run the unit tests on @moyanming's latest commit on the driver 84af837, the following patch can be done.

git checkout 84af837 source/brailleDisplayDrivers/seikantk.py
git apply test-original-onReceive.diff

Where this is test-original-onReceive.diff

diff --git a/source/brailleDisplayDrivers/seikantk.py b/source/brailleDisplayDrivers/seikantk.py
index c8a25dcb1..892e2627f 100644
--- a/source/brailleDisplayDrivers/seikantk.py
+++ b/source/brailleDisplayDrivers/seikantk.py
@@ -143,7 +143,9 @@ class BrailleDisplayDriver(braille.BrailleDisplayDriver):
 			arg = self._hidBuffer[3:self.cmdlen + 4]
 			self.status = 0
 			self._hidBuffer = b""
-			
+			self._processCommand(command, arg)
+
+	def _processCommand(self, command, arg):
 			if command == SEIKA_INFO:
 				self._handInfo(arg)
 			elif command == SEIKA_ROUTING:
diff --git a/tests/unit/test_brailleDisplayDrivers.py b/tests/unit/test_brailleDisplayDrivers.py
index 017f6a6ed..9303ebc97 100644
--- a/tests/unit/test_brailleDisplayDrivers.py
+++ b/tests/unit/test_brailleDisplayDrivers.py
@@ -27,6 +27,7 @@ class TestSeikaNotetaker(unittest.TestCase):
 				self._hidBuffer = b""
 				self._command = None
 				self._argsLen = None
+				self.status = 0
 
 			def _processCommand(self, command, arg):
 				"""Intercept processCommand to confirm _onReceive processes a message correctly.

Known issues with pull request:

Other unknown issues may still exist with Seika Notetaker Driver

Change log entries:

If merged to beta: none
If merged to alpha: Bug fixes

Fix registration for Seika Notetaker device

Code Review Checklist:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual testing.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers

@seanbudd
seanbudd requested a review from a team as a code owner June 24, 2021 00:07
@seanbudd
seanbudd requested review from feerrenrut and michaelDCurran and removed request for a team June 24, 2021 00:07
Comment thread tests/unit/test_brailleDisplayDrivers.py Outdated

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some minor suggestions about the test.

Comment thread tests/unit/test_brailleDisplayDrivers.py Outdated
Comment thread tests/unit/test_brailleDisplayDrivers.py Outdated
Comment thread tests/unit/test_brailleDisplayDrivers.py Outdated
@seanbudd
seanbudd requested a review from feerrenrut June 24, 2021 01:05

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Let's merge it!

@seanbudd
seanbudd merged commit 0a7f8d3 into beta Jun 24, 2021
@seanbudd
seanbudd deleted the fixSeika branch June 24, 2021 03:00
@nvaccessAuto nvaccessAuto added this to the 2021.2 milestone Jun 24, 2021
@moyanming

Copy link
Copy Markdown
Contributor

I have tested this PR build, connection and Braille display of the Seika Notetaker works well.
But there is an issue after pressing the key on the Seika Notetakerthe several times. I mean after every connection with Seika Notetaker the very first 5~10 key pressed on the Seika Notetaker works well but the following keypress can't work. BTW, the Braille display still works fine even there is a key issue.
Here is the nvda.log.

Here is the
Seika Notetaker protocol.pdf
for the detailed data translation between Screen Reader and Seika Notetaker.

@seanbudd seanbudd mentioned this pull request Jun 30, 2021
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants