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
671 stars 211 forks source link

tobii: don't crash on empty self.gaze #109

Closed smathot closed 6 years ago

smathot commented 6 years ago

Based on this forum comment, I noticed that there is a problem with libtobii when no samples have yet been added to self.gaze. I don't have a Tobii myself to test this, so this is blind-coded (!), but this commit at least fixes some issues.

But I don't know what the expected behavior is in all cases, so I'd say that this needs to be verified by someone with a Tobii and considerable knowledge of the system.

@pedrotari7

esdalmaijer commented 6 years ago

I also don't have a Tobii to test, but the changes look sensible enough to merge. Perhaps @grebdems and/or @pedrotari7 could double-check?