Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

zeyus
Copy link

@zeyus zeyus commented Oct 21, 2024

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.

@@ -145,6 +145,11 @@ def __init__(self, *args, **kwargs):
EyeTracker._keyboard = dev

try:
# Add additional EyeLink command functions as options for the overloaded
Copy link
Author

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':
Copy link
Author

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()
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant