mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
feat: no gui mode fixes
This commit is contained in:
parent
11f1e68fcc
commit
9b9763b132
@ -366,6 +366,9 @@ class CameraWidget:
|
||||
def render(self, window, event, values):
|
||||
changed = False
|
||||
|
||||
if self.settings.gui_disable_gui == False:
|
||||
|
||||
|
||||
# If anything has changed in our configuration settings, change/update those.
|
||||
if (
|
||||
event == self.gui_save_tracking_button
|
||||
@ -681,3 +684,24 @@ class CameraWidget:
|
||||
self.osc_queue.put(osc_message)
|
||||
except Empty:
|
||||
pass
|
||||
|
||||
else:
|
||||
try:
|
||||
window[self.gui_roi_message].update(visible=False)
|
||||
window[self.gui_output_graph].update(visible=False)
|
||||
(maybe_image, eye_info) = self.image_queue.get(block=False)
|
||||
|
||||
|
||||
if (
|
||||
eye_info.info_type != EyeInfoOrigin.FAILURE
|
||||
):
|
||||
|
||||
# Relay information to OSC
|
||||
if eye_info.info_type != EyeInfoOrigin.FAILURE:
|
||||
osc_message = OSCMessage(
|
||||
type=OSCMessageType.EYE_INFO,
|
||||
data=(self.eye_id, eye_info),
|
||||
)
|
||||
self.osc_queue.put(osc_message)
|
||||
except Empty:
|
||||
pass
|
||||
@ -179,6 +179,8 @@ class EyeTrackSettingsConfig(BaseModel):
|
||||
osc_invert_eye_close: bool = False
|
||||
gui_RANSACBLINK: bool = False
|
||||
|
||||
gui_disable_gui: bool = False
|
||||
|
||||
gui_right_eye_dominant: bool = False
|
||||
gui_left_eye_dominant: bool = False
|
||||
gui_outer_side_falloff: bool = False
|
||||
|
||||
@ -274,6 +274,7 @@ def main():
|
||||
return
|
||||
|
||||
if values[RIGHT_EYE_RADIO_NAME] and config.eye_display_id != EyeId.RIGHT:
|
||||
config.settings.gui_disable_gui = False
|
||||
eyes[0].start()
|
||||
eyes[1].stop()
|
||||
settings[0].stop()
|
||||
@ -289,6 +290,7 @@ def main():
|
||||
config.save()
|
||||
|
||||
elif values[LEFT_EYE_RADIO_NAME] and config.eye_display_id != EyeId.LEFT:
|
||||
config.settings.gui_disable_gui = False
|
||||
settings[0].stop()
|
||||
settings[1].stop()
|
||||
settings[2].stop()
|
||||
@ -304,6 +306,7 @@ def main():
|
||||
config.save()
|
||||
|
||||
elif values[BOTH_EYE_RADIO_NAME] and config.eye_display_id != EyeId.BOTH:
|
||||
config.settings.gui_disable_gui = False
|
||||
settings[0].stop()
|
||||
settings[1].stop()
|
||||
settings[2].stop()
|
||||
@ -319,6 +322,7 @@ def main():
|
||||
config.save()
|
||||
|
||||
elif values[SETTINGS_RADIO_NAME] and config.eye_display_id != EyeId.SETTINGS:
|
||||
config.settings.gui_disable_gui = False
|
||||
eyes[0].stop()
|
||||
eyes[1].stop()
|
||||
settings[1].stop()
|
||||
@ -333,6 +337,7 @@ def main():
|
||||
config.save()
|
||||
|
||||
elif values[ALGO_SETTINGS_RADIO_NAME] and config.eye_display_id != EyeId.ALGOSETTINGS:
|
||||
config.settings.gui_disable_gui = False
|
||||
eyes[0].stop()
|
||||
eyes[1].stop()
|
||||
settings[0].stop()
|
||||
@ -347,6 +352,7 @@ def main():
|
||||
config.save()
|
||||
|
||||
elif values[VRCFT_MODULE_SETTINGS_RADIO_NAME] and config.eye_display_id != EyeId.VRCFTMODULESETTINGS:
|
||||
config.settings.gui_disable_gui = False
|
||||
eyes[0].stop()
|
||||
eyes[1].stop()
|
||||
settings[0].stop()
|
||||
@ -360,6 +366,7 @@ def main():
|
||||
config.eye_display_id = EyeId.VRCFTMODULESETTINGS
|
||||
config.save()
|
||||
elif values[GUIOFF_RADIO_NAME] and config.eye_display_id != EyeId.GUIOFF:
|
||||
config.settings.gui_disable_gui = True
|
||||
# eyes[0].stop()
|
||||
# eyes[1].stop()
|
||||
settings[0].stop()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user