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

Add support for eye tracking frequency, and participants query #5

Closed
HamAndChris opened this issue Jan 14, 2019 · 2 comments
Closed
Assignees

Comments

@HamAndChris
Copy link

Hello, I have added the following functions to my controller.py which enables changing the default eye tracking frequency:


	def get_et_freq(self):
		return self.get_configuration()['sys_et_freq']

	def get_et_frequencies(self):
		return self.get_status()['sys_et']['frequencies']

	def set_et_freq_50(self):
		data = {'sys_et_freq': 50}
		json_data = self.__post_request__('/api/system/conf', data)

	def set_et_freq_100(self):
		"""May not be available. Check get_et_frequencies() first."""
		data = {'sys_et_freq': 100}
		json_data = self.__post_request__('/api/system/conf', data)

Also, this allows querying the list of participants and projects directly:

	def get_projects(self):
		return self.__get_request__('/api/projects')

	def get_participants(self):
		return self.__get_request__('/api/participants')

I would just make a pull request but I'm too lazy.

Thanks,

  • Chris
@ddetommaso ddetommaso self-assigned this Jan 15, 2019
@ddetommaso
Copy link
Owner

Hi @HamAndChris,

thank you for your code enhancements. I just included in the last commit 1b95aa8 which has also an alphabetically reorder of all the methods.

@HamAndChris
Copy link
Author

One more for you:

	def get_recordings(self):
		return self.__get_request__('/api/recordings')

Thanks,

  • Chris

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

No branches or pull requests

2 participants