WIP Rokid support

This commit is contained in:
wheaney 2024-08-12 09:30:35 -07:00
parent b3310647f3
commit e754a6aa9d
4 changed files with 8 additions and 3 deletions

1
.gitmodules vendored
View File

@ -5,6 +5,7 @@
[submodule "modules/XRLinuxDriver"]
path = modules/XRLinuxDriver
url = https://github.com/wheaney/XRLinuxDriver.git
branch = rokid
[submodule "modules/sombrero"]
path = modules/sombrero
url = https://github.com/wheaney/sombrero.git

@ -1 +1 @@
Subproject commit 860d3ee26899c72709141296f557b9b61a5beefa
Subproject commit 027c306c3979f9fc0dc659fe4b8d240c517d7a1b

View File

@ -89,7 +89,7 @@ class ConnectedDevice(Gtk.Box):
self.state_manager.connect('notify::enabled-features-list', self._handle_enabled_features)
self.state_manager.connect('notify::device-supports-sbs', self._handle_device_supports_sbs)
self.follow_mode_switch.set_active(self.state_manager.follow_mode)
self.follow_mode_switch.set_active(self.state_manager.get_property('follow-mode'))
self.follow_mode_switch.connect('notify::active', self._refresh_follow_mode)
self.effect_enable_switch.set_active(self._is_config_enabled(self.ipc.retrieve_config()) and self.extensions_manager.is_enabled())
@ -141,7 +141,7 @@ class ConnectedDevice(Gtk.Box):
def _refresh_follow_mode(self, switch, param):
self.follow_threshold_scale.set_sensitive(switch.get_active())
if (self.state_manager.follow_mode == switch.get_active()):
if (self.state_manager.get_property('follow-mode') == switch.get_active()):
return
self.ipc.write_control_flags({

View File

@ -56,12 +56,16 @@ class StateManager(GObject.GObject):
GObject.GObject.__init__(self)
self.ipc = XRDriverIPC.get_instance()
self.driver_running = False
self.follow_mode = False
self.follow_threshold = 15.0
self.widescreen_mode = False
self.connected_device_name = None
self.license_action_needed = False
self.license_action_needed_seconds = 0
self.confirmed_token = False
self.license_present = False
self.enabled_features = []
self.device_supports_sbs = False
self.start()