openstenoproject/plover — pull request #163 by rbrewer123 (2013-12-13 05:48:42+00:00)
Title: fix stentura high CPU usage

This patch is a fix for high CPU usage in stentura.py. It sets a small default timeout on the serial port (0.05 seconds) for reading data. That timeout becomes the granularity for interrupting the process of reading data in _read_data(). _read_data() attempts to read as much data as it can within that small timeout period. I moved the check for the overall timeout up to _read_packet().

Verified it functions with low CPU usage on Ubuntu 13.04.