def get_wifi2_firmware_version_async(self, version): self.wifi2_firmware_version = version self.device_info.extensions[ self.wifi2_ext].firmware_version_installed = version infos.update_info(self.uid) get_main_window().update_tree_view() # FIXME: this is kind of a hack self.wifi2_present(True)
def is_present_async(present, extension_type, name): self.extension_type_preset[extension_type] = present if present: if self.device_info.extensions['ext0'] == None: ext = 'ext0' elif self.device_info.extensions['ext1'] == None: ext = 'ext1' else: return # This should never be the case self.device_info.extensions[ext] = infos.ExtensionInfo() self.device_info.extensions[ext].name = name self.device_info.extensions[ ext].extension_type = extension_type self.device_info.extensions[ext].position = ext self.device_info.extensions[ext].master_info = self.device_info infos.update_info(self.uid) if extension_type == self.master.EXTENSION_TYPE_WIFI2: self.device_info.extensions[ext].url_part = 'wifi_v2' # When WIFI2 extension firmware version is being requested the # extension might still not be done with booting and thus the # message won't be received by the extension. So we delay sending # the request which gives enough time to the extension to finish # booting. Note that this delay is only induced when there is a # WIFI2 extension present. self.wifi2_ext = ext self.label_no_extension.setText( 'Waiting for WIFI Extension 2.0 firmware version...') self.wifi2_get_firmware_version_timer.start(2000)
def is_present_async(present, extension_type, name): self.extension_type_preset[extension_type] = present if present: if self.device_info.extensions['ext0'] == None: ext = 'ext0' elif self.device_info.extensions['ext1'] == None: ext = 'ext1' else: return # This should never be the case self.device_info.extensions[ext] = infos.ExtensionInfo() self.device_info.extensions[ext].name = name self.device_info.extensions[ext].extension_type = extension_type self.device_info.extensions[ext].position = ext self.device_info.extensions[ext].master_info = self.device_info infos.update_info(self.uid) def get_wifi2_firmware_version_async(version, ext): self.device_info.extensions[ext].firmware_version_installed = version infos.update_info(self.uid) if extension_type == self.master.EXTENSION_TYPE_WIFI2: self.device_info.extensions[ext].url_part = 'wifi_v2' async_call(self.master.get_wifi2_firmware_version, None, lambda v: get_wifi2_firmware_version_async(v, ext), self.increase_error_count)
def is_present_async(present, extension_type, name): self.extension_type_preset[extension_type] = present if present: if self.device_info.extensions['ext0'] == None: ext = 'ext0' elif self.device_info.extensions['ext1'] == None: ext = 'ext1' else: return # This should never be the case self.device_info.extensions[ext] = infos.ExtensionInfo() self.device_info.extensions[ext].name = name self.device_info.extensions[ext].extension_type = extension_type self.device_info.extensions[ext].position = ext self.device_info.extensions[ext].master_info = self.device_info if extension_type == self.master.EXTENSION_TYPE_WIFI2: self.device_info.extensions[ext].url_part = 'wifi_v2' # When WIFI2 extension firmware version is being requested the # extension might still not be done with booting and thus the # message won't be received by the extension. So we delay sending # the request which gives enough time to the extension to finish # booting. Note that this delay is only induced when there is a # WIFI2 extension present. self.wifi2_ext = ext self.label_no_extension.setText('Waiting for WIFI Extension 2.0 firmware version...') async_call(self.master.get_wifi2_firmware_version, None, self.get_wifi2_firmware_version_async, self.increase_error_count, delay=2.0) infos.update_info(self.uid)
def is_present_async(present, extension_type, name): self.extension_type_preset[extension_type] = present if present: if self.device_info.extensions['ext0'] == None: ext = 'ext0' elif self.device_info.extensions['ext1'] == None: ext = 'ext1' else: return # This should never be the case self.device_info.extensions[ext] = infos.ExtensionInfo() self.device_info.extensions[ext].name = name self.device_info.extensions[ext].extension_type = extension_type self.device_info.extensions[ext].position = ext self.device_info.extensions[ext].master_info = self.device_info infos.update_info(self.uid) def get_wifi2_firmware_version_async(version, ext): self.device_info.extensions[ext].firmware_version_installed = version infos.update_info(self.uid) get_main_window().update_tree_view() # FIXME: this is kind of a hack self.is_wifi2_present_async(True) if extension_type == self.master.EXTENSION_TYPE_WIFI2: self.device_info.extensions[ext].url_part = 'wifi_v2' ''' When WIFI2 extension firmware version is being requested the extension might still not be done with booting and thus the message won't be received by the extension. So we delay sending the request which gives enough time to the extension to finish booting. Note that this delay is only induced when there is a WIFI2 extension present. ''' time.sleep(2) async_call(self.master.get_wifi2_firmware_version, None, lambda v: get_wifi2_firmware_version_async(v, ext), self.increase_error_count)
def get_wifi2_firmware_version_async(version, ext): self.device_info.extensions[ext].firmware_version_installed = version infos.update_info(self.uid) get_main_window().update_tree_view() # FIXME: this is kind of a hack self.is_wifi2_present_async(True)
def get_connection_type_async(connection_type): self.device_info.connection_type = connection_type infos.update_info(self.uid)
def get_connection_type_async(connection_type): self.device_info.connection_type = connection_type infos.update_info(self.uid)
def get_wifi2_firmware_version_async(version, ext): self.device_info.extensions[ext].firmware_version_installed = version infos.update_info(self.uid)