-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BF: Keep settings after close / reopen #13
base: main
Are you sure you want to change the base?
Conversation
@@ -145,6 +145,11 @@ def __init__(self, *args, **kwargs): | |||
EyeTracker._keyboard = dev | |||
|
|||
try: | |||
# Add additional EyeLink command functions as options for the overloaded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was moved to the top because the functions need to be available during the connection initialization
else: | ||
r = default_native_data_file_name.rfind('.') | ||
if r > 0: | ||
if default_native_data_file_name[r:].lower() == 'edf': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line was also changed due to 'edf'.lower() doing nothing, now it lowers the data file name so 'EXP.EDF' would match
@@ -289,6 +294,7 @@ def setConnectionState(self, enable): | |||
self._eyelink.open(host_pc_ip_address) | |||
pylink.flushGetkeyQueue() | |||
self._eyelink.setOfflineMode() | |||
self._initConnection() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this now attempts to configure the eyelink session for each time the connection is opened
Currently if the connection state is closed and then opened again, the settings (such as the EDF file name) are gone. This just wraps the initial setup in a method that can be reused each time the connection state is reopened.