Skip to content

Commit

Permalink
Fix python 3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
morinted committed Feb 7, 2017
1 parent de6423e commit 14129f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions plover_palantype_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ def run(self):
while not self.finished.isSet():
if not self.serial_port.inWaiting():
self.serial_port.write(REQUEST_READ)
sleep(0.1) # Request a read 5 times a second
# Request a read 10 times a second
sleep(0.1)

raw = self.serial_port.read(self.serial_port.inWaiting())
# Every stroke is 5 bytes and we drop the first one.
for i in range(len(raw)/5):
for i in range(len(raw)//5):
keys = self._parse_packet(raw[i*5+1:(i+1)*5])
steno_keys = self.keymap.keys_to_actions(keys)
if steno_keys:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='plover_palantype_system',
version='0.1.0',
version='0.2.0',
description='Palantype system for Plover',
author='Ted Morin',
author_email='[email protected]',
Expand Down

0 comments on commit 14129f6

Please sign in to comment.