esdalmaijer / PyGaze

an open-source, cross-platform toolbox for minimal-effort programming of eye tracking experiments
www.pygaze.org
GNU General Public License v3.0
670 stars 211 forks source link

Added some Tobii device-specific error handling #168

Closed Warren-Park closed 1 year ago

Warren-Park commented 1 year ago
  1. Better handling for the cases when the "settings" object is somehow not found
  2. In the case of Tobii TX300 (other devices are not tested), there are cases that (t1-t0) is extremely small, causing ZeroDivisionError. Error handling is added for such a case. (instead of (t1-t0), an arbitrary, but a very small number (1e-20) is used)

Motivation: I am using Tobii TX300, and unfortunately, I could not use PyGaze due to some errors that occur repeatedly (crashes at the calibration time). These two changes resolved the issue, and I am using the PyGaze as intended :)

esdalmaijer commented 1 year ago

Thanks for your contribution, it's hugely appreciated!