Bristol-Braille / canute-ui

User interface for the Canute electronic Braille reader.
http://bristolbraille.co.uk
GNU General Public License v3.0
36 stars 6 forks source link

Fix warm reset timeouts #282

Closed woodcoder closed 1 year ago

woodcoder commented 1 year ago

Fix #281 by removing the reset from this session of canute-ui and just exiting. When the ui respawns it will run a reset anyway.

This feels slower to react to the end user, as it used to start resetting immediately - but actually is quicker overall because it no longer does two resets for each button press.

This PR includes moving some expensive and slow python imports to be done after the reset has started, which overall increases the startup speed. (This should also help increase the 'spotting USB B unplug and shutdown' speed too.)