Skip to content

Commit

Permalink
Merge pull request #7 from pupil-labs/cleanup-settings
Browse files Browse the repository at this point in the history
Removes recording-enabled setting
  • Loading branch information
TEParsons authored Aug 7, 2024
2 parents 40f5cee + 6f0d082 commit 13dd980
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ eyetracker.hw.pupil_labs.neon.EyeTracker:
runtime_settings:
companion_address: neon.local
companion_port: 8080
recording_enabled: True
9 changes: 4 additions & 5 deletions psychopy_eyetracker_pupil_labs/pupil_labs/neon/eyetracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,10 @@ def setRecordingState(self, should_be_recording: bool) -> bool:
if not self.isConnected():
return False

if self._runtime_settings["recording_enabled"]:
if should_be_recording:
self._device.recording_start()
else:
self._device.recording_stop_and_save()
if should_be_recording:
self._device.recording_start()
else:
self._device.recording_stop_and_save()

self._actively_recording = should_be_recording

Expand Down
17 changes: 7 additions & 10 deletions psychopy_eyetracker_pupil_labs/pupil_labs/pupil_core/eyetracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def __init__(self, *args, **kwargs) -> None:
self._pupil_remote_subscriptions.append("notify.calibration")

capture_recording_settings = self._runtime_settings["pupil_capture_recording"]
self._capture_recording_enabled = capture_recording_settings["enabled"]
self._capture_recording_location = capture_recording_settings["location"]

self._gaze_bisectors_by_topic = defaultdict(MutableBisector)
Expand Down Expand Up @@ -256,16 +255,14 @@ def setRecordingState(self, should_be_recording: bool) -> bool:
"""
if not self.isConnected():
return False
if self._capture_recording_enabled:
if should_be_recording:
self._pupil_remote.start_recording(
rec_name=self._capture_recording_location
)
else:
self._pupil_remote.stop_recording()
self._actively_recording = self._pupil_remote.is_recording

if should_be_recording:
self._pupil_remote.start_recording(
rec_name=self._capture_recording_location
)
else:
self._actively_recording = should_be_recording
self._pupil_remote.stop_recording()
self._actively_recording = self._pupil_remote.is_recording

is_recording_enabled = self.isRecordingEnabled()

Expand Down

0 comments on commit 13dd980

Please sign in to comment.