コード例 #1
0
	def retuneTerr(self):
		if not self.initcomplete:
			return
		if self.scan_input_as.value == "channel":
			frequency = channel2frequency(self.scan_ter.channel.value, self.ter_tnumber)
		else:
			frequency = self.scan_ter.frequency.floatint * 1000
		if self.tuning_type.value == "single_transponder":
			transponder = [
				2, #TERRESTRIAL
				frequency,
				self.scan_ter.bandwidth.value,
				self.scan_ter.modulation.value,
				self.scan_ter.fechigh.value,
				self.scan_ter.feclow.value,
				self.scan_ter.guard.value,
				self.scan_ter.transmission.value,
				self.scan_ter.hierarchy.value,
				self.scan_ter.inversion.value,
				self.scan_ter.system.value,
				self.scan_ter.plp_id.value]
			self.tuner.tuneTerr(transponder[1], transponder[9], transponder[2], transponder[4], transponder[5], transponder[3], transponder[7], transponder[6], transponder[8], transponder[10], transponder[11])
			self.transponder = transponder
		elif self.tuning_type.value == "predefined_transponder":
			region = nimmanager.getTerrestrialDescription(int(self.satfinder_scan_nims.value))
			tps = nimmanager.getTranspondersTerrestrial(region)
			if len(tps) > self.TerrestrialTransponders.index :
				transponder = tps[self.TerrestrialTransponders.index]
				# frequency 1, inversion 9, bandwidth 2, fechigh 4, feclow 5, modulation 3, transmission 7, guard 6, hierarchy 8, system 10, plp_id 11
				self.tuner.tuneTerr(transponder[1], transponder[9], transponder[2], transponder[4], transponder[5], transponder[3], transponder[7], transponder[6], transponder[8], transponder[10], transponder[11])
				self.transponder = transponder
コード例 #2
0
	def retuneTerr(self, configElement):
		if not nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-T"):
			return self.retuneCab(configElement)
		if self.initcomplete:
			if self.scan_input_as.value == "channel":
				frequency = channel2frequency(self.scan_ter.channel.value, self.ter_tnumber)
			else:
				frequency = self.scan_ter.frequency.value * 1000
			if self.tuning_type.value == "single_transponder":
				transponder = [
					2, #TERRESTRIAL
					frequency,
					self.scan_ter.bandwidth.value,
					self.scan_ter.modulation.value,
					self.scan_ter.fechigh.value,
					self.scan_ter.feclow.value,
					self.scan_ter.guard.value,
					self.scan_ter.transmission.value,
					self.scan_ter.hierarchy.value,
					self.scan_ter.inversion.value,
					self.scan_ter.system.value,
					self.scan_ter.plp_id.value]
				if self.initcomplete:
					self.tuner.tuneTerr(transponder[1], transponder[9], transponder[2], transponder[4], transponder[5], transponder[3], transponder[7], transponder[6], transponder[8], transponder[10], transponder[11])
				self.transponder = transponder
			elif self.tuning_type.value == "predefined_transponder":
				region = nimmanager.getTerrestrialDescription(int(self.satfinder_scan_nims.value))
				tps = nimmanager.getTranspondersTerrestrial(region)
				if len(tps) > self.TerrestrialTransponders.index :
					transponder = tps[self.TerrestrialTransponders.index]
					# frequency 1, inversion 9, bandwidth 2, fechigh 4, feclow 5, modulation 3, transmission 7, guard 6, hierarchy 8, system 10, plp_id 11
					if self.initcomplete:
						self.tuner.tuneTerr(transponder[1], transponder[9], transponder[2], transponder[4], transponder[5], transponder[3], transponder[7], transponder[6], transponder[8], transponder[10], transponder[11])
					self.transponder = transponder
コード例 #3
0
ファイル: plugin.py プロジェクト: openhdf/enigma2
	def retuneTerr(self):
		if self.initcomplete:
			if self.scan_input_as.value == "channel":
				frequency = channel2frequency(self.scan_ter.channel.value, self.ter_tnumber)
			else:
				frequency = self.scan_ter.frequency.floatint * 1000
			if self.scan_typeterrestrial.value == "single_transponder":
				transponder = [
					2, #TERRESTRIAL
					frequency,
					self.scan_ter.bandwidth.value,
					self.scan_ter.modulation.value,
					self.scan_ter.fechigh.value,
					self.scan_ter.feclow.value,
					self.scan_ter.guard.value,
					self.scan_ter.transmission.value,
					self.scan_ter.hierarchy.value,
					self.scan_ter.inversion.value,
					self.scan_ter.system.value,
					self.scan_ter.plp_id.value]
				self.tuner.tuneTerr(transponder[1], transponder[9], transponder[2], transponder[4], transponder[5], transponder[3], transponder[7], transponder[6], transponder[8], transponder[10], transponder[11])
				self.transponder = transponder
			elif self.scan_typeterrestrial.value == "predefined_transponder":
				if self.TerrestrialTransponders is not None:
					region = nimmanager.getTerrestrialDescription(int(self.scan_nims.value))
					tps = nimmanager.getTranspondersTerrestrial(region)
					if len(tps) > self.TerrestrialTransponders.index :
						transponder = tps[self.TerrestrialTransponders.index]
						# frequency 1, inversion 9, bandwidth 2, fechigh 4, feclow 5, modulation 3, transmission 7, guard 6, hierarchy 8, system 10, plp_id 11
						self.tuner.tuneTerr(transponder[1], transponder[9], transponder[2], transponder[4], transponder[5], transponder[3], transponder[7], transponder[6], transponder[8], transponder[10], transponder[11])
						self.transponder = transponder
コード例 #4
0
 def retuneTerr(self):
     if self.initcomplete:
         if self.scan_input_as.value == 'channel':
             frequency = channel2frequency(self.scan_ter.channel.value,
                                           self.ter_tnumber)
         else:
             frequency = self.scan_ter.frequency.value * 1000
         if self.scan_typeterrestrial.value == 'single_transponder':
             transponder = [
                 2, frequency, self.scan_ter.bandwidth.value,
                 self.scan_ter.modulation.value,
                 self.scan_ter.fechigh.value, self.scan_ter.feclow.value,
                 self.scan_ter.guard.value,
                 self.scan_ter.transmission.value,
                 self.scan_ter.hierarchy.value,
                 self.scan_ter.inversion.value, self.scan_ter.system.value,
                 self.scan_ter.plp_id.value
             ]
             self.tuner.tuneTerr(transponder[1], transponder[9],
                                 transponder[2], transponder[4],
                                 transponder[5], transponder[3],
                                 transponder[7], transponder[6],
                                 transponder[8], transponder[10],
                                 transponder[11])
             self.transponder = transponder
         elif self.scan_typeterrestrial.value == 'predefined_transponder':
             if self.TerrestrialTransponders is not None:
                 region = nimmanager.getTerrestrialDescription(
                     int(self.scan_nims.value))
                 tps = nimmanager.getTranspondersTerrestrial(region)
                 if len(tps) > self.TerrestrialTransponders.index:
                     transponder = tps[self.TerrestrialTransponders.index]
                     self.tuner.tuneTerr(transponder[1], transponder[9],
                                         transponder[2], transponder[4],
                                         transponder[5], transponder[3],
                                         transponder[7], transponder[6],
                                         transponder[8], transponder[10],
                                         transponder[11])
                     self.transponder = transponder
     return
コード例 #5
0
ファイル: plugin.py プロジェクト: teambluee2/stbgui
    def createSetup(self):
        self.list = []
        self.satfinderTunerEntry = getConfigListEntry(_("Tuner"),
                                                      self.satfinder_scan_nims)
        self.list.append(self.satfinderTunerEntry)
        if nimmanager.nim_slots[int(
                self.satfinder_scan_nims.value)].isCompatible("DVB-S"):
            self.tuning_sat = self.scan_satselection[self.getSelectedSatIndex(
                self.feid)]
            if self.tuning_sat.value:
                self.satEntry = getConfigListEntry(_('Satellite'),
                                                   self.tuning_sat)
                self.list.append(self.satEntry)
                self.typeOfTuningEntry = getConfigListEntry(
                    _('Tune'), self.tuning_type)
                if len(
                        nimmanager.getTransponders(int(self.tuning_sat.value))
                ) < 1:  # Only offer 'predefined transponder' if some transponders exist
                    self.tuning_type.value = "single_transponder"
                else:
                    self.list.append(self.typeOfTuningEntry)

                nim = nimmanager.nim_slots[self.feid]

                if self.tuning_type.value == "single_transponder":
                    if nim.isCompatible("DVB-S2"):
                        self.systemEntry = getConfigListEntry(
                            _('System'), self.scan_sat.system)
                        self.list.append(self.systemEntry)
                    else:
                        # downgrade to dvb-s, in case a -s2 config was active
                        self.scan_sat.system.value = eDVBFrontendParametersSatellite.System_DVB_S
                    self.frequencyEntry = getConfigListEntry(
                        _('Frequency'), self.scan_sat.frequency)
                    self.list.append(self.frequencyEntry)
                    self.polarizationEntry = getConfigListEntry(
                        _('Polarization'), self.scan_sat.polarization)
                    self.list.append(self.polarizationEntry)
                    self.symbolrateEntry = (getConfigListEntry(
                        _('Symbol rate'), self.scan_sat.symbolrate))
                    self.list.append(self.symbolrateEntry)
                    self.inversionEntry = getConfigListEntry(
                        _('Inversion'), self.scan_sat.inversion)
                    self.list.append(self.inversionEntry)

                    if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S:
                        self.fecEntry = getConfigListEntry(
                            _("FEC"), self.scan_sat.fec)
                        self.list.append(self.fecEntry)
                    elif self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S2:
                        self.fecEntry = getConfigListEntry(
                            _("FEC"), self.scan_sat.fec_s2)
                        self.list.append(self.fecEntry)
                        self.modulationEntry = getConfigListEntry(
                            _('Modulation'), self.scan_sat.modulation)
                        self.list.append(self.modulationEntry)
                        self.rolloffEntry = getConfigListEntry(
                            _('Roll-off'), self.scan_sat.rolloff)
                        self.list.append(self.rolloffEntry)
                        self.pilotEntry = getConfigListEntry(
                            _('Pilot'), self.scan_sat.pilot)
                        self.list.append(self.pilotEntry)
                        if nim.isMultistream():
                            self.list.append(
                                getConfigListEntry(_('Input Stream ID'),
                                                   self.scan_sat.is_id))
                            self.list.append(
                                getConfigListEntry(_('PLS Mode'),
                                                   self.scan_sat.pls_mode))
                            self.list.append(
                                getConfigListEntry(_('PLS Code'),
                                                   self.scan_sat.pls_code))
                elif self.tuning_type.value == "predefined_transponder":
                    if self.preDefTransponders is None:
                        self.updatePreDefTransponders()
                    self.list.append(
                        getConfigListEntry(_("Transponder"),
                                           self.preDefTransponders))
        elif nimmanager.nim_slots[int(
                self.satfinder_scan_nims.value)].isCompatible("DVB-C"):
            self.typeOfTuningEntry = getConfigListEntry(
                _('Tune'), self.tuning_type)
            if config.Nims[self.feid].cable.scan_type.value != "provider" or len(
                    nimmanager.getTranspondersCable(
                        int(self.satfinder_scan_nims.value))
            ) < 1:  # only show 'predefined transponder' if in provider mode and transponders exist
                self.tuning_type.value = "single_transponder"
            else:
                self.list.append(self.typeOfTuningEntry)
            if self.tuning_type.value == "single_transponder":
                self.list.append(
                    getConfigListEntry(_("Frequency"),
                                       self.scan_cab.frequency))
                self.list.append(
                    getConfigListEntry(_("Inversion"),
                                       self.scan_cab.inversion))
                self.list.append(
                    getConfigListEntry(_("Symbol rate"),
                                       self.scan_cab.symbolrate))
                self.list.append(
                    getConfigListEntry(_("Modulation"),
                                       self.scan_cab.modulation))
                self.list.append(
                    getConfigListEntry(_("FEC"), self.scan_cab.fec))
            elif self.tuning_type.value == "predefined_transponder":
                self.scan_nims.value = self.satfinder_scan_nims.value
                if self.CableTransponders is None:
                    self.predefinedCabTranspondersList()
                self.list.append(
                    getConfigListEntry(_('Transponder'),
                                       self.CableTransponders))
        elif nimmanager.nim_slots[int(
                self.satfinder_scan_nims.value)].isCompatible("DVB-T"):
            self.typeOfTuningEntry = getConfigListEntry(
                _('Tune'), self.tuning_type)
            region = nimmanager.getTerrestrialDescription(
                int(self.satfinder_scan_nims.value))
            if len(
                    nimmanager.getTranspondersTerrestrial(region)
            ) < 1:  # Only offer 'predefined transponder' if some transponders exist
                self.tuning_type.value = "single_transponder"
            else:
                self.list.append(self.typeOfTuningEntry)
            if self.tuning_type.value == "single_transponder":
                if nimmanager.nim_slots[int(
                        self.satfinder_scan_nims.value)].isCompatible(
                            "DVB-T2"):
                    self.systemEntryTerr = getConfigListEntry(
                        _('System'), self.scan_ter.system)
                    self.list.append(self.systemEntryTerr)
                else:
                    self.scan_ter.system.value = eDVBFrontendParametersTerrestrial.System_DVB_T
                self.typeOfInputEntry = getConfigListEntry(
                    _("Use frequency or channel"), self.scan_input_as)
                if self.ter_channel_input:
                    self.list.append(self.typeOfInputEntry)
                else:
                    self.scan_input_as.value = self.scan_input_as.choices[0]
                if self.ter_channel_input and self.scan_input_as.value == "channel":
                    channel = getChannelNumber(
                        self.scan_ter.frequency.floatint * 1000,
                        self.ter_tnumber)
                    if channel:
                        self.scan_ter.channel.removeNotifier(
                            self.retuneTriggeredByConfigElement)
                        self.scan_ter.channel.value = int(
                            channel.replace("+", "").replace("-", ""))
                    self.list.append(
                        getConfigListEntry(_("Channel"),
                                           self.scan_ter.channel))
                else:
                    prev_val = self.scan_ter.frequency.floatint
                    self.scan_ter.frequency.floatint = channel2frequency(
                        self.scan_ter.channel.value, self.ter_tnumber) / 1000
                    if self.scan_ter.frequency.floatint == 474000:
                        self.scan_ter.frequency.floatint = prev_val
                    self.list.append(
                        getConfigListEntry(_("Frequency"),
                                           self.scan_ter.frequency))
                self.list.append(
                    getConfigListEntry(_("Inversion"),
                                       self.scan_ter.inversion))
                self.list.append(
                    getConfigListEntry(_("Bandwidth"),
                                       self.scan_ter.bandwidth))
                self.list.append(
                    getConfigListEntry(_("Code rate HP"),
                                       self.scan_ter.fechigh))
                self.list.append(
                    getConfigListEntry(_("Code rate LP"),
                                       self.scan_ter.feclow))
                self.list.append(
                    getConfigListEntry(_("Modulation"),
                                       self.scan_ter.modulation))
                self.list.append(
                    getConfigListEntry(_("Transmission mode"),
                                       self.scan_ter.transmission))
                self.list.append(
                    getConfigListEntry(_("Guard interval"),
                                       self.scan_ter.guard))
                self.list.append(
                    getConfigListEntry(_("Hierarchy info"),
                                       self.scan_ter.hierarchy))
                if self.scan_ter.system.value == eDVBFrontendParametersTerrestrial.System_DVB_T2:
                    self.list.append(
                        getConfigListEntry(_('PLP ID'), self.scan_ter.plp_id))
            elif self.tuning_type.value == "predefined_transponder":
                self.scan_nims.value = self.satfinder_scan_nims.value
                if self.TerrestrialTransponders is None:
                    self.predefinedTerrTranspondersList()
                self.list.append(
                    getConfigListEntry(_('Transponder'),
                                       self.TerrestrialTransponders))
        elif nimmanager.nim_slots[int(
                self.satfinder_scan_nims.value)].isCompatible("ATSC"):
            self.typeOfTuningEntry = getConfigListEntry(
                _('Tune'), self.tuning_type)
            if len(
                    nimmanager.getTranspondersATSC(
                        int(self.satfinder_scan_nims.value))
            ) < 1:  # only show 'predefined transponder' if transponders exist
                self.tuning_type.value = "single_transponder"
            else:
                self.list.append(self.typeOfTuningEntry)
            if self.tuning_type.value == "single_transponder":
                self.systemEntryATSC = getConfigListEntry(
                    _("System"), self.scan_ats.system)
                self.list.append(self.systemEntryATSC)
                self.list.append(
                    getConfigListEntry(_("Frequency"),
                                       self.scan_ats.frequency))
                self.list.append(
                    getConfigListEntry(_("Inversion"),
                                       self.scan_ats.inversion))
                self.list.append(
                    getConfigListEntry(_("Modulation"),
                                       self.scan_ats.modulation))
            elif self.tuning_type.value == "predefined_transponder":
                #FIXME add region
                self.scan_nims.value = self.satfinder_scan_nims.value
                self.predefinedATSCTranspondersList()
                self.list.append(
                    getConfigListEntry(_('Transponder'),
                                       self.ATSCTransponders))
        self["config"].list = self.list
        self["config"].l.setList(self.list)
コード例 #6
0
	def createSetup(self):
		self.list = []
		self.satfinderTunerEntry = getConfigListEntry(_("Tuner"), self.satfinder_scan_nims)
		self.list.append(self.satfinderTunerEntry)
		if nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-S"):
			self.tuning_sat = self.scan_satselection[self.getSelectedSatIndex(self.feid)]
			self.satEntry = getConfigListEntry(_('Satellite'), self.tuning_sat)
			self.list.append(self.satEntry)
			self.typeOfTuningEntry = getConfigListEntry(_('Tune'), self.tuning_type)
			if len(nimmanager.getTransponders(int(self.tuning_sat.value))) < 1: # Only offer 'predefined transponder' if some transponders exist
				self.tuning_type.value = "single_transponder"
			else:
				self.list.append(self.typeOfTuningEntry)

			nim = nimmanager.nim_slots[self.feid]

			if self.tuning_type.value == "single_transponder":
				if nim.isCompatible("DVB-S2"):
					self.systemEntry = getConfigListEntry(_('System'), self.scan_sat.system)
					self.list.append(self.systemEntry)
				else:
					# downgrade to dvb-s, in case a -s2 config was active
					self.scan_sat.system.value = eDVBFrontendParametersSatellite.System_DVB_S
				self.list.append(getConfigListEntry(_('Frequency'), self.scan_sat.frequency))
				self.list.append(getConfigListEntry(_('Polarization'), self.scan_sat.polarization))
				self.list.append(getConfigListEntry(_('Symbol rate'), self.scan_sat.symbolrate))
				self.list.append(getConfigListEntry(_('Inversion'), self.scan_sat.inversion))
				if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S:
					self.list.append(getConfigListEntry(_("FEC"), self.scan_sat.fec))
				elif self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S2:
					self.list.append(getConfigListEntry(_("FEC"), self.scan_sat.fec_s2))
					self.modulationEntry = getConfigListEntry(_('Modulation'), self.scan_sat.modulation)
					self.list.append(self.modulationEntry)
					self.list.append(getConfigListEntry(_('Roll-off'), self.scan_sat.rolloff))
					self.list.append(getConfigListEntry(_('Pilot'), self.scan_sat.pilot))
					self.list.append(getConfigListEntry(_('Input Stream ID'), self.scan_sat.is_id))
					self.list.append(getConfigListEntry(_("PLS Mode"), self.scan_sat.pls_mode))
					self.list.append(getConfigListEntry(_('PLS Code'), self.scan_sat.pls_code))
			elif self.tuning_type.value == "predefined_transponder":
				self.updatePreDefTransponders()
				self.list.append(getConfigListEntry(_("Transponder"), self.preDefTransponders))
		elif nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-C"):
			self.typeOfTuningEntry = getConfigListEntry(_('Tune'), self.tuning_type)
			if config.Nims[self.feid].cable.scan_type.value != "provider" or len(nimmanager.getTranspondersCable(int(self.satfinder_scan_nims.value))) < 1: # only show 'predefined transponder' if in provider mode and transponders exist
				self.tuning_type.value = "single_transponder"
			else:
				self.list.append(self.typeOfTuningEntry)
			if self.tuning_type.value == "single_transponder":
				self.list.append(getConfigListEntry(_("Frequency"), self.scan_cab.frequency))
				self.list.append(getConfigListEntry(_("Inversion"), self.scan_cab.inversion))
				self.list.append(getConfigListEntry(_("Symbol rate"), self.scan_cab.symbolrate))
				self.list.append(getConfigListEntry(_("Modulation"), self.scan_cab.modulation))
				self.list.append(getConfigListEntry(_("FEC"), self.scan_cab.fec))
			elif self.tuning_type.value == "predefined_transponder":
				self.scan_nims.value = self.satfinder_scan_nims.value
				self.predefinedCabTranspondersList()
				self.list.append(getConfigListEntry(_('Transponder'), self.CableTransponders))
		elif nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-T"):
			self.typeOfTuningEntry = getConfigListEntry(_('Tune'), self.tuning_type)
			region = nimmanager.getTerrestrialDescription(int(self.satfinder_scan_nims.value))
			if len(nimmanager.getTranspondersTerrestrial(region)) < 1: # Only offer 'predefined transponder' if some transponders exist
				self.tuning_type.value = "single_transponder"
			else:
				self.list.append(self.typeOfTuningEntry)
			if self.tuning_type.value == "single_transponder":
				if nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-T2"):
					self.systemEntryTerr = getConfigListEntry(_('System'), self.scan_ter.system)
					self.list.append(self.systemEntryTerr)
				else:
					self.scan_ter.system.value = eDVBFrontendParametersTerrestrial.System_DVB_T
				self.typeOfInputEntry = getConfigListEntry(_("Use frequency or channel"), self.scan_input_as)
				if self.ter_channel_input:
					self.list.append(self.typeOfInputEntry)
				else:
					self.scan_input_as.value = self.scan_input_as.choices[0]
				if self.ter_channel_input and self.scan_input_as.value == "channel":
					channel = getChannelNumber(self.scan_ter.frequency.value*1000, self.ter_tnumber)
					if channel:
						self.scan_ter.channel.value = int(channel.replace("+","").replace("-",""))
					self.list.append(getConfigListEntry(_("Channel"), self.scan_ter.channel))
				else:
					prev_val = self.scan_ter.frequency.value
					self.scan_ter.frequency.value = channel2frequency(self.scan_ter.channel.value, self.ter_tnumber)/1000
					if self.scan_ter.frequency.value == 474000:
						self.scan_ter.frequency.value = prev_val
					self.list.append(getConfigListEntry(_("Frequency"), self.scan_ter.frequency))
				self.list.append(getConfigListEntry(_("Inversion"), self.scan_ter.inversion))
				self.list.append(getConfigListEntry(_("Bandwidth"), self.scan_ter.bandwidth))
				self.list.append(getConfigListEntry(_("Code rate HP"), self.scan_ter.fechigh))
				self.list.append(getConfigListEntry(_("Code rate LP"), self.scan_ter.feclow))
				self.list.append(getConfigListEntry(_("Modulation"), self.scan_ter.modulation))
				self.list.append(getConfigListEntry(_("Transmission mode"), self.scan_ter.transmission))
				self.list.append(getConfigListEntry(_("Guard interval"), self.scan_ter.guard))
				self.list.append(getConfigListEntry(_("Hierarchy info"), self.scan_ter.hierarchy))
				if self.scan_ter.system.value == eDVBFrontendParametersTerrestrial.System_DVB_T2:
					self.list.append(getConfigListEntry(_('PLP ID'), self.scan_ter.plp_id))
			elif self.tuning_type.value == "predefined_transponder":
				self.scan_nims.value = self.satfinder_scan_nims.value
				self.predefinedTerrTranspondersList()
				self.list.append(getConfigListEntry(_('Transponder'), self.TerrestrialTransponders))
		self.retune(None)
		self["config"].list = self.list
		self["config"].l.setList(self.list)