Beispiel #1
0
	def saveAll(self):
		if self.nim.isCompatible("DVB-S"):
			# reset connectedTo to all choices to properly store the default value
			choices = []
			nimlist = nimmanager.getNimListOfType("DVB-S", self.slotid)
			for id in nimlist:
				choices.append((str(id), nimmanager.getNimDescription(id)))
			self.nimConfig.connectedTo.setChoices(choices)
		for x in self["config"].list:
			x[1].save()
Beispiel #2
0
	def saveAll(self):
		if self.nim.isCompatible("DVB-S"):
			# reset connectedTo to all choices to properly store the default value
			choices = []
			nimlist = nimmanager.getNimListOfType("DVB-S", self.slotid)
			for id in nimlist:
				choices.append((str(id), nimmanager.getNimDescription(id)))
			self.nimConfig.connectedTo.setChoices(choices)
			# sanity check for empty sat list
			if self.nimConfig.configMode.value != "satposdepends" and len(nimmanager.getSatListForNim(self.slotid)) < 1:
				self.nimConfig.configMode.value = "nothing"
		for x in self["config"].list:
			x[1].save()
Beispiel #3
0
    def saveAll(self):
        if self.nim.isCompatible('DVB-S'):
            choices = []
            nimlist = nimmanager.getNimListOfType('DVB-S', self.slotid)
            for id in nimlist:
                choices.append((str(id), nimmanager.getNimDescription(id)))

            self.nimConfig.connectedTo.setChoices(choices)
            if self.nimConfig.configMode.value != 'satposdepends' and len(nimmanager.getSatListForNim(self.slotid)) < 1:
                self.nimConfig.configMode.value = 'nothing'
        for x in self['config'].list:
            x[1].save()

        configfile.save()
Beispiel #4
0
	def saveAll(self):
		if self.nim.isCompatible("DVB-S"):
			# reset connectedTo to all choices to properly store the default value
			choices = []
			nimlist = nimmanager.getNimListOfType("DVB-S", self.slotid)
			for id in nimlist:
				choices.append((str(id), nimmanager.getNimDescription(id)))
			self.nimConfig.connectedTo.setChoices(choices)
			# sanity check for empty sat list
			if self.nimConfig.configMode.value != "satposdepends" and len(nimmanager.getSatListForNim(self.slotid)) < 1:
				self.nimConfig.configMode.value = "nothing"
			if self.nim.isFBCRoot():
				if SystemInfo["HasForceLNBOn"]:
					config.misc.forceLnbPower.save()
				if SystemInfo["HasForceToneburst"]:
					config.misc.forceToneBurst.save()
		for x in self["config"].list:
			x[1].save()
		configfile.save()
Beispiel #5
0
	def createSetup(self, fill_advanced_sat=True):
		print "Creating setup"
		self.list = [ ]

		self.multiType = None
		self.configMode = None
		self.diseqcModeEntry = None
		self.advancedSatsEntry = None
		self.advancedLnbsEntry = None
		self.advancedDiseqcMode = None
		self.advancedUsalsEntry = None
		self.advancedLof = None
		self.advancedPowerMeasurement = None
		self.turningSpeed = None
		self.turnFastEpochBegin = None
		self.turnFastEpochEnd = None
		self.uncommittedDiseqcCommand = None
		self.cableScanType = None
		self.have_advanced = False
		self.advancedUnicable = None
		self.advancedType = None
		self.advancedManufacturer = None
		self.advancedSCR = None
		self.advancedConnected = None
		self.advancedDepends = None
		self.unicableUsePinEntry = None
		
		multiType = self.nimConfig.multiType
		self.multiType = getConfigListEntry(_("Tuner type"), multiType)
		if multiType.enabled:
			self.list.append(self.multiType)

		curType = self.nim.types[multiType.value]
		if curType.startswith("DVB-S"):
			self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.sat.configMode)
			self.list.append(self.configMode)
			configMode = self.nimConfig.sat.configMode.value
			if configMode == "simple":			#simple setup
				self.diseqcModeEntry = getConfigListEntry(_("Mode"), self.nimConfig.diseqcMode)
				self.list.append(self.diseqcModeEntry)
				if self.nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
					self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
				if self.nimConfig.diseqcMode.value == "positioner":
					self.createPositionerSetup(self.list)
			elif configMode == "equal":
				choices = []
				nimlist = nimmanager.canEqualTo(self.nim.slot)
				for id in nimlist:
					#choices.append((str(id), str(chr(65 + id))))
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				#self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif configMode == "satposdepends":
				choices = []
				nimlist = nimmanager.canDependOn(self.nim.slot)
				for id, type in nimlist:
					#choices.append((str(id), str(chr(65 + id))))
					if type == 0:
						choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				#self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif configMode == "loopthrough":
				choices = []
				connectable = nimmanager.canConnectTo(self.slotid)
				print "connectable to:", connectable
				for id, type in connectable:
					if type == 0:
						choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.nimConfig.sat.configMode.connectedToChanged(self.nimConfig.connectedTo) # call connectedTo Notifier
				#self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif configMode == "nothing":
				pass
			elif configMode == "advanced": # advanced
				# SATs
				self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
				self.list.append(self.advancedSatsEntry)
				cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
				if cur_orb_pos is not None and fill_advanced_sat:
					satlist = self.nimConfig.advanced.sat.keys()
					if cur_orb_pos not in satlist:
						cur_orb_pos = satlist[0]
					currSat = self.nimConfig.advanced.sat[cur_orb_pos]
					self.fillListWithAdvancedSatEntrys(currSat)
				self.have_advanced = True
			if config.usage.setup_level.index >= 2: # expert
				name = self.nim.description
				if name == "Alps BSBE2":
					self.list.append(getConfigListEntry(_("Tone Amplitude"), self.nimConfig.toneAmplitude))
				if self.nimConfig.scpcSearchRange.fe_id is not None and configMode != "nothing":
					self.list.append(getConfigListEntry(_("SCPC optimized search range"), self.nimConfig.scpcSearchRange))

		elif curType.startswith("DVB-C"):
			self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.cable.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.cable.configMode.value == "enabled":
				if not self.nim.description.startswith("Si2169"):
					self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
					self.list.append(self.cableScanType)
					if self.nimConfig.cable.scan_type.value == "provider":
						self.list.append(getConfigListEntry(_("Provider to scan"), self.nimConfig.cable.scan_provider))
					else:
						if self.nimConfig.cable.scan_type.value == "bands":
							self.list.append(getConfigListEntry(_("Scan band EU VHF I"), self.nimConfig.cable.scan_band_EU_VHF_I))
							self.list.append(getConfigListEntry(_("Scan band EU MID"), self.nimConfig.cable.scan_band_EU_MID))
							self.list.append(getConfigListEntry(_("Scan band EU VHF III"), self.nimConfig.cable.scan_band_EU_VHF_III))
							self.list.append(getConfigListEntry(_("Scan band EU UHF IV"), self.nimConfig.cable.scan_band_EU_UHF_IV))
							self.list.append(getConfigListEntry(_("Scan band EU UHF V"), self.nimConfig.cable.scan_band_EU_UHF_V))
							self.list.append(getConfigListEntry(_("Scan band EU SUPER"), self.nimConfig.cable.scan_band_EU_SUPER))
							self.list.append(getConfigListEntry(_("Scan band EU HYPER"), self.nimConfig.cable.scan_band_EU_HYPER))
							self.list.append(getConfigListEntry(_("Scan band US LOW"), self.nimConfig.cable.scan_band_US_LOW))
							self.list.append(getConfigListEntry(_("Scan band US MID"), self.nimConfig.cable.scan_band_US_MID))
							self.list.append(getConfigListEntry(_("Scan band US HIGH"), self.nimConfig.cable.scan_band_US_HIGH))
							self.list.append(getConfigListEntry(_("Scan band US SUPER"), self.nimConfig.cable.scan_band_US_SUPER))
							self.list.append(getConfigListEntry(_("Scan band US HYPER"), self.nimConfig.cable.scan_band_US_HYPER))
							self.list.append(getConfigListEntry(_("Scan band US JUMBO"), self.nimConfig.cable.scan_band_US_JUMBO))
							self.list.append(getConfigListEntry(_("Scan band US ULTRA"), self.nimConfig.cable.scan_band_US_ULTRA))
						elif self.nimConfig.cable.scan_type.value == "steps":
							self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
						if self.nim.description != "ATBM781x":
							self.list.append(getConfigListEntry(_("Scan QAM16"), self.nimConfig.cable.scan_mod_qam16))
							self.list.append(getConfigListEntry(_("Scan QAM32"), self.nimConfig.cable.scan_mod_qam32))
							self.list.append(getConfigListEntry(_("Scan QAM64"), self.nimConfig.cable.scan_mod_qam64))
							self.list.append(getConfigListEntry(_("Scan QAM128"), self.nimConfig.cable.scan_mod_qam128))
							self.list.append(getConfigListEntry(_("Scan QAM256"), self.nimConfig.cable.scan_mod_qam256))
							self.list.append(getConfigListEntry(_("Scan SR6900"), self.nimConfig.cable.scan_sr_6900))
							self.list.append(getConfigListEntry(_("Scan SR6875"), self.nimConfig.cable.scan_sr_6875))
							self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
							self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
			self.have_advanced = False
		elif curType.startswith("DVB-T"):
			self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.terrest.configMode)
			self.list.append(self.configMode)
			self.have_advanced = False
			if self.nimConfig.terrest.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrest.provider))
				self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrest.use5V))
		else:
			self.have_advanced = False
		self["config"].list = self.list
		self["config"].l.setList(self.list)
Beispiel #6
0
	def fillListWithAdvancedSatEntrys(self, Sat):
		lnbnum = int(Sat.lnb.value)
		currLnb = self.nimConfig.advanced.lnb[lnbnum]

		if isinstance(currLnb, ConfigNothing):
			currLnb = None

		# LNBs
		self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
		self.list.append(self.advancedLnbsEntry)

		if currLnb:
			self.list.append(getConfigListEntry(_("Priority"), currLnb.prio))
			self.advancedLof = getConfigListEntry(_("Type"), currLnb.lof)
			self.list.append(self.advancedLof)
			if currLnb.lof.value == "user_defined":
				self.list.append(getConfigListEntry(_("LOF/L"), currLnb.lofl))
				self.list.append(getConfigListEntry(_("LOF/H"), currLnb.lofh))
				self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
#			self.list.append(getConfigListEntry(_("12V Output"), currLnb.output_12v))

			if currLnb.lof.value == "unicable":
				self.advancedUnicable = getConfigListEntry("Unicable "+_("Configuration Mode"), currLnb.unicable)
				self.list.append(self.advancedUnicable)
				if currLnb.unicable.value == "unicable_user":
					product_name = "unicable_user"
					self._checkUnicableLofUpdateRequired(currLnb, self._lastUnicableManufacturerName, product_name)
					self._lastUnicableProductName = product_name

					self.list.append(getConfigListEntry(_("Mode"), currLnb.satcruser_mode))
					self.advancedSCR = getConfigListEntry(_("Channel"), currLnb.satcruser)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), currLnb.satcrvcouser[currLnb.satcruser.index]))
					self.list.append(getConfigListEntry(_("LOF/L"), currLnb.lofl))
					self.list.append(getConfigListEntry(_("LOF/H"), currLnb.lofh))
					self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
				elif currLnb.unicable.value == "unicable_matrix":
					try:
						manufacturer_name = currLnb.unicableMatrix.manufacturer.value
						product_name = currLnb.unicableMatrix.product.value
					except:
						manufacturer_name = product_name = "unicable_matrix"

					self._checkUnicableLofUpdateRequired(currLnb, manufacturer_name, product_name)
					self._lastUnicableManufacturerName = manufacturer_name
					self._lastUnicableProductName = product_name

					matrixConfig = currLnb.unicableMatrix
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), matrixConfig.manufacturer)
					self.advancedType = getConfigListEntry(_("Type"), matrixConfig.product)
					self.list.append(self.advancedManufacturer)
					self.list.append(self.advancedType)
					if isinstance(matrixConfig.scrs, ConfigNothing):
						self.advancedSCR = getConfigListEntry(_("Channel"), matrixConfig.scr)
						self.list.append(self.advancedSCR)
						self.list.append(getConfigListEntry(_("Frequency"), matrixConfig.vco[matrixConfig.scr.index]))
					else:
						self.list.append(getConfigListEntry(_("Usable SCRs"), matrixConfig.scrs))
				elif currLnb.unicable.value == "unicable_lnb":
					try:
						product_name = currLnb.unicableLnb.product.value
						manufacturer_name = currLnb.unicableLnb.manufacturer.value
					except:
						manufacturer_name = product_name = "unicable_lnb"
					self._checkUnicableLofUpdateRequired(currLnb, manufacturer_name, product_name)
					self._lastUnicableManufacturerName = manufacturer_name
					self._lastUnicableProductName = product_name

					lnbConfig = currLnb.unicableLnb
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), lnbConfig.manufacturer)
					self.advancedType = getConfigListEntry(_("Type"), lnbConfig.product)
					self.list.append(self.advancedManufacturer)
					self.list.append(self.advancedType)
					if isinstance(lnbConfig.scrs, ConfigNothing):
						self.advancedSCR = getConfigListEntry(_("Channel"), lnbConfig.scr)
						self.list.append(self.advancedSCR)
						self.list.append(getConfigListEntry(_("Frequency"), lnbConfig.vco[lnbConfig.scr.index]))
					else:
						self.list.append(getConfigListEntry(_("Usable SCRs"), lnbConfig.scrs))
				self.unicableUsePinEntry = getConfigListEntry(_("Use PIN"), currLnb.unicable_use_pin)
				self.list.append(self.unicableUsePinEntry)
				if currLnb.unicable_use_pin.value: 
					self.list.append(getConfigListEntry(_("PIN"), currLnb.unicable_pin))

				choices = []
				connectable = nimmanager.canConnectTo(self.slotid)
				for id, type in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				if len(choices):
					self.advancedConnected = getConfigListEntry(_("connected"), self.nimConfig.advanced.unicableconnected)
					self.list.append(self.advancedConnected)
					if self.nimConfig.advanced.unicableconnected.value == True:
						self.nimConfig.advanced.unicableconnectedTo.setChoices(choices)
						self.list.append(getConfigListEntry(_("Connected to"),self.nimConfig.advanced.unicableconnectedTo))
				if lnbnum >= 33:
					choices = []
					dependable = nimmanager.canDependOn(self.slotid)
					for id, type in dependable:
						choices.append((str(id), nimmanager.getNimDescription(id)))
					if len(choices):
						self.advancedDepends = getConfigListEntry(_("Positioner depends"), self.nimConfig.advanced.unicabledepends)
						self.list.append(self.advancedDepends)
						if self.nimConfig.advanced.unicabledepends.value == True:
							self.nimConfig.advanced.unicabledependsOn.setChoices(choices)
							self.list.append(getConfigListEntry(_("Depends on"),self.nimConfig.advanced.unicabledependsOn))
			else:	#kein Unicable
				self.list.append(getConfigListEntry(_("Voltage mode"), Sat.voltage))
				self.list.append(getConfigListEntry(_("Tone mode"), Sat.tonemode))

			self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage))

			if lnbnum < 33:
				self.advancedDiseqcMode = getConfigListEntry(_("DiSEqC mode"), currLnb.diseqcMode)
				self.list.append(self.advancedDiseqcMode)
			if currLnb.diseqcMode.value != "none":
				self.list.append(getConfigListEntry(_("Toneburst"), currLnb.toneburst))
				self.list.append(getConfigListEntry(_("Committed DiSEqC command"), currLnb.commitedDiseqcCommand))
				self.list.append(getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
				self.list.append(getConfigListEntry(_("Sequence repeat"), currLnb.sequenceRepeat))
				if currLnb.diseqcMode.value == "1_0":
					self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
				else:
					if currLnb.uncommittedDiseqcCommand.index:
						if currLnb.commandOrder.value == "ct":
							currLnb.commandOrder.value = "cut"
						elif currLnb.commandOrder.value == "tc":
							currLnb.commandOrder.value = "tcu"
					else:
						if currLnb.commandOrder.index & 1:
							currLnb.commandOrder.value = "tc"
						else:
							currLnb.commandOrder.value = "ct"
					self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder))
					self.uncommittedDiseqcCommand = getConfigListEntry(_("Uncommitted DiSEqC command"), currLnb.uncommittedDiseqcCommand)
					self.list.append(self.uncommittedDiseqcCommand)
					self.list.append(getConfigListEntry(_("DiSEqC repeats"), currLnb.diseqcRepeats))
				if currLnb.diseqcMode.value == "1_2" and (not self.advancedDepends or not self.nimConfig.advanced.unicabledepends.value):
					self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))
					self.list.append(getConfigListEntry(" ", currLnb.longitudeOrientation))
					self.list.append(getConfigListEntry(_("Latitude"), currLnb.latitude))
					self.list.append(getConfigListEntry(" ", currLnb.latitudeOrientation))
					if SystemInfo["CanMeasureFrontendInputPower"] & (1 << self.slotid):
						self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), currLnb.powerMeasurement)
						self.list.append(self.advancedPowerMeasurement)
						if currLnb.powerMeasurement.value:
							self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
							self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
							self.list.append(self.turningSpeed)
							if currLnb.turningSpeed.value == "fast epoch":
								self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
								self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
								self.list.append(self.turnFastEpochBegin)
								self.list.append(self.turnFastEpochEnd)
					else:
						if currLnb.powerMeasurement.value:
							currLnb.powerMeasurement.value = False
							currLnb.powerMeasurement.save()
					if not currLnb.powerMeasurement.value:
						self.list.append(getConfigListEntry(_("Rotor speed in degree per second"), currLnb.degreePerSecond))
					self.advancedUsalsEntry = getConfigListEntry(_("Use usals for this sat"), Sat.usals)
					self.list.append(self.advancedUsalsEntry)
					if not Sat.usals.value:
						self.list.append(getConfigListEntry(_("Stored position"), Sat.rotorposition))
					if config.usage.setup_level.index >= 2: # expert
						self.list.append(getConfigListEntry(_("Rotor is exclusively controlled by this dreambox"), self.nimConfig.positionerExclusively))
Beispiel #7
0
	def createSetup(self):
		self.list = [ ]

		self.multiType = None
		self.configMode = None
		self.diseqcModeEntry = None
		self.advancedSatsEntry = None
		self.advancedLnbsEntry = None
		self.advancedDiseqcMode = None
		self.advancedUsalsEntry = None
		self.advancedLof = None
		self.advancedPowerMeasurement = None
		self.turningSpeed = None
		self.turnFastEpochBegin = None
		self.turnFastEpochEnd = None
		self.toneburst = None
		self.committedDiseqcCommand = None
		self.uncommittedDiseqcCommand = None
		self.commandOrder = None
		self.cableScanType = None
		self.cableConfigScanDetails = None
		self.have_advanced = False
		self.advancedUnicable = None
		self.advancedFormat = None
		self.advancedPosition = None
		self.advancedType = None
		self.advancedManufacturer = None
		self.advancedSCR = None
		self.advancedConnected = None
		self.showAdditionalMotorOptions = None
		self.selectSatsEntry = None
		self.advancedSelectSatsEntry = None
		self.singleSatEntry = None
		self.terrestrialRegionsEntry = None
		self.cableRegionsEntry = None

		if not hasattr(self, "terrestrialCountriesEntry"):
			self.terrestrialCountriesEntry = None

		if not hasattr(self, "cableCountriesEntry"):
			self.cableCountriesEntry = None

		self.toneamplitude = None
		self.scpc = None
		self.forcelnbpower = None
		self.forcetoneburst = None

		if self.nim.isMultiType():
			multiType = self.nimConfig.multiType
			self.multiType = getConfigListEntry(_("Tuner type"), multiType)
			self.list.append(self.multiType)

		if self.nim.isCompatible("DVB-S"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)

			if self.nimConfig.configMode.value == "simple":			#simple setup
				self.diseqcModeEntry = getConfigListEntry(pgettext("Satellite configuration mode", "Mode"), self.nimConfig.diseqcMode)
				self.list.append(self.diseqcModeEntry)
				if self.nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
					self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
				if self.nimConfig.diseqcMode.value in ("positioner", "positioner_select"):
					self.createPositionerSetup(self.list)
			elif self.nimConfig.configMode.value == "equal":
				choices = []
				nimlist = nimmanager.canEqualTo(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "satposdepends":
				choices = []
				nimlist = nimmanager.canDependOn(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "loopthrough_internal":
				choices = []
				print "internal connectable to:", nimmanager.canInternalConnectTo(self.slotid)
				connectable = nimmanager.canInternalConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Internal connected to"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "loopthrough_external":
				choices = []
				print "external connectable to:", nimmanager.canExternalConnectTo(self.slotid)
				connectable = nimmanager.canExternalConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("External connected to"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "nothing":
				pass
			elif self.nimConfig.configMode.value == "advanced": # advanced
				# SATs
				self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
				self.list.append(self.advancedSatsEntry)
				current_config_sats = self.nimConfig.advanced.sats.value
				if current_config_sats in ("3605", "3606"):
					self.advancedSelectSatsEntry = getConfigListEntry(_("Press OK to select satellites"), self.nimConfig.pressOKtoList)
					self.list.append(self.advancedSelectSatsEntry)
					self.fillListWithAdvancedSatEntrys(self.nimConfig.advanced.sat[int(current_config_sats)])
				else:
					cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
					satlist = self.nimConfig.advanced.sat.keys()
					if cur_orb_pos is not None:
						if cur_orb_pos not in satlist:
							cur_orb_pos = satlist[0]
						self.fillListWithAdvancedSatEntrys(self.nimConfig.advanced.sat[cur_orb_pos])
				self.have_advanced = True
			if self.nimConfig.configMode.value != "nothing" and config.usage.setup_level.index >= 2:
				if fileExists("/proc/stb/frontend/%d/tone_amplitude" % self.nim.slot):
					self.toneamplitude = getConfigListEntry(_("Tone amplitude"), self.nimConfig.toneAmplitude)
					self.list.append(self.toneamplitude)
				if fileExists("/proc/stb/frontend/%d/use_scpc_optimized_search_range" % self.nim.slot):
					self.scpc = getConfigListEntry(_("SCPC optimized search range"), self.nimConfig.scpcSearchRange)
					self.list.append(self.scpc)
				if SystemInfo["HasForceLNBOn"] and self.nim.isFBCRoot():
					self.forcelnbpower = getConfigListEntry(_("Force LNB Power"), config.misc.forceLnbPower)
					self.list.append(self.forcelnbpower)
				if SystemInfo["HasForceToneburst"] and self.nim.isFBCRoot():
					self.forcetoneburst = getConfigListEntry(_("Force ToneBurst"), config.misc.forceToneBurst)
					self.list.append(self.forcetoneburst)
		elif self.nim.isCompatible("DVB-C"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Network ID"), self.nimConfig.cable.scan_networkid))
				self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
				self.list.append(self.cableScanType)
				if self.nimConfig.cable.scan_type.value == "provider":
					# country/region tier one
					if self.cableCountriesEntry is None:
						cablecountrycodelist = nimmanager.getCablesCountrycodeList()
						cablecountrycode = nimmanager.getCableCountrycode(self.slotid)
						default = cablecountrycode in cablecountrycodelist and cablecountrycode or None
						choices = [("all", _("All"))]+sorted([(x, self.countrycodeToCountry(x)) for x in cablecountrycodelist], key=lambda listItem: listItem[1])
						self.cableCountries = ConfigSelection(default = default, choices = choices)
						self.cableCountriesEntry = getConfigListEntry("Country", self.cableCountries)
						self.originalCableRegion = self.nimConfig.cable.scan_provider.value
					# country/region tier two
					if self.cableCountries.value == "all":
						cableNames = [x[0] for x in sorted(sorted(nimmanager.getCablesList(), key=lambda listItem: listItem[0]), key=lambda listItem: self.countrycodeToCountry(listItem[2]))]
					else:
						cableNames = sorted([x[0] for x in nimmanager.getCablesByCountrycode(self.cableCountries.value)])
					default = self.nimConfig.cable.scan_provider.value in cableNames and self.nimConfig.cable.scan_provider.value or None
					self.cableRegions = ConfigSelection(default = default, choices = cableNames)
					def updateCableProvider(configEntry, extra_args):
						extra_args[0].value = configEntry.value
						extra_args[0].save()
					self.cableRegions.addNotifier(updateCableProvider, extra_args = [self.nimConfig.cable.scan_provider])
					self.cableRegionsEntry = getConfigListEntry("Region", self.cableRegions)
					self.list.append(self.cableCountriesEntry)
					self.list.append(self.cableRegionsEntry)
				else:
					self.cableConfigScanDetails = getConfigListEntry(_("Config Scan Details"), self.nimConfig.cable.config_scan_details)
					self.list.append(self.cableConfigScanDetails)
					if self.nimConfig.cable.config_scan_details.value:
						if self.nimConfig.cable.scan_type.value == "bands":
							# TRANSLATORS: option name, indicating which type of (DVB-C) band should be scanned. The name of the band is printed in '%s'. E.g.: 'Scan EU MID band'
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU VHF I"), self.nimConfig.cable.scan_band_EU_VHF_I))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU MID"), self.nimConfig.cable.scan_band_EU_MID))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU VHF III"), self.nimConfig.cable.scan_band_EU_VHF_III))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU UHF IV"), self.nimConfig.cable.scan_band_EU_UHF_IV))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU UHF V"), self.nimConfig.cable.scan_band_EU_UHF_V))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU SUPER"), self.nimConfig.cable.scan_band_EU_SUPER))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU HYPER"), self.nimConfig.cable.scan_band_EU_HYPER))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US LOW"), self.nimConfig.cable.scan_band_US_LOW))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US MID"), self.nimConfig.cable.scan_band_US_MID))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US HIGH"), self.nimConfig.cable.scan_band_US_HIGH))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US SUPER"), self.nimConfig.cable.scan_band_US_SUPER))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US HYPER"), self.nimConfig.cable.scan_band_US_HYPER))
						else:
							self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
						# TRANSLATORS: option name, indicating which type of (DVB-C) modulation should be scanned. The modulation type is printed in '%s'. E.g.: 'Scan QAM16'
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM16"), self.nimConfig.cable.scan_mod_qam16))
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM32"), self.nimConfig.cable.scan_mod_qam32))
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM64"), self.nimConfig.cable.scan_mod_qam64))
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM128"), self.nimConfig.cable.scan_mod_qam128))
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM256"), self.nimConfig.cable.scan_mod_qam256))
						self.list.append(getConfigListEntry(_("Scan %s") % ("SR6900"), self.nimConfig.cable.scan_sr_6900))
						self.list.append(getConfigListEntry(_("Scan %s") % ("SR6875"), self.nimConfig.cable.scan_sr_6875))
						self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
						self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
			self.have_advanced = False
		elif self.nim.isCompatible("DVB-T"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			self.have_advanced = False
			if self.nimConfig.configMode.value == "enabled":
				# country/region tier one
				if self.terrestrialCountriesEntry is None:
					terrestrialcountrycodelist = nimmanager.getTerrestrialsCountrycodeList()
					terrestrialcountrycode = nimmanager.getTerrestrialCountrycode(self.slotid)
					default = terrestrialcountrycode in terrestrialcountrycodelist and terrestrialcountrycode or None
					choices = [("all", _("All"))]+sorted([(x, self.countrycodeToCountry(x)) for x in terrestrialcountrycodelist], key=lambda listItem: listItem[1])
					self.terrestrialCountries = ConfigSelection(default = default, choices = choices)
					self.terrestrialCountriesEntry = getConfigListEntry("Country", self.terrestrialCountries)
					self.originalTerrestrialRegion = self.nimConfig.terrestrial.value
				# country/region tier two
				if self.terrestrialCountries.value == "all":
					terrestrialNames = [x[0] for x in sorted(sorted(nimmanager.getTerrestrialsList(), key=lambda listItem: listItem[0]), key=lambda listItem: self.countrycodeToCountry(listItem[2]))]
				else:
					terrestrialNames = sorted([x[0] for x in nimmanager.getTerrestrialsByCountrycode(self.terrestrialCountries.value)])
				default = self.nimConfig.terrestrial.value in terrestrialNames and self.nimConfig.terrestrial.value or None
				self.terrestrialRegions = ConfigSelection(default = default, choices = terrestrialNames)
				def updateTerrestrialProvider(configEntry, extra_args):
					extra_args[0].value = configEntry.value
					extra_args[0].save()
				self.terrestrialRegions.addNotifier(updateTerrestrialProvider, extra_args = [self.nimConfig.terrestrial])
				self.terrestrialRegionsEntry = getConfigListEntry("Region", self.terrestrialRegions)
				self.list.append(self.terrestrialCountriesEntry)
				self.list.append(self.terrestrialRegionsEntry)
				self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrestrial_5V))
		elif self.nim.isCompatible("ATSC"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("ATSC provider"), self.nimConfig.atsc))
			self.have_advanced = False
		else:
			self.have_advanced = False
		self["config"].list = self.list
		self["config"].l.setList(self.list)
		self.setTextKeyYellow()
Beispiel #8
0
	def fillListWithAdvancedSatEntrys(self, Sat):
		lnbnum = int(Sat.lnb.value)
		currLnb = self.nimConfig.advanced.lnb[lnbnum]
		diction = None
		if isinstance(currLnb, ConfigNothing):
			currLnb = None

		# LNBs
		self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
		self.list.append(self.advancedLnbsEntry)

		if currLnb:
			if isFBCLink(self.nim):
				if currLnb.lof.value != "unicable":
					currLnb.lof.value = "unicable"
			self.list.append(getConfigListEntry(_("Priority"), currLnb.prio))
			self.advancedLof = getConfigListEntry("LOF", currLnb.lof)
			self.list.append(self.advancedLof)
			if currLnb.lof.value == "user_defined":
				self.list.append(getConfigListEntry("LOF/L", currLnb.lofl))
				self.list.append(getConfigListEntry("LOF/H", currLnb.lofh))
				self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))

			if currLnb.lof.value == "unicable":
				self.advancedUnicable = getConfigListEntry("Unicable "+_("Configuration mode"), currLnb.unicable)
				self.list.append(self.advancedUnicable)
				if currLnb.unicable.value == "unicable_user":
					self.advancedDiction = getConfigListEntry(_("Diction"), currLnb.dictionuser)
					self.list.append(self.advancedDiction)
					if currLnb.dictionuser.value == "EN50494":
						satcr = currLnb.satcruserEN50494
						stcrvco = currLnb.satcrvcouserEN50494[currLnb.satcruserEN50494.index]
					elif currLnb.dictionuser.value == "EN50607":
						satcr = currLnb.satcruserEN50607
						stcrvco = currLnb.satcrvcouserEN50607[currLnb.satcruserEN50607.index]
					self.advancedSCR = getConfigListEntry(_("Channel"), satcr)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), stcrvco))
					self.list.append(getConfigListEntry("LOF/L", currLnb.lofl))
					self.list.append(getConfigListEntry("LOF/H", currLnb.lofh))
					self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
				elif currLnb.unicable.value == "unicable_matrix":
					nimmanager.sec.reconstructUnicableDate(currLnb.unicableMatrixManufacturer, currLnb.unicableMatrix, currLnb)
					manufacturer_name = currLnb.unicableMatrixManufacturer.value
					manufacturer = currLnb.unicableMatrix[manufacturer_name]
					product_name = manufacturer.product.value
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableMatrixManufacturer)
					self.list.append(self.advancedManufacturer)
					if product_name in manufacturer.scr:
						diction = manufacturer.diction[product_name].value
						self.advancedType = getConfigListEntry(_("Type"), manufacturer.product)
						self.advancedSCR = getConfigListEntry(_("Channel"), manufacturer.scr[product_name])
						self.list.append(self.advancedType)
						self.list.append(self.advancedSCR)
						self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))
				elif currLnb.unicable.value == "unicable_lnb":
					nimmanager.sec.reconstructUnicableDate(currLnb.unicableLnbManufacturer, currLnb.unicableLnb, currLnb)
					manufacturer_name = currLnb.unicableLnbManufacturer.value
					manufacturer = currLnb.unicableLnb[manufacturer_name]
					product_name = manufacturer.product.value
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableLnbManufacturer)
					self.list.append(self.advancedManufacturer)
					if product_name in manufacturer.scr:
						diction = manufacturer.diction[product_name].value
						self.advancedType = getConfigListEntry(_("Type"), manufacturer.product)
						self.advancedSCR = getConfigListEntry(_("Channel"), manufacturer.scr[product_name])
						self.list.append(self.advancedType)
						self.list.append(self.advancedSCR)
						self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))

				choices = []
				connectable = nimmanager.canConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				if len(choices):
					if isFBCLink(self.nim):
						if self.nimConfig.advanced.unicableconnected.value != True:
							self.nimConfig.advanced.unicableconnected.value = True
					self.advancedConnected = getConfigListEntry(_("connected"), self.nimConfig.advanced.unicableconnected)
					self.list.append(self.advancedConnected)
					if self.nimConfig.advanced.unicableconnected.value:
						self.nimConfig.advanced.unicableconnectedTo.setChoices(choices)
						self.list.append(getConfigListEntry(_("Connected to"),self.nimConfig.advanced.unicableconnectedTo))

			else:	#kein Unicable
				self.list.append(getConfigListEntry(_("Voltage mode"), Sat.voltage))
				self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage))
				self.list.append(getConfigListEntry(_("Tone mode"), Sat.tonemode))

			if lnbnum < 65 and diction !="EN50607":
				self.advancedDiseqcMode = getConfigListEntry(_("DiSEqC mode"), currLnb.diseqcMode)
				self.list.append(self.advancedDiseqcMode)
			if currLnb.diseqcMode.value != "none":
				self.list.append(getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
				self.toneburst = getConfigListEntry(_("Toneburst"), currLnb.toneburst)
				self.list.append(self.toneburst)
				self.committedDiseqcCommand = getConfigListEntry(_("DiSEqC 1.0 command"), currLnb.commitedDiseqcCommand)
				self.list.append(self.committedDiseqcCommand)

				if currLnb.diseqcMode.value == "1_0":
					if currLnb.toneburst.index and currLnb.commitedDiseqcCommand.index:
						self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
				else:
					self.uncommittedDiseqcCommand = getConfigListEntry(_("DiSEqC 1.1 command"), currLnb.uncommittedDiseqcCommand)
					self.list.append(self.uncommittedDiseqcCommand)
					if currLnb.uncommittedDiseqcCommand.index:
						if currLnb.commandOrder.value == "ct":
							currLnb.commandOrder.value = "cut"
						elif currLnb.commandOrder.value == "tc":
							currLnb.commandOrder.value = "tcu"
					else:
						if currLnb.commandOrder.index & 1:
							currLnb.commandOrder.value = "tc"
						else:
							currLnb.commandOrder.value = "ct"
					self.commandOrder = getConfigListEntry(_("Command order"), currLnb.commandOrder)
					if 1 < ((1 if currLnb.uncommittedDiseqcCommand.index else 0) + (1 if currLnb.commitedDiseqcCommand.index else 0) + (1 if currLnb.toneburst.index else 0)):
						self.list.append(self.commandOrder)
					if currLnb.uncommittedDiseqcCommand.index:
						self.list.append(getConfigListEntry(_("DiSEqC 1.1 repeats"), currLnb.diseqcRepeats))
				self.list.append(getConfigListEntry(_("Sequence repeat"), currLnb.sequenceRepeat))
				if currLnb.diseqcMode.value == "1_2":
					if SystemInfo["CanMeasureFrontendInputPower"]:
						self.advancedPowerMeasurement = getConfigListEntry(_("Use power measurement"), currLnb.powerMeasurement)
						self.list.append(self.advancedPowerMeasurement)
						if currLnb.powerMeasurement.value:
							self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
							self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
							self.list.append(self.turningSpeed)
							if currLnb.turningSpeed.value == "fast epoch":
								self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
								self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
								self.list.append(self.turnFastEpochBegin)
								self.list.append(self.turnFastEpochEnd)
					else:
						if currLnb.powerMeasurement.value:
							currLnb.powerMeasurement.value = False
							currLnb.powerMeasurement.save()
					self.advancedUsalsEntry = getConfigListEntry(_("Use USALS for this sat"), Sat.usals)
					if lnbnum < 65:
						self.list.append(self.advancedUsalsEntry)
					if Sat.usals.value:
						self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))
						self.list.append(getConfigListEntry(" ", currLnb.longitudeOrientation))
						self.list.append(getConfigListEntry(_("Latitude"), currLnb.latitude))
						self.list.append(getConfigListEntry(" ", currLnb.latitudeOrientation))
					else:
						self.list.append(getConfigListEntry(_("Stored position"), Sat.rotorposition))
					if not hasattr(self, 'additionalMotorOptions'):
						self.additionalMotorOptions = ConfigYesNo(False)
					self.showAdditionalMotorOptions = getConfigListEntry(_("Extra motor options"), self.additionalMotorOptions)
					self.list.append(self.showAdditionalMotorOptions)
					if self.additionalMotorOptions.value:
						self.list.append(getConfigListEntry("   " + _("Horizontal turning speed") + " [" + chr(176) + "/sec]", currLnb.turningspeedH))
						self.list.append(getConfigListEntry("   " + _("Vertical turning speed") + " [" + chr(176) + "/sec]", currLnb.turningspeedV))
						self.list.append(getConfigListEntry("   " + _("Turning step size") + " [" + chr(176) + "]", currLnb.tuningstepsize))
						self.list.append(getConfigListEntry("   " + _("Max memory positions"), currLnb.rotorPositions))
Beispiel #9
0
	def createSetup(self):
		self.list = [ ]

		self.multiType = None
		self.configMode = None
		self.diseqcModeEntry = None
		self.advancedSatsEntry = None
		self.advancedLnbsEntry = None
		self.advancedDiseqcMode = None
		self.advancedUsalsEntry = None
		self.advancedLof = None
		self.advancedPowerMeasurement = None
		self.turningSpeed = None
		self.turnFastEpochBegin = None
		self.turnFastEpochEnd = None
		self.toneburst = None
		self.committedDiseqcCommand = None
		self.uncommittedDiseqcCommand = None
		self.commandOrder = None
		self.cableScanType = None
		self.cableConfigScanDetails = None
		self.have_advanced = False
		self.advancedUnicable = None
		self.advancedFormat = None
		self.advancedPosition = None
		self.advancedType = None
		self.advancedManufacturer = None
		self.advancedSCR = None
		self.advancedConnected = None
		self.showAdditionalMotorOptions = None
		self.selectSatsEntry = None
		self.advancedSelectSatsEntry = None
		self.singleSatEntry = None
		self.terrestrialRegionsEntry = None
		self.cableRegionsEntry = None

		if not hasattr(self, "terrestrialCountriesEntry"):
			self.terrestrialCountriesEntry = None

		if not hasattr(self, "cableCountriesEntry"):
			self.cableCountriesEntry = None

		self.toneamplitude = None
		self.scpc = None
		self.forcelnbpower = None
		self.forcetoneburst = None
		self.terrestrialRegionsEntry = None
		self.cableRegionsEntry = None
		
		if not hasattr(self, "terrestrialCountriesEntry"):
			self.terrestrialCountriesEntry = None
		if not hasattr(self, "cableCountriesEntry"):
			self.cableCountriesEntry = None

		if self.nim.isMultiType():
			multiType = self.nimConfig.multiType
			self.multiType = getConfigListEntry(_("Tuner type"), multiType)
			self.list.append(self.multiType)

		if self.nim.isCompatible("DVB-S"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)

			if self.nimConfig.configMode.value == "simple":			#simple setup
				self.diseqcModeEntry = getConfigListEntry(pgettext("Satellite configuration mode", "Mode"), self.nimConfig.diseqcMode)
				self.list.append(self.diseqcModeEntry)
				if self.nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
					self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
				if self.nimConfig.diseqcMode.value in ("positioner", "positioner_select"):
					self.createPositionerSetup(self.list)
			elif self.nimConfig.configMode.value == "equal":
				choices = []
				nimlist = nimmanager.canEqualTo(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "satposdepends":
				choices = []
				nimlist = nimmanager.canDependOn(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "loopthrough_internal":
				choices = []
				print "internal connectable to:", nimmanager.canInternalConnectTo(self.slotid)
				connectable = nimmanager.canInternalConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Internal connected to"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "loopthrough_external":
				choices = []
				print "external connectable to:", nimmanager.canExternalConnectTo(self.slotid)
				connectable = nimmanager.canExternalConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("External connected to"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "nothing":
				pass
			elif self.nimConfig.configMode.value == "advanced": # advanced
				# SATs
				self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
				self.list.append(self.advancedSatsEntry)
				current_config_sats = self.nimConfig.advanced.sats.value
				if current_config_sats in ("3605", "3606"):
					self.advancedSelectSatsEntry = getConfigListEntry(_("Press OK to select satellites"), self.nimConfig.pressOKtoList)
					self.list.append(self.advancedSelectSatsEntry)
					self.fillListWithAdvancedSatEntrys(self.nimConfig.advanced.sat[int(current_config_sats)])
				else:
					cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
					satlist = self.nimConfig.advanced.sat.keys()
					if cur_orb_pos is not None:
						if cur_orb_pos not in satlist:
							cur_orb_pos = satlist[0]
						self.fillListWithAdvancedSatEntrys(self.nimConfig.advanced.sat[cur_orb_pos])
				self.have_advanced = True
			if self.nimConfig.configMode.value != "nothing" and config.usage.setup_level.index >= 2:
				if fileExists("/proc/stb/frontend/%d/tone_amplitude" % self.nim.slot):
					self.toneamplitude = getConfigListEntry(_("Tone amplitude"), self.nimConfig.toneAmplitude)
					self.list.append(self.toneamplitude)
				if fileExists("/proc/stb/frontend/%d/use_scpc_optimized_search_range" % self.nim.slot):
					self.scpc = getConfigListEntry(_("SCPC optimized search range"), self.nimConfig.scpcSearchRange)
					self.list.append(self.scpc)
				if SystemInfo["HasForceLNBOn"] and self.nim.isFBCRoot():
					self.forcelnbpower = getConfigListEntry(_("Force LNB Power"), config.misc.forceLnbPower)
					self.list.append(self.forcelnbpower)
				if SystemInfo["HasForceToneburst"] and self.nim.isFBCRoot():
					self.forcetoneburst = getConfigListEntry(_("Force ToneBurst"), config.misc.forceToneBurst)
					self.list.append(self.forcetoneburst)
		elif self.nim.isCompatible("DVB-C"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Network ID"), self.nimConfig.cable.scan_networkid))
				self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
				self.list.append(self.cableScanType)
				if self.nimConfig.cable.scan_type.value == "provider":
					# country/region tier one
					if self.cableCountriesEntry is None:
						cablecountrycodelist = nimmanager.getCablesCountrycodeList()
						cablecountrycode = nimmanager.getCableCountrycode(self.slotid)
						default = cablecountrycode in cablecountrycodelist and cablecountrycode or None
						choices = [("all", _("All"))]+sorted([(x, self.countrycodeToCountry(x)) for x in cablecountrycodelist], key=lambda listItem: listItem[1])
						self.cableCountries = ConfigSelection(default = default, choices = choices)
						self.cableCountriesEntry = getConfigListEntry(_("Country"), self.cableCountries)
						self.originalCableRegion = self.nimConfig.cable.scan_provider.value
					# country/region tier two
					if self.cableCountries.value == "all":
						cableNames = [x[0] for x in sorted(sorted(nimmanager.getCablesList(), key=lambda listItem: listItem[0]), key=lambda listItem: self.countrycodeToCountry(listItem[2]))]
					else:
						cableNames = sorted([x[0] for x in nimmanager.getCablesByCountrycode(self.cableCountries.value)])
					default = self.nimConfig.cable.scan_provider.value in cableNames and self.nimConfig.cable.scan_provider.value or None
					self.cableRegions = ConfigSelection(default = default, choices = cableNames)
					def updateCableProvider(configEntry):
						self.nimConfig.cable.scan_provider.value = configEntry.value
						self.nimConfig.cable.scan_provider.save()
					self.cableRegions.addNotifier(updateCableProvider)
					self.cableRegionsEntry = getConfigListEntry(_("Region"), self.cableRegions)
					self.list.append(self.cableCountriesEntry)
					self.list.append(self.cableRegionsEntry)
				else:
					self.cableConfigScanDetails = getConfigListEntry(_("Config Scan Details"), self.nimConfig.cable.config_scan_details)
					self.list.append(self.cableConfigScanDetails)
					if self.nimConfig.cable.config_scan_details.value:
						if self.nimConfig.cable.scan_type.value == "bands":
							# TRANSLATORS: option name, indicating which type of (DVB-C) band should be scanned. The name of the band is printed in '%s'. E.g.: 'Scan EU MID band'
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU VHF I"), self.nimConfig.cable.scan_band_EU_VHF_I))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU MID"), self.nimConfig.cable.scan_band_EU_MID))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU VHF III"), self.nimConfig.cable.scan_band_EU_VHF_III))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU UHF IV"), self.nimConfig.cable.scan_band_EU_UHF_IV))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU UHF V"), self.nimConfig.cable.scan_band_EU_UHF_V))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU SUPER"), self.nimConfig.cable.scan_band_EU_SUPER))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("EU HYPER"), self.nimConfig.cable.scan_band_EU_HYPER))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US LOW"), self.nimConfig.cable.scan_band_US_LOW))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US MID"), self.nimConfig.cable.scan_band_US_MID))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US HIGH"), self.nimConfig.cable.scan_band_US_HIGH))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US SUPER"), self.nimConfig.cable.scan_band_US_SUPER))
							self.list.append(getConfigListEntry(_("Scan %s band") % ("US HYPER"), self.nimConfig.cable.scan_band_US_HYPER))
						else:
							self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
						# TRANSLATORS: option name, indicating which type of (DVB-C) modulation should be scanned. The modulation type is printed in '%s'. E.g.: 'Scan QAM16'
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM16"), self.nimConfig.cable.scan_mod_qam16))
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM32"), self.nimConfig.cable.scan_mod_qam32))
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM64"), self.nimConfig.cable.scan_mod_qam64))
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM128"), self.nimConfig.cable.scan_mod_qam128))
						self.list.append(getConfigListEntry(_("Scan %s") % ("QAM256"), self.nimConfig.cable.scan_mod_qam256))
						self.list.append(getConfigListEntry(_("Scan %s") % ("SR6900"), self.nimConfig.cable.scan_sr_6900))
						self.list.append(getConfigListEntry(_("Scan %s") % ("SR6875"), self.nimConfig.cable.scan_sr_6875))
						self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
						self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
			self.have_advanced = False
		elif self.nim.isCompatible("DVB-T"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			self.have_advanced = False
			if self.nimConfig.configMode.value == "enabled":
				# country/region tier one
				if self.terrestrialCountriesEntry is None:
					terrestrialcountrycodelist = nimmanager.getTerrestrialsCountrycodeList()
					terrestrialcountrycode = nimmanager.getTerrestrialCountrycode(self.slotid)
					default = terrestrialcountrycode in terrestrialcountrycodelist and terrestrialcountrycode or None
					choices = [("all", _("All"))]+sorted([(x, self.countrycodeToCountry(x)) for x in terrestrialcountrycodelist], key=lambda listItem: listItem[1])
					self.terrestrialCountries = ConfigSelection(default = default, choices = choices)
					self.terrestrialCountriesEntry = getConfigListEntry(_("Country"), self.terrestrialCountries)
					self.originalTerrestrialRegion = self.nimConfig.terrestrial.value
				# country/region tier two
				if self.terrestrialCountries.value == "all":
					terrstrialNames = [x[0] for x in sorted(sorted(nimmanager.getTerrestrialsList(), key=lambda listItem: listItem[0]), key=lambda listItem: self.countrycodeToCountry(listItem[2]))]
				else:
					terrstrialNames = sorted([x[0] for x in nimmanager.getTerrestrialsByCountrycode(self.terrestrialCountries.value)])
				default = self.nimConfig.terrestrial.value in terrstrialNames and self.nimConfig.terrestrial.value or None
				self.terrestrialRegions = ConfigSelection(default = default, choices = terrstrialNames)
				def updateTerrestrialProvider(configEntry):
					self.nimConfig.terrestrial.value = configEntry.value
					self.nimConfig.terrestrial.save()
				self.terrestrialRegions.addNotifier(updateTerrestrialProvider)
				self.terrestrialRegionsEntry = getConfigListEntry(_("Region"), self.terrestrialRegions)
				self.list.append(self.terrestrialCountriesEntry)
				self.list.append(self.terrestrialRegionsEntry)
				self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrestrial_5V))
		elif self.nim.isCompatible("ATSC"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("ATSC provider"), self.nimConfig.atsc))
			self.have_advanced = False
		else:
			self.have_advanced = False
		self["config"].list = self.list
		self["config"].l.setList(self.list)
		self.setTextKeyYellow()
Beispiel #10
0
	def fillListWithAdvancedSatEntrys(self, Sat):
		lnbnum = int(Sat.lnb.value)
		currLnb = self.nimConfig.advanced.lnb[lnbnum]

		if isinstance(currLnb, ConfigNothing):
			currLnb = None

		# LNBs
		self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
		self.list.append(self.advancedLnbsEntry)

		if currLnb:
			if self.nim.isFBCLink():
				currLnb.lof.value = "unicable"
			self.list.append(getConfigListEntry(_("Priority"), currLnb.prio))
			self.advancedLof = getConfigListEntry("LOF", currLnb.lof)
			self.list.append(self.advancedLof)
			if currLnb.lof.value == "user_defined":
				self.list.append(getConfigListEntry("LOF/L", currLnb.lofl))
				self.list.append(getConfigListEntry("LOF/H", currLnb.lofh))
				self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))

			if currLnb.lof.value == "unicable":
				self.advancedUnicable = getConfigListEntry("SCR (Unicable/JESS) "+_("type"), currLnb.unicable)
				self.list.append(self.advancedUnicable)
				if currLnb.unicable.value == "unicable_user":
					self.advancedFormat = getConfigListEntry(_("Format"), currLnb.format)
					self.advancedPosition = getConfigListEntry(_("Position"), currLnb.positionNumber)
					self.advancedSCR = getConfigListEntry(_("Channel"), currLnb.scrList)
					self.list.append(self.advancedFormat)
					self.list.append(self.advancedPosition)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), currLnb.scrfrequency))
					self.list.append(getConfigListEntry("LOF/L", currLnb.lofl))
					self.list.append(getConfigListEntry("LOF/H", currLnb.lofh))
					self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
				else:
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableManufacturer)
					self.advancedType = getConfigListEntry(_("Model"), currLnb.unicableProduct)
					self.advancedSCR = getConfigListEntry(_("Channel"), currLnb.scrList)
					self.advancedPosition = getConfigListEntry(_("Position"), currLnb.positionNumber)
					self.list.append(self.advancedManufacturer)
					self.list.append(self.advancedType)
					if currLnb.positions.value > 1:
						self.list.append(self.advancedPosition)
					self.list.append(self.advancedSCR)
				choices = []
				connectable = nimmanager.canInternalConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id) + _(" (internal connection)")))
				connectable = nimmanager.canExternalConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id) + _(" (external connection)")))
				if len(choices):
					if self.nim.isFBCLink():
						if self.nimConfig.advanced.unicableconnected.value != True:
							self.nimConfig.advanced.unicableconnected.value = True
					self.advancedConnected = getConfigListEntry(_("connected"), self.nimConfig.advanced.unicableconnected)
					self.list.append(self.advancedConnected)
					if self.nimConfig.advanced.unicableconnected.value == True:
						self.nimConfig.advanced.unicableconnectedTo.setChoices(choices)
						self.list.append(getConfigListEntry(_("Connected to"),self.nimConfig.advanced.unicableconnectedTo))
				print "[Satconfig] unicableconnectedTo choices : ", choices

			else:	#no Unicable
				self.list.append(getConfigListEntry(_("Voltage mode"), Sat.voltage))
				self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage))
				self.list.append(getConfigListEntry(_("Tone mode"), Sat.tonemode))

			if lnbnum < 65:
				self.advancedDiseqcMode = getConfigListEntry(_("DiSEqC mode"), currLnb.diseqcMode)
				self.list.append(self.advancedDiseqcMode)
			if currLnb.diseqcMode.value != "none":
				self.list.append(getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
				self.toneburst = getConfigListEntry(_("Toneburst"), currLnb.toneburst)
				self.list.append(self.toneburst)
				self.committedDiseqcCommand = getConfigListEntry(_("DiSEqC 1.0 command"), currLnb.commitedDiseqcCommand)
				self.list.append(self.committedDiseqcCommand)
				if currLnb.diseqcMode.value == "1_0":
					if currLnb.toneburst.index and currLnb.commitedDiseqcCommand.index:
						self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
				else:
					self.uncommittedDiseqcCommand = getConfigListEntry(_("DiSEqC 1.1 command"), currLnb.uncommittedDiseqcCommand)
					self.list.append(self.uncommittedDiseqcCommand)
					if currLnb.uncommittedDiseqcCommand.index:
						if currLnb.commandOrder.value == "ct":
							currLnb.commandOrder.value = "cut"
						elif currLnb.commandOrder.value == "tc":
							currLnb.commandOrder.value = "tcu"
					else:
						if currLnb.commandOrder.index & 1:
							currLnb.commandOrder.value = "tc"
						else:
							currLnb.commandOrder.value = "ct"
					self.commandOrder = getConfigListEntry(_("Command order"), currLnb.commandOrder)
					if 1 < ((1 if currLnb.uncommittedDiseqcCommand.index else 0) + (1 if currLnb.commitedDiseqcCommand.index else 0) + (1 if currLnb.toneburst.index else 0)):
						self.list.append(self.commandOrder)
					if currLnb.uncommittedDiseqcCommand.index:
						self.list.append(getConfigListEntry(_("DiSEqC 1.1 repeats"), currLnb.diseqcRepeats))
				self.list.append(getConfigListEntry(_("Sequence repeat"), currLnb.sequenceRepeat))
				if currLnb.diseqcMode.value == "1_2":
					if SystemInfo["CanMeasureFrontendInputPower"]:
						self.advancedPowerMeasurement = getConfigListEntry(_("Use power measurement"), currLnb.powerMeasurement)
						self.list.append(self.advancedPowerMeasurement)
						if currLnb.powerMeasurement.value:
							self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
							self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
							self.list.append(self.turningSpeed)
							if currLnb.turningSpeed.value == "fast epoch":
								self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
								self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
								self.list.append(self.turnFastEpochBegin)
								self.list.append(self.turnFastEpochEnd)
					else:
						if currLnb.powerMeasurement.value:
							currLnb.powerMeasurement.value = False
							currLnb.powerMeasurement.save()
					self.advancedUsalsEntry = getConfigListEntry(_("Use USALS for this sat"), Sat.usals)
					if lnbnum < 65:
						self.list.append(self.advancedUsalsEntry)
					if Sat.usals.value:
						self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))
						self.list.append(getConfigListEntry(" ", currLnb.longitudeOrientation))
						self.list.append(getConfigListEntry(_("Latitude"), currLnb.latitude))
						self.list.append(getConfigListEntry(" ", currLnb.latitudeOrientation))
					else:
						self.list.append(getConfigListEntry(_("Stored position"), Sat.rotorposition))
					if not hasattr(self, 'additionalMotorOptions'):
						self.additionalMotorOptions = NoSave(ConfigYesNo(False))
					self.showAdditionalMotorOptions = getConfigListEntry(_("Extra motor options"), self.additionalMotorOptions)
					self.list.append(self.showAdditionalMotorOptions)
					if self.additionalMotorOptions.value:
						self.list.append(getConfigListEntry("   " + _("Horizontal turning speed") + " [" + chr(176) + "/sec]", currLnb.turningspeedH))
						self.list.append(getConfigListEntry("   " + _("Vertical turning speed") + " [" + chr(176) + "/sec]", currLnb.turningspeedV))
						self.list.append(getConfigListEntry("   " + _("Turning step size") + " [" + chr(176) + "]", currLnb.tuningstepsize))
						self.list.append(getConfigListEntry("   " + _("Max memory positions"), currLnb.rotorPositions))
Beispiel #11
0
    def fillListWithAdvancedSatEntrys(self, Sat):
        lnbnum = int(Sat.lnb.value)
        currLnb = self.nimConfig.advanced.lnb[lnbnum]
        diction = None
        if isinstance(currLnb, ConfigNothing):
            currLnb = None

        # LNBs
        self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
        self.list.append(self.advancedLnbsEntry)

        if currLnb:
            if isFBCLink(self.nim):
                if currLnb.lof.value != "unicable":
                    currLnb.lof.value = "unicable"

            self.list.append(getConfigListEntry(_("Priority"), currLnb.prio))
            self.advancedLof = getConfigListEntry(_("LOF"), currLnb.lof)
            self.list.append(self.advancedLof)
            if currLnb.lof.value == "user_defined":
                self.list.append(getConfigListEntry(_("LOF/L"), currLnb.lofl))
                self.list.append(getConfigListEntry(_("LOF/H"), currLnb.lofh))
                self.list.append(
                    getConfigListEntry(_("Threshold"), currLnb.threshold))


#			self.list.append(getConfigListEntry(_("12V Output"), currLnb.output_12v))

            if currLnb.lof.value == "unicable":
                self.advancedUnicable = getConfigListEntry(
                    "Unicable " + _("Configuration Mode"), currLnb.unicable)
                self.list.append(self.advancedUnicable)
                if currLnb.unicable.value == "unicable_user":
                    self.advancedDiction = getConfigListEntry(
                        _("Diction"), currLnb.dictionuser)
                    self.list.append(self.advancedDiction)

                    if currLnb.dictionuser.value == "EN50494":
                        satcr = currLnb.satcruserEN50494
                        stcrvco = currLnb.satcrvcouserEN50494[
                            currLnb.satcruserEN50494.index]
                    elif currLnb.dictionuser.value == "EN50607":
                        satcr = currLnb.satcruserEN50607
                        stcrvco = currLnb.satcrvcouserEN50607[
                            currLnb.satcruserEN50607.index]

                    self.advancedSCR = getConfigListEntry(_("Channel"), satcr)
                    self.list.append(self.advancedSCR)
                    self.list.append(
                        getConfigListEntry(_("Frequency"), stcrvco))

                    self.list.append(
                        getConfigListEntry(_("LOF/L"), currLnb.lofl))
                    self.list.append(
                        getConfigListEntry(_("LOF/H"), currLnb.lofh))
                    self.list.append(
                        getConfigListEntry(_("Threshold"), currLnb.threshold))
                elif currLnb.unicable.value == "unicable_matrix":
                    manufacturer_name = currLnb.unicableMatrixManufacturer.value
                    manufacturer = currLnb.unicableMatrix[manufacturer_name]
                    #					if "product" in manufacturer.content:
                    product_name = manufacturer.product.value
                    self.advancedManufacturer = getConfigListEntry(
                        _("Manufacturer"), currLnb.unicableMatrixManufacturer)
                    self.list.append(self.advancedManufacturer)
                    if product_name in manufacturer.scr:
                        diction = manufacturer.diction[product_name].value
                        self.advancedType = getConfigListEntry(
                            _("Type"), manufacturer.product)
                        self.advancedSCR = getConfigListEntry(
                            _("Channel"), manufacturer.scr[product_name])
                        self.list.append(self.advancedType)
                        self.list.append(self.advancedSCR)
                        self.list.append(
                            getConfigListEntry(
                                _("Frequency"), manufacturer.vco[product_name][
                                    manufacturer.scr[product_name].index]))
                elif currLnb.unicable.value == "unicable_lnb":
                    manufacturer_name = currLnb.unicableLnbManufacturer.value
                    manufacturer = currLnb.unicableLnb[manufacturer_name]
                    #					if "product" in manufacturer.content:
                    product_name = manufacturer.product.value
                    self.advancedManufacturer = getConfigListEntry(
                        _("Manufacturer"), currLnb.unicableLnbManufacturer)
                    self.list.append(self.advancedManufacturer)
                    if product_name in manufacturer.scr:
                        diction = manufacturer.diction[product_name].value
                        self.advancedType = getConfigListEntry(
                            _("Type"), manufacturer.product)
                        self.advancedSCR = getConfigListEntry(
                            _("Channel"), manufacturer.scr[product_name])
                        self.list.append(self.advancedType)
                        self.list.append(self.advancedSCR)
                        self.list.append(
                            getConfigListEntry(
                                _("Frequency"), manufacturer.vco[product_name][
                                    manufacturer.scr[product_name].index]))

                choices = []
                connectable = nimmanager.canConnectTo(self.slotid)
                for id in connectable:
                    choices.append((str(id), nimmanager.getNimDescription(id)))
                if len(choices):
                    if isFBCLink(self.nim):
                        if self.nimConfig.advanced.unicableconnected.value != True:
                            self.nimConfig.advanced.unicableconnected.value = True

                    self.advancedConnected = getConfigListEntry(
                        _("connected"),
                        self.nimConfig.advanced.unicableconnected)
                    self.list.append(self.advancedConnected)
                    if self.nimConfig.advanced.unicableconnected.value == True:
                        self.nimConfig.advanced.unicableconnectedTo.setChoices(
                            choices)
                        self.list.append(
                            getConfigListEntry(
                                _("Connected to"),
                                self.nimConfig.advanced.unicableconnectedTo))

            else:  #kein Unicable
                self.list.append(
                    getConfigListEntry(_("Voltage mode"), Sat.voltage))
                self.list.append(
                    getConfigListEntry(_("Increased voltage"),
                                       currLnb.increased_voltage))
                self.list.append(
                    getConfigListEntry(_("Tone mode"), Sat.tonemode))

            if lnbnum < 65 and diction != "EN50607":
                self.advancedDiseqcMode = getConfigListEntry(
                    _("DiSEqC mode"), currLnb.diseqcMode)
                self.list.append(self.advancedDiseqcMode)
            if currLnb.diseqcMode.value != "none":
                self.list.append(
                    getConfigListEntry(_("Toneburst"), currLnb.toneburst))
                self.list.append(
                    getConfigListEntry(_("Committed DiSEqC command"),
                                       currLnb.commitedDiseqcCommand))
                self.list.append(
                    getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
                self.list.append(
                    getConfigListEntry(_("Sequence repeat"),
                                       currLnb.sequenceRepeat))
                if currLnb.diseqcMode.value == "1_0":
                    self.list.append(
                        getConfigListEntry(_("Command order"),
                                           currLnb.commandOrder1_0))
                else:
                    if currLnb.uncommittedDiseqcCommand.index:
                        if currLnb.commandOrder.value == "ct":
                            currLnb.commandOrder.value = "cut"
                        elif currLnb.commandOrder.value == "tc":
                            currLnb.commandOrder.value = "tcu"
                    else:
                        if currLnb.commandOrder.index & 1:
                            currLnb.commandOrder.value = "tc"
                        else:
                            currLnb.commandOrder.value = "ct"
                    self.list.append(
                        getConfigListEntry(_("Command order"),
                                           currLnb.commandOrder))
                    self.uncommittedDiseqcCommand = getConfigListEntry(
                        _("Uncommitted DiSEqC command"),
                        currLnb.uncommittedDiseqcCommand)
                    self.list.append(self.uncommittedDiseqcCommand)
                    self.list.append(
                        getConfigListEntry(_("DiSEqC repeats"),
                                           currLnb.diseqcRepeats))
                if currLnb.diseqcMode.value == "1_2":
                    self.list.append(
                        getConfigListEntry(_("Longitude"), currLnb.longitude))
                    self.list.append(
                        getConfigListEntry(" ", currLnb.longitudeOrientation))
                    self.list.append(
                        getConfigListEntry(_("Latitude"), currLnb.latitude))
                    self.list.append(
                        getConfigListEntry(" ", currLnb.latitudeOrientation))
                    if SystemInfo["CanMeasureFrontendInputPower"]:
                        self.advancedPowerMeasurement = getConfigListEntry(
                            _("Use Power Measurement"),
                            currLnb.powerMeasurement)
                        self.list.append(self.advancedPowerMeasurement)
                        if currLnb.powerMeasurement.value:
                            self.list.append(
                                getConfigListEntry(_("Power threshold in mA"),
                                                   currLnb.powerThreshold))
                            self.turningSpeed = getConfigListEntry(
                                _("Rotor turning speed"), currLnb.turningSpeed)
                            self.list.append(self.turningSpeed)
                            if currLnb.turningSpeed.value == "fast epoch":
                                self.turnFastEpochBegin = getConfigListEntry(
                                    _("Begin time"), currLnb.fastTurningBegin)
                                self.turnFastEpochEnd = getConfigListEntry(
                                    _("End time"), currLnb.fastTurningEnd)
                                self.list.append(self.turnFastEpochBegin)
                                self.list.append(self.turnFastEpochEnd)
                    else:
                        if currLnb.powerMeasurement.value:
                            currLnb.powerMeasurement.value = False
                            currLnb.powerMeasurement.save()
                    self.advancedUsalsEntry = getConfigListEntry(
                        _("Use usals for this sat"), Sat.usals)
                    self.list.append(self.advancedUsalsEntry)
                    if not Sat.usals.value:
                        self.list.append(
                            getConfigListEntry(_("Stored position"),
                                               Sat.rotorposition))
Beispiel #12
0
    def createSetup(self):
        print "Creating setup"
        self.list = []

        self.multiType = None
        self.configMode = None
        self.diseqcModeEntry = None
        self.advancedSatsEntry = None
        self.advancedLnbsEntry = None
        self.advancedDiseqcMode = None
        self.advancedUsalsEntry = None
        self.advancedLof = None
        self.advancedPowerMeasurement = None
        self.turningSpeed = None
        self.turnFastEpochBegin = None
        self.turnFastEpochEnd = None
        self.uncommittedDiseqcCommand = None
        self.cableScanType = None
        self.have_advanced = False
        self.advancedUnicable = None
        self.advancedType = None
        self.advancedManufacturer = None
        self.advancedSCR = None
        self.advancedDiction = None
        self.advancedConnected = None

        if self.nim.isMultiType():
            multiType = self.nimConfig.multiType
            self.multiType = getConfigListEntry(_("Tuner type"), multiType)
            self.list.append(self.multiType)

        if self.nim.isCompatible("DVB-S"):
            self.configMode = getConfigListEntry(_("Configuration Mode"),
                                                 self.nimConfig.configMode)
            self.list.append(self.configMode)

            if self.nimConfig.configMode.value == "simple":  #simple setup
                self.diseqcModeEntry = getConfigListEntry(
                    _("Mode"), self.nimConfig.diseqcMode)
                self.list.append(self.diseqcModeEntry)
                if self.nimConfig.diseqcMode.value in ("single",
                                                       "toneburst_a_b",
                                                       "diseqc_a_b",
                                                       "diseqc_a_b_c_d"):
                    self.createSimpleSetup(self.list,
                                           self.nimConfig.diseqcMode.value)
                if self.nimConfig.diseqcMode.value == "positioner":
                    self.createPositionerSetup(self.list)
            elif self.nimConfig.configMode.value == "equal":
                choices = []
                nimlist = nimmanager.canEqualTo(self.nim.slot)
                for id in nimlist:
                    #choices.append((str(id), str(chr(65 + id))))
                    choices.append((str(id), nimmanager.getNimDescription(id)))
                self.nimConfig.connectedTo.setChoices(choices)
                #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
                self.list.append(
                    getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
            elif self.nimConfig.configMode.value == "satposdepends":
                choices = []
                nimlist = nimmanager.canDependOn(self.nim.slot)
                for id in nimlist:
                    #choices.append((str(id), str(chr(65 + id))))
                    choices.append((str(id), nimmanager.getNimDescription(id)))
                self.nimConfig.connectedTo.setChoices(choices)
                #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
                self.list.append(
                    getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
            elif self.nimConfig.configMode.value == "loopthrough":
                choices = []
                print "connectable to:", nimmanager.canConnectTo(self.slotid)
                connectable = nimmanager.canConnectTo(self.slotid)
                for id in connectable:
                    choices.append((str(id), nimmanager.getNimDescription(id)))
                self.nimConfig.connectedTo.setChoices(choices)
                #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
                self.list.append(
                    getConfigListEntry(_("Connected to"),
                                       self.nimConfig.connectedTo))
            elif self.nimConfig.configMode.value == "nothing":
                pass
            elif self.nimConfig.configMode.value == "advanced":  # advanced
                # SATs
                self.advancedSatsEntry = getConfigListEntry(
                    _("Satellite"), self.nimConfig.advanced.sats)
                self.list.append(self.advancedSatsEntry)
                cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
                satlist = self.nimConfig.advanced.sat.keys()
                if cur_orb_pos is not None:
                    if cur_orb_pos not in satlist:
                        cur_orb_pos = satlist[0]
                    currSat = self.nimConfig.advanced.sat[cur_orb_pos]
                    self.fillListWithAdvancedSatEntrys(currSat)
                self.have_advanced = True
            if self.nim.description == "Alps BSBE2" and config.usage.setup_level.index >= 2:  # expert
                self.list.append(
                    getConfigListEntry(_("Tone Amplitude"),
                                       self.nimConfig.toneAmplitude))
        elif self.nim.isCompatible("DVB-C"):
            self.configMode = getConfigListEntry(_("Configuration Mode"),
                                                 self.nimConfig.configMode)
            self.list.append(self.configMode)
            if self.nimConfig.configMode.value == "enabled":
                self.cableScanType = getConfigListEntry(
                    _("Used service scan type"),
                    self.nimConfig.cable.scan_type)
                self.list.append(self.cableScanType)
                if self.nimConfig.cable.scan_type.value == "provider":
                    self.list.append(
                        getConfigListEntry(_("Provider to scan"),
                                           self.nimConfig.cable.scan_provider))
                else:
                    if self.nimConfig.cable.scan_type.value == "bands":
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band EU VHF I"),
                                self.nimConfig.cable.scan_band_EU_VHF_I))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band EU MID"),
                                self.nimConfig.cable.scan_band_EU_MID))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band EU VHF III"),
                                self.nimConfig.cable.scan_band_EU_VHF_III))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band EU UHF IV"),
                                self.nimConfig.cable.scan_band_EU_UHF_IV))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band EU UHF V"),
                                self.nimConfig.cable.scan_band_EU_UHF_V))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band EU SUPER"),
                                self.nimConfig.cable.scan_band_EU_SUPER))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band EU HYPER"),
                                self.nimConfig.cable.scan_band_EU_HYPER))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band US LOW"),
                                self.nimConfig.cable.scan_band_US_LOW))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band US MID"),
                                self.nimConfig.cable.scan_band_US_MID))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band US HIGH"),
                                self.nimConfig.cable.scan_band_US_HIGH))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band US SUPER"),
                                self.nimConfig.cable.scan_band_US_SUPER))
                        self.list.append(
                            getConfigListEntry(
                                _("Scan band US HYPER"),
                                self.nimConfig.cable.scan_band_US_HYPER))
                    elif self.nimConfig.cable.scan_type.value == "steps":
                        self.list.append(
                            getConfigListEntry(
                                _("Frequency scan step size(khz)"),
                                self.nimConfig.cable.scan_frequency_steps))
                    self.list.append(
                        getConfigListEntry(
                            _("Scan QAM16"),
                            self.nimConfig.cable.scan_mod_qam16))
                    self.list.append(
                        getConfigListEntry(
                            _("Scan QAM32"),
                            self.nimConfig.cable.scan_mod_qam32))
                    self.list.append(
                        getConfigListEntry(
                            _("Scan QAM64"),
                            self.nimConfig.cable.scan_mod_qam64))
                    self.list.append(
                        getConfigListEntry(
                            _("Scan QAM128"),
                            self.nimConfig.cable.scan_mod_qam128))
                    self.list.append(
                        getConfigListEntry(
                            _("Scan QAM256"),
                            self.nimConfig.cable.scan_mod_qam256))
                    self.list.append(
                        getConfigListEntry(_("Scan SR6900"),
                                           self.nimConfig.cable.scan_sr_6900))
                    self.list.append(
                        getConfigListEntry(_("Scan SR6875"),
                                           self.nimConfig.cable.scan_sr_6875))
                    self.list.append(
                        getConfigListEntry(_("Scan additional SR"),
                                           self.nimConfig.cable.scan_sr_ext1))
                    self.list.append(
                        getConfigListEntry(_("Scan additional SR"),
                                           self.nimConfig.cable.scan_sr_ext2))
            self.have_advanced = False
        elif self.nim.isCompatible("DVB-T"):
            self.configMode = getConfigListEntry(_("Configuration Mode"),
                                                 self.nimConfig.configMode)
            self.list.append(self.configMode)
            self.have_advanced = False
            if self.nimConfig.configMode.value == "enabled":
                self.list.append(
                    getConfigListEntry(_("Terrestrial provider"),
                                       self.nimConfig.terrestrial))
                self.list.append(
                    getConfigListEntry(_("Enable 5V for active antenna"),
                                       self.nimConfig.terrestrial_5V))
        else:
            self.have_advanced = False
        self["config"].list = self.list
        self["config"].l.setList(self.list)
Beispiel #13
0
	def createSetup(self):
		print "Creating setup"
		self.list = [ ]

		self.multiType = None
		self.diseqcModeEntry = None
		self.advancedSatsEntry = None
		self.advancedLnbsEntry = None
		self.advancedDiseqcMode = None
		self.advancedUsalsEntry = None
		self.advancedLof = None
		self.advancedPowerMeasurement = None
		self.turningSpeed = None
		self.turnFastEpochBegin = None
		self.turnFastEpochEnd = None
		self.toneburst = None
		self.committedDiseqcCommand = None
		self.uncommittedDiseqcCommand = None
		self.commandOrder = None
		self.cableScanType = None
		self.have_advanced = False
		self.advancedUnicable = None
		self.advancedType = None
		self.advancedManufacturer = None
		self.advancedSCR = None
		self.advancedDiction = None
		self.advancedConnected = None
		self.advancedUnicableTuningAlgo = None
		self.showAdditionalMotorOptions = None
		self.selectSatsEntry = None
		self.advancedSelectSatsEntry = None
		self.singleSatEntry = None

		if self.nim.isMultiType():
			try:
				multiType = self.nimConfig.multiType
				choices = "("
				for x in multiType.choices.choices:		# Set list entry corresponding to the current tuner type
					if self.nim.isCompatible(x[1]):
						multiType.setValue(x[0])
					choices += x[1]
					choices += ", "
				choices = choices[:-2] + ")"
				self.multiType = getConfigListEntry(_("Tuner type %s")%(choices), multiType, _("You can switch with left and right this tuner types %s")%(choices))
				self.list.append(self.multiType)
			except:
				self.multiType = None

		if self.nim.isCompatible("DVB-S"):
			nimConfig = self.nimConfig.dvbs
			self.configMode = getConfigListEntry(_("Configuration mode"), nimConfig.configMode, _("Change Configuration mode simple to advanced"))
			self.list.append(self.configMode)

			if nimConfig.configMode.value == "simple":			#simple setup
				self.diseqcModeEntry = getConfigListEntry(pgettext(_("Satellite configuration mode"), _("Mode")), nimConfig.diseqcMode, _("Change settings for your switch modes: single lnb, tonburst or diseqc"))
				self.list.append(self.diseqcModeEntry)
				if nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
					self.createSimpleSetup(self.list, nimConfig.diseqcMode.value)
				if nimConfig.diseqcMode.value in ("positioner", "positioner_select"):
					self.createPositionerSetup(self.list)
			elif nimConfig.configMode.value == "equal":
				choices = []
				nimlist = nimmanager.canEqualTo(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), nimConfig.connectedTo))
			elif nimConfig.configMode.value == "satposdepends":
				choices = []
				nimlist = nimmanager.canDependOn(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), nimConfig.connectedTo))
			elif nimConfig.configMode.value == "loopthrough":
				choices = []
				print "connectable to:", nimmanager.canConnectTo(self.slotid)
				connectable = nimmanager.canConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Connected to"), nimConfig.connectedTo))
			elif nimConfig.configMode.value == "nothing":
				pass
			elif nimConfig.configMode.value == "advanced": # advanced
				# SATs
				self.advancedSatsEntry = getConfigListEntry(_("Satellite"), nimConfig.advanced.sats)
				self.list.append(self.advancedSatsEntry)
				current_config_sats = nimConfig.advanced.sats.value
				if current_config_sats in ("3605", "3606"):
					self.advancedSelectSatsEntry = getConfigListEntry(_("Press OK to select satellites"), nimConfig.pressOKtoList)
					self.list.append(self.advancedSelectSatsEntry)
					self.fillListWithAdvancedSatEntrys(nimConfig.advanced.sat[int(current_config_sats)])
				else:
					cur_orb_pos = nimConfig.advanced.sats.orbital_position
					satlist = nimConfig.advanced.sat.keys()
					if cur_orb_pos is not None:
						if cur_orb_pos not in satlist:
							cur_orb_pos = satlist[0]
						self.fillListWithAdvancedSatEntrys(nimConfig.advanced.sat[cur_orb_pos])
				self.have_advanced = True
			if path.exists("/proc/stb/frontend/%d/tone_amplitude" % self.nim.slot) and config.usage.setup_level.index >= 2: # expert
				self.list.append(getConfigListEntry(_("Tone amplitude"), nimConfig.toneAmplitude))
			if path.exists("/proc/stb/frontend/%d/use_scpc_optimized_search_range" % self.nim.slot) and config.usage.setup_level.index >= 2: # expert
				self.list.append(getConfigListEntry(_("SCPC optimized search range"), nimConfig.scpcSearchRange))

		elif self.nim.isCompatible("DVB-C"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.dvbc.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.dvbc.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Network ID"), self.nimConfig.dvbc.scan_networkid))
				self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.dvbc.scan_type)
				self.list.append(self.cableScanType)
				if self.nimConfig.dvbc.scan_type.value == "provider":
					self.list.append(getConfigListEntry(_("Provider to scan"), self.nimConfig.dvbc.scan_provider))
				else:
					if self.nimConfig.dvbc.scan_type.value == "bands":
						# TRANSLATORS: option name, indicating which type of (DVB-C) band should be scanned. The name of the band is printed in '%s'. E.g.: 'Scan EU MID band'
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU VHF I", self.nimConfig.dvbc.scan_band_EU_VHF_I))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU MID", self.nimConfig.dvbc.scan_band_EU_MID))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU VHF III", self.nimConfig.dvbc.scan_band_EU_VHF_III))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU UHF IV", self.nimConfig.dvbc.scan_band_EU_UHF_IV))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU UHF V", self.nimConfig.dvbc.scan_band_EU_UHF_V))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU SUPER", self.nimConfig.dvbc.scan_band_EU_SUPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU HYPER", self.nimConfig.dvbc.scan_band_EU_HYPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US LOW", self.nimConfig.dvbc.scan_band_US_LOW))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US MID", self.nimConfig.dvbc.scan_band_US_MID))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US HIGH", self.nimConfig.dvbc.scan_band_US_HIGH))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US SUPER", self.nimConfig.dvbc.scan_band_US_SUPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US HYPER", self.nimConfig.dvbc.scan_band_US_HYPER))
					elif self.nimConfig.dvbc.scan_type.value == "steps":
						self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.dvbc.scan_frequency_steps))
					# TRANSLATORS: option name, indicating which type of (DVB-C) modulation should be scanned. The modulation type is printed in '%s'. E.g.: 'Scan QAM16'
					if self.nim.description != "ATBM781x":
						self.list.append(getConfigListEntry(_("Scan %s") % "QAM16", self.nimConfig.dvbc.scan_mod_qam16))
						self.list.append(getConfigListEntry(_("Scan %s") % "QAM32", self.nimConfig.dvbc.scan_mod_qam32))
						self.list.append(getConfigListEntry(_("Scan %s") % "QAM64", self.nimConfig.dvbc.scan_mod_qam64))
						self.list.append(getConfigListEntry(_("Scan %s") % "QAM128", self.nimConfig.dvbc.scan_mod_qam128))
						self.list.append(getConfigListEntry(_("Scan %s") % "QAM256", self.nimConfig.dvbc.scan_mod_qam256))
						self.list.append(getConfigListEntry(_("Scan %s") % "SR6900", self.nimConfig.dvbc.scan_sr_6900))
						self.list.append(getConfigListEntry(_("Scan %s") % "SR6875", self.nimConfig.dvbc.scan_sr_6875))
						self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.dvbc.scan_sr_ext1))
						self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.dvbc.scan_sr_ext2))
			self.have_advanced = False
		elif self.nim.isCompatible("DVB-T"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.dvbt.configMode)
			self.list.append(self.configMode)
			self.have_advanced = False
			if self.nimConfig.dvbt.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.dvbt.terrestrial))
				if not getBoxType() in ('spycat'):
					self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.dvbt.terrestrial_5V))
		elif self.nim.isCompatible("ATSC"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.atsc.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.atsc.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("ATSC provider"), self.nimConfig.atsc.atsc))
			self.have_advanced = False
		else:
			self.have_advanced = False
		self["config"].list = self.list
		self["config"].l.setList(self.list)
Beispiel #14
0
	def createSetup(self):
		print "Creating setup"
		self.list = [ ]

		self.multiType = None
		self.configMode = None
		self.diseqcModeEntry = None
		self.advancedSatsEntry = None
		self.advancedLnbsEntry = None
		self.advancedDiseqcMode = None
		self.advancedUsalsEntry = None
		self.advancedLof = None
		self.advancedPowerMeasurement = None
		self.turningSpeed = None
		self.turnFastEpochBegin = None
		self.turnFastEpochEnd = None
		self.toneburst = None
		self.committedDiseqcCommand = None
		self.uncommittedDiseqcCommand = None
		self.commandOrder = None
		self.cableScanType = None
		self.have_advanced = False
		self.advancedUnicable = None
		self.advancedType = None
		self.advancedManufacturer = None
		self.advancedSCR = None
		self.advancedConnected = None
		self.showAdditionalMotorOptions = None

		if self.nim.isMultiType():
			try:
				multiType = self.nimConfig.multiType
				self.multiType = getConfigListEntry(_("Tuner type"), multiType)
				self.list.append(self.multiType)
			except:
				self.multiType = None

		if self.nim.isCompatible("DVB-S"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)

			if self.nimConfig.configMode.value == "simple":			#simple setup
				self.diseqcModeEntry = getConfigListEntry(pgettext("Satellite configuration mode", "Mode"), self.nimConfig.diseqcMode)
				self.list.append(self.diseqcModeEntry)
				if self.nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
					self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
				if self.nimConfig.diseqcMode.value == "positioner":
					self.createPositionerSetup(self.list)
			elif self.nimConfig.configMode.value == "equal":
				choices = []
				nimlist = nimmanager.canEqualTo(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "satposdepends":
				choices = []
				nimlist = nimmanager.canDependOn(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "loopthrough":
				choices = []
				print "connectable to:", nimmanager.canConnectTo(self.slotid)
				connectable = nimmanager.canConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Connected to"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "nothing":
				pass
			elif self.nimConfig.configMode.value == "advanced": # advanced
				# SATs
				self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
				self.list.append(self.advancedSatsEntry)
				cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
				satlist = self.nimConfig.advanced.sat.keys()
				if cur_orb_pos is not None:
					if cur_orb_pos not in satlist:
						cur_orb_pos = satlist[0]
					currSat = self.nimConfig.advanced.sat[cur_orb_pos]
					self.fillListWithAdvancedSatEntrys(currSat)
				self.have_advanced = True
			if path.exists("/proc/stb/frontend/%d/tone_amplitude" % self.nim.slot) and config.usage.setup_level.index >= 2: # expert
				self.list.append(getConfigListEntry(_("Tone amplitude"), self.nimConfig.toneAmplitude))
		elif self.nim.isCompatible("DVB-C"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Network ID"), self.nimConfig.cable.scan_networkid))
				self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
				self.list.append(self.cableScanType)
				if self.nimConfig.cable.scan_type.value == "provider":
					self.list.append(getConfigListEntry(_("Provider to scan"), self.nimConfig.cable.scan_provider))
				else:
					if self.nimConfig.cable.scan_type.value == "bands":
						# TRANSLATORS: option name, indicating which type of (DVB-C) band should be scanned. The name of the band is printed in '%s'. E.g.: 'Scan EU MID band'
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU VHF I", self.nimConfig.cable.scan_band_EU_VHF_I))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU MID", self.nimConfig.cable.scan_band_EU_MID))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU VHF III", self.nimConfig.cable.scan_band_EU_VHF_III))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU UHF IV", self.nimConfig.cable.scan_band_EU_UHF_IV))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU UHF V", self.nimConfig.cable.scan_band_EU_UHF_V))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU SUPER", self.nimConfig.cable.scan_band_EU_SUPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU HYPER", self.nimConfig.cable.scan_band_EU_HYPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US LOW", self.nimConfig.cable.scan_band_US_LOW))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US MID", self.nimConfig.cable.scan_band_US_MID))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US HIGH", self.nimConfig.cable.scan_band_US_HIGH))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US SUPER", self.nimConfig.cable.scan_band_US_SUPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US HYPER", self.nimConfig.cable.scan_band_US_HYPER))
					elif self.nimConfig.cable.scan_type.value == "steps":
						self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
					# TRANSLATORS: option name, indicating which type of (DVB-C) modulation should be scanned. The modulation type is printed in '%s'. E.g.: 'Scan QAM16'
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM16", self.nimConfig.cable.scan_mod_qam16))
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM32", self.nimConfig.cable.scan_mod_qam32))
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM64", self.nimConfig.cable.scan_mod_qam64))
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM128", self.nimConfig.cable.scan_mod_qam128))
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM256", self.nimConfig.cable.scan_mod_qam256))
					self.list.append(getConfigListEntry(_("Scan %s") % "SR6900", self.nimConfig.cable.scan_sr_6900))
					self.list.append(getConfigListEntry(_("Scan %s") % "SR6875", self.nimConfig.cable.scan_sr_6875))
					self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
					self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
			self.have_advanced = False
		elif self.nim.isCompatible("DVB-T"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			self.have_advanced = False
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrestrial))
				self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrestrial_5V))
		else:
			self.have_advanced = False
		self["config"].list = self.list
		self["config"].l.setList(self.list)
Beispiel #15
0
	def fillListWithAdvancedSatEntrys(self, Sat):
		lnbnum = int(Sat.lnb.value)
		currLnb = self.nimConfig.advanced.lnb[lnbnum]

		if isinstance(currLnb, ConfigNothing):
			currLnb = None

		# LNBs
		self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
		self.list.append(self.advancedLnbsEntry)

		if currLnb:
			self.list.append(getConfigListEntry(_("Priority"), currLnb.prio))
			self.advancedLof = getConfigListEntry("LOF", currLnb.lof)
			self.list.append(self.advancedLof)
			if currLnb.lof.value == "user_defined":
				self.list.append(getConfigListEntry("LOF/L", currLnb.lofl))
				self.list.append(getConfigListEntry("LOF/H", currLnb.lofh))
				self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))

			if currLnb.lof.value == "unicable" or currLnb.lof.value == "jess":
				self.advancedUnicable = getConfigListEntry("Unicable "+_("Configuration mode"), currLnb.unicable)
				self.list.append(self.advancedUnicable)
				if currLnb.unicable.value == "unicable_user":
					self.advancedSCR = getConfigListEntry(_("Channel"), currLnb.satcruser)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), currLnb.satcrvcouser[currLnb.satcruser.index]))
					self.list.append(getConfigListEntry("LOF/L", currLnb.lofl))
					self.list.append(getConfigListEntry("LOF/H", currLnb.lofh))
					self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
				elif currLnb.unicable.value == "unicable_matrix":
					manufacturer_name = currLnb.unicableMatrixManufacturer.value
					manufacturer = currLnb.unicableMatrix[manufacturer_name]
					product_name = manufacturer.product.value
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableMatrixManufacturer)
					self.advancedType = getConfigListEntry(_("Type"), manufacturer.product)
					self.advancedSCR = getConfigListEntry(_("Channel"), manufacturer.scr[product_name])
					self.list.append(self.advancedManufacturer)
					self.list.append(self.advancedType)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))
				elif currLnb.unicable.value == "unicable_lnb":
					manufacturer_name = currLnb.unicableLnbManufacturer.value
					manufacturer = currLnb.unicableLnb[manufacturer_name]
					product_name = manufacturer.product.value
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableLnbManufacturer)
					self.advancedType = getConfigListEntry(_("Type"), manufacturer.product)
					self.advancedSCR = getConfigListEntry(_("Channel"), manufacturer.scr[product_name])
					self.list.append(self.advancedManufacturer)
					self.list.append(self.advancedType)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))

				choices = []
				connectable = nimmanager.canConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				if len(choices):
					self.advancedConnected = getConfigListEntry(_("connected"), self.nimConfig.advanced.unicableconnected)
					self.list.append(self.advancedConnected)
					if self.nimConfig.advanced.unicableconnected.value:
						self.nimConfig.advanced.unicableconnectedTo.setChoices(choices)
						self.list.append(getConfigListEntry(_("Connected to"),self.nimConfig.advanced.unicableconnectedTo))

			else:	#kein Unicable
				self.list.append(getConfigListEntry(_("Voltage mode"), Sat.voltage))
				self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage))
				self.list.append(getConfigListEntry(_("Tone mode"), Sat.tonemode))

			if lnbnum < 65 and not currLnb.lof.value == "unicable" and not currLnb.lof.value == "jess":
				self.advancedDiseqcMode = getConfigListEntry(_("DiSEqC mode"), currLnb.diseqcMode)
				self.list.append(self.advancedDiseqcMode)
			if currLnb.diseqcMode.value != "none":
				self.list.append(getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
				self.toneburst = getConfigListEntry(_("Toneburst"), currLnb.toneburst)
				self.list.append(self.toneburst)
				self.committedDiseqcCommand = getConfigListEntry(_("DiSEqC 1.0 command"), currLnb.commitedDiseqcCommand)
				self.list.append(self.committedDiseqcCommand)

				if currLnb.diseqcMode.value == "1_0":
					if currLnb.toneburst.index and currLnb.commitedDiseqcCommand.index:
						self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
				else:
					self.uncommittedDiseqcCommand = getConfigListEntry(_("DiSEqC 1.1 command"), currLnb.uncommittedDiseqcCommand)
					self.list.append(self.uncommittedDiseqcCommand)
					if currLnb.uncommittedDiseqcCommand.index:
						if currLnb.commandOrder.value == "ct":
							currLnb.commandOrder.value = "cut"
						elif currLnb.commandOrder.value == "tc":
							currLnb.commandOrder.value = "tcu"
					else:
						if currLnb.commandOrder.index & 1:
							currLnb.commandOrder.value = "tc"
						else:
							currLnb.commandOrder.value = "ct"
					self.commandOrder = getConfigListEntry(_("Command order"), currLnb.commandOrder)
					if 1 < ((1 if currLnb.uncommittedDiseqcCommand.index else 0) + (1 if currLnb.commitedDiseqcCommand.index else 0) + (1 if currLnb.toneburst.index else 0)):
						self.list.append(self.commandOrder)
					if currLnb.uncommittedDiseqcCommand.index:
						self.list.append(getConfigListEntry(_("DiSEqC 1.1 repeats"), currLnb.diseqcRepeats))
				self.list.append(getConfigListEntry(_("Sequence repeat"), currLnb.sequenceRepeat))
				if currLnb.diseqcMode.value == "1_2":
					if SystemInfo["CanMeasureFrontendInputPower"]:
						self.advancedPowerMeasurement = getConfigListEntry(_("Use power measurement"), currLnb.powerMeasurement)
						self.list.append(self.advancedPowerMeasurement)
						if currLnb.powerMeasurement.value:
							self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
							self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
							self.list.append(self.turningSpeed)
							if currLnb.turningSpeed.value == "fast epoch":
								self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
								self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
								self.list.append(self.turnFastEpochBegin)
								self.list.append(self.turnFastEpochEnd)
					else:
						if currLnb.powerMeasurement.value:
							currLnb.powerMeasurement.value = False
							currLnb.powerMeasurement.save()
					self.advancedUsalsEntry = getConfigListEntry(_("Use USALS for this sat"), Sat.usals)
					if lnbnum < 65:
						self.list.append(self.advancedUsalsEntry)
					if Sat.usals.value:
						self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))
						self.list.append(getConfigListEntry(" ", currLnb.longitudeOrientation))
						self.list.append(getConfigListEntry(_("Latitude"), currLnb.latitude))
						self.list.append(getConfigListEntry(" ", currLnb.latitudeOrientation))
					else:
						self.list.append(getConfigListEntry(_("Stored position"), Sat.rotorposition))
					if not hasattr(self, 'additionalMotorOptions'):
						self.additionalMotorOptions = ConfigYesNo(False)
					self.showAdditionalMotorOptions = getConfigListEntry(_("Extra motor options"), self.additionalMotorOptions)
					self.list.append(self.showAdditionalMotorOptions)
					if self.additionalMotorOptions.value:
						self.list.append(getConfigListEntry("   " + _("Horizontal turning speed") + " [" + chr(176) + "/sec]", currLnb.turningspeedH))
						self.list.append(getConfigListEntry("   " + _("Vertical turning speed") + " [" + chr(176) + "/sec]", currLnb.turningspeedV))
						self.list.append(getConfigListEntry("   " + _("Turning step size") + " [" + chr(176) + "]", currLnb.tuningstepsize))
						self.list.append(getConfigListEntry("   " + _("Max memory positions"), currLnb.rotorPositions))
Beispiel #16
0
	def createSetup(self):
		print "[Satconfig] Creating setup"
		self.list = [ ]

		self.multiType = None
		self.configMode = None
		self.diseqcModeEntry = None
		self.advancedSatsEntry = None
		self.advancedLnbsEntry = None
		self.advancedDiseqcMode = None
		self.advancedUsalsEntry = None
		self.advancedLof = None
		self.advancedPowerMeasurement = None
		self.turningSpeed = None
		self.turnFastEpochBegin = None
		self.turnFastEpochEnd = None
		self.toneburst = None
		self.committedDiseqcCommand = None
		self.uncommittedDiseqcCommand = None
		self.commandOrder = None
		self.cableScanType = None
		self.have_advanced = False
		self.advancedUnicable = None
		self.advancedFormat = None
		self.advancedPosition = None
		self.advancedType = None
		self.advancedManufacturer = None
		self.advancedSCR = None
		self.advancedConnected = None
		self.showAdditionalMotorOptions = None
		self.selectSatsEntry = None
		self.advancedSelectSatsEntry = None
		self.singleSatEntry = None

		if self.nim.isMultiType():
			multiType = self.nimConfig.multiType
			self.multiType = getConfigListEntry(_("Tuner type"), multiType)
			self.list.append(self.multiType)

		if self.nim.isCompatible("DVB-S"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)

			if self.nimConfig.configMode.value == "simple":			#simple setup
				self.diseqcModeEntry = getConfigListEntry(pgettext("Satellite configuration mode", "Mode"), self.nimConfig.diseqcMode)
				self.list.append(self.diseqcModeEntry)
				if self.nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
					self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
				if self.nimConfig.diseqcMode.value in ("positioner", "positioner_select"):
					self.createPositionerSetup(self.list)
			elif self.nimConfig.configMode.value == "equal":
				choices = []
				nimlist = nimmanager.canEqualTo(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "satposdepends":
				choices = []
				nimlist = nimmanager.canDependOn(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "loopthrough":
				choices = []
				print "[Satconfig] connectable to:", nimmanager.canConnectTo(self.slotid)
				connectable = nimmanager.canConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Connected to"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "nothing":
				pass
			elif self.nimConfig.configMode.value == "advanced": # advanced
				# SATs
				self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
				self.list.append(self.advancedSatsEntry)
				current_config_sats = self.nimConfig.advanced.sats.value
				if current_config_sats in ("3605", "3606"):
					self.advancedSelectSatsEntry = getConfigListEntry(_("Press OK to select satellites"), self.nimConfig.pressOKtoList)
					self.list.append(self.advancedSelectSatsEntry)
					self.fillListWithAdvancedSatEntrys(self.nimConfig.advanced.sat[int(current_config_sats)])
				else:
					cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
					satlist = self.nimConfig.advanced.sat.keys()
					if cur_orb_pos is not None:
						if cur_orb_pos not in satlist:
							cur_orb_pos = satlist[0]
						self.fillListWithAdvancedSatEntrys(self.nimConfig.advanced.sat[cur_orb_pos])
				self.have_advanced = True
			if config.usage.setup_level.index >= 2:
				if fileExists("/proc/stb/frontend/%d/tone_amplitude" % self.nim.slot):
					self.list.append(getConfigListEntry(_("Tone amplitude"), self.nimConfig.toneAmplitude))
				if fileExists("/proc/stb/frontend/%d/use_scpc_optimized_search_range" % self.nim.slot):
					self.list.append(getConfigListEntry(_("SCPC optimized search range"), self.nimConfig.scpcSearchRange))
				if SystemInfo["HasForceLNBOn"] and self.nim.isFBCRoot():
					self.list.append(getConfigListEntry(_("Force LNB Power"), config.misc.forceLnbPower))
				if SystemInfo["HasForceToneburst"] and self.nim.isFBCRoot():
					self.list.append(getConfigListEntry(_("Force ToneBurst"), config.misc.forceToneBurst))
		elif self.nim.isCompatible("DVB-C"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Network ID"), self.nimConfig.cable.scan_networkid))
				self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
				self.list.append(self.cableScanType)
				if self.nimConfig.cable.scan_type.value == "provider":
					self.list.append(getConfigListEntry(_("Provider to scan"), self.nimConfig.cable.scan_provider))
				else:
					if self.nimConfig.cable.scan_type.value == "bands":
						# TRANSLATORS: option name, indicating which type of (DVB-C) band should be scanned. The name of the band is printed in '%s'. E.g.: 'Scan EU MID band'
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU VHF I", self.nimConfig.cable.scan_band_EU_VHF_I))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU MID", self.nimConfig.cable.scan_band_EU_MID))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU VHF III", self.nimConfig.cable.scan_band_EU_VHF_III))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU UHF IV", self.nimConfig.cable.scan_band_EU_UHF_IV))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU UHF V", self.nimConfig.cable.scan_band_EU_UHF_V))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU SUPER", self.nimConfig.cable.scan_band_EU_SUPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "EU HYPER", self.nimConfig.cable.scan_band_EU_HYPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US LOW", self.nimConfig.cable.scan_band_US_LOW))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US MID", self.nimConfig.cable.scan_band_US_MID))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US HIGH", self.nimConfig.cable.scan_band_US_HIGH))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US SUPER", self.nimConfig.cable.scan_band_US_SUPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % "US HYPER", self.nimConfig.cable.scan_band_US_HYPER))
					elif self.nimConfig.cable.scan_type.value == "steps":
						self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
					# TRANSLATORS: option name, indicating which type of (DVB-C) modulation should be scanned. The modulation type is printed in '%s'. E.g.: 'Scan QAM16'
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM16", self.nimConfig.cable.scan_mod_qam16))
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM32", self.nimConfig.cable.scan_mod_qam32))
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM64", self.nimConfig.cable.scan_mod_qam64))
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM128", self.nimConfig.cable.scan_mod_qam128))
					self.list.append(getConfigListEntry(_("Scan %s") % "QAM256", self.nimConfig.cable.scan_mod_qam256))
					self.list.append(getConfigListEntry(_("Scan %s") % "SR6900", self.nimConfig.cable.scan_sr_6900))
					self.list.append(getConfigListEntry(_("Scan %s") % "SR6875", self.nimConfig.cable.scan_sr_6875))
					self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
					self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
			self.have_advanced = False
		elif self.nim.isCompatible("DVB-T"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			self.have_advanced = False
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrestrial))
				self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrestrial_5V))
		elif self.nim.isCompatible("ATSC"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("ATSC provider"), self.nimConfig.atsc))
			self.have_advanced = False
		else:
			self.have_advanced = False
		self["config"].list = self.list
		self["config"].l.setList(self.list)
Beispiel #17
0
	def createSetup(self):
		print "Creating setup"
		self.list = [ ]

		self.configMode = None
		self.diseqcModeEntry = None
		self.advancedSatsEntry = None
		self.advancedLnbsEntry = None
		self.advancedDiseqcMode = None
		self.advancedUsalsEntry = None
		self.advancedLof = None
		self.advancedPowerMeasurement = None
		self.turningSpeed = None
		self.turnFastEpochBegin = None
		self.turnFastEpochEnd = None
		self.uncommittedDiseqcCommand = None
		self.cableScanType = None
		self.have_advanced = False
		self.advancedUnicable = None
		self.advancedType = None
		self.advancedManufacturer = None
		self.advancedSCR = None

		if self.nim.isCompatible("DVB-S"):
			self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)

			if self.nimConfig.configMode.value == "simple":			#simple setup
				self.diseqcModeEntry = getConfigListEntry(_("Mode"), self.nimConfig.diseqcMode)
				self.list.append(self.diseqcModeEntry)
				if self.nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
					self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
				if self.nimConfig.diseqcMode.value == "positioner":
					self.createPositionerSetup(self.list)
			elif self.nimConfig.configMode.value == "equal":
				choices = []
				nimlist = nimmanager.canEqualTo(self.nim.slot)
				for id in nimlist:
					#choices.append((str(id), str(chr(65 + id))))
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				#self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "satposdepends":
				choices = []
				nimlist = nimmanager.canDependOn(self.nim.slot)
				for id in nimlist:
					#choices.append((str(id), str(chr(65 + id))))
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				#self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "loopthrough":
				choices = []
				print "connectable to:", nimmanager.canConnectTo(self.slotid)
				connectable = nimmanager.canConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				#self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
				self.list.append(getConfigListEntry(_("Connected to"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.value == "nothing":
				pass
			elif self.nimConfig.configMode.value == "advanced": # advanced
				# SATs
				self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
				self.list.append(self.advancedSatsEntry)
				cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
				satlist = self.nimConfig.advanced.sat.keys()
				if cur_orb_pos is not None:
					if cur_orb_pos not in satlist:
						cur_orb_pos = satlist[0]
					currSat = self.nimConfig.advanced.sat[cur_orb_pos]
					self.fillListWithAdvancedSatEntrys(currSat)
				self.have_advanced = True
		elif self.nim.isCompatible("DVB-C"):
			self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.value == "enabled":
				self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
				self.list.append(self.cableScanType)
				if self.nimConfig.cable.scan_type.value == "provider":
					self.list.append(getConfigListEntry(_("Provider to scan"), self.nimConfig.cable.scan_provider))
				else:
					if self.nimConfig.cable.scan_type.value == "bands":
						self.list.append(getConfigListEntry(_("Scan band EU VHF I"), self.nimConfig.cable.scan_band_EU_VHF_I))
						self.list.append(getConfigListEntry(_("Scan band EU MID"), self.nimConfig.cable.scan_band_EU_MID))
						self.list.append(getConfigListEntry(_("Scan band EU VHF III"), self.nimConfig.cable.scan_band_EU_VHF_III))
						self.list.append(getConfigListEntry(_("Scan band EU UHF IV"), self.nimConfig.cable.scan_band_EU_UHF_IV))
						self.list.append(getConfigListEntry(_("Scan band EU UHF V"), self.nimConfig.cable.scan_band_EU_UHF_V))
						self.list.append(getConfigListEntry(_("Scan band EU SUPER"), self.nimConfig.cable.scan_band_EU_SUPER))
						self.list.append(getConfigListEntry(_("Scan band EU HYPER"), self.nimConfig.cable.scan_band_EU_HYPER))
						self.list.append(getConfigListEntry(_("Scan band US LOW"), self.nimConfig.cable.scan_band_US_LOW))
						self.list.append(getConfigListEntry(_("Scan band US MID"), self.nimConfig.cable.scan_band_US_MID))
						self.list.append(getConfigListEntry(_("Scan band US HIGH"), self.nimConfig.cable.scan_band_US_HIGH))
						self.list.append(getConfigListEntry(_("Scan band US SUPER"), self.nimConfig.cable.scan_band_US_SUPER))
						self.list.append(getConfigListEntry(_("Scan band US HYPER"), self.nimConfig.cable.scan_band_US_HYPER))
					elif self.nimConfig.cable.scan_type.value == "steps":
						self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
					self.list.append(getConfigListEntry(_("Scan QAM16"), self.nimConfig.cable.scan_mod_qam16))
					self.list.append(getConfigListEntry(_("Scan QAM32"), self.nimConfig.cable.scan_mod_qam32))
					self.list.append(getConfigListEntry(_("Scan QAM64"), self.nimConfig.cable.scan_mod_qam64))
					self.list.append(getConfigListEntry(_("Scan QAM128"), self.nimConfig.cable.scan_mod_qam128))
					self.list.append(getConfigListEntry(_("Scan QAM256"), self.nimConfig.cable.scan_mod_qam256))
					self.list.append(getConfigListEntry(_("Scan SR6900"), self.nimConfig.cable.scan_sr_6900))
					self.list.append(getConfigListEntry(_("Scan SR6875"), self.nimConfig.cable.scan_sr_6875))
					self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
					self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
			self.have_advanced = False
		elif self.nim.isCompatible("DVB-T"):
			self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			self.have_advanced = False
			if self.nimConfig.configMode.value == "enabled":
				self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrestrial))
				self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrestrial_5V))
		else:
			self.have_advanced = False
		self["config"].list = self.list
		self["config"].l.setList(self.list)
Beispiel #18
0
    def fillListWithAdvancedSatEntrys(self, Sat):
        lnbnum = int(Sat.lnb.value)
        currLnb = self.nimConfig.advanced.lnb[lnbnum]
        diction = None
        if isinstance(currLnb, ConfigNothing):
            currLnb = None
        self.advancedLnbsEntry = getConfigListEntry(_('LNB'), Sat.lnb)
        self.list.append(self.advancedLnbsEntry)
        if currLnb:
            self.list.append(getConfigListEntry(_('Priority'), currLnb.prio))
            self.advancedLof = getConfigListEntry('LOF', currLnb.lof)
            self.list.append(self.advancedLof)
            if currLnb.lof.value == 'user_defined':
                self.list.append(getConfigListEntry('LOF/L', currLnb.lofl))
                self.list.append(getConfigListEntry('LOF/H', currLnb.lofh))
                self.list.append(getConfigListEntry(_('Threshold'), currLnb.threshold))
            if currLnb.lof.value == 'unicable':
                self.advancedUnicable = getConfigListEntry('Unicable ' + _('Configuration mode'), currLnb.unicable)
                self.list.append(self.advancedUnicable)
                if currLnb.unicable.value == 'unicable_user':
                    self.advancedDiction = getConfigListEntry(_('Diction'), currLnb.dictionuser)
                    self.list.append(self.advancedDiction)
                    if currLnb.dictionuser.value == 'EN50494':
                        satcr = currLnb.satcruserEN50494
                        stcrvco = currLnb.satcrvcouserEN50494[currLnb.satcruserEN50494.index]
                    elif currLnb.dictionuser.value == 'EN50607':
                        satcr = currLnb.satcruserEN50607
                        stcrvco = currLnb.satcrvcouserEN50607[currLnb.satcruserEN50607.index]
                    self.advancedSCR = getConfigListEntry(_('Channel'), satcr)
                    self.list.append(self.advancedSCR)
                    self.list.append(getConfigListEntry(_('Frequency'), stcrvco))
                    self.list.append(getConfigListEntry('LOF/L', currLnb.lofl))
                    self.list.append(getConfigListEntry('LOF/H', currLnb.lofh))
                    self.list.append(getConfigListEntry(_('Threshold'), currLnb.threshold))
                elif currLnb.unicable.value == 'unicable_matrix':
                    nimmanager.sec.reconstructUnicableDate(currLnb.unicableMatrixManufacturer, currLnb.unicableMatrix, currLnb)
                    manufacturer_name = currLnb.unicableMatrixManufacturer.value
                    manufacturer = currLnb.unicableMatrix[manufacturer_name]
                    product_name = manufacturer.product.value
                    self.advancedManufacturer = getConfigListEntry(_('Manufacturer'), currLnb.unicableMatrixManufacturer)
                    self.list.append(self.advancedManufacturer)
                    if product_name in manufacturer.scr:
                        diction = manufacturer.diction[product_name].value
                        self.advancedType = getConfigListEntry(_('Type'), manufacturer.product)
                        self.advancedSCR = getConfigListEntry(_('Channel'), manufacturer.scr[product_name])
                        self.list.append(self.advancedType)
                        self.list.append(self.advancedSCR)
                        self.list.append(getConfigListEntry(_('Frequency'), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))
                elif currLnb.unicable.value == 'unicable_lnb':
                    nimmanager.sec.reconstructUnicableDate(currLnb.unicableLnbManufacturer, currLnb.unicableLnb, currLnb)
                    manufacturer_name = currLnb.unicableLnbManufacturer.value
                    manufacturer = currLnb.unicableLnb[manufacturer_name]
                    product_name = manufacturer.product.value
                    self.advancedManufacturer = getConfigListEntry(_('Manufacturer'), currLnb.unicableLnbManufacturer)
                    self.list.append(self.advancedManufacturer)
                    if product_name in manufacturer.scr:
                        diction = manufacturer.diction[product_name].value
                        self.advancedType = getConfigListEntry(_('Type'), manufacturer.product)
                        self.advancedSCR = getConfigListEntry(_('Channel'), manufacturer.scr[product_name])
                        self.list.append(self.advancedType)
                        self.list.append(self.advancedSCR)
                        self.list.append(getConfigListEntry(_('Frequency'), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))
                choices = []
                connectable = nimmanager.canConnectTo(self.slotid)
                for id in connectable:
                    choices.append((str(id), nimmanager.getNimDescription(id)))

                if len(choices):
                    self.advancedConnected = getConfigListEntry(_('connected'), self.nimConfig.advanced.unicableconnected)
                    self.list.append(self.advancedConnected)
                    if self.nimConfig.advanced.unicableconnected.value:
                        self.nimConfig.advanced.unicableconnectedTo.setChoices(choices)
                        self.list.append(getConfigListEntry(_('Connected to'), self.nimConfig.advanced.unicableconnectedTo))
            else:
                self.list.append(getConfigListEntry(_('Voltage mode'), Sat.voltage))
                self.list.append(getConfigListEntry(_('Increased voltage'), currLnb.increased_voltage))
                self.list.append(getConfigListEntry(_('Tone mode'), Sat.tonemode))
            if lnbnum < 65 and diction != 'EN50607':
                self.advancedDiseqcMode = getConfigListEntry(_('DiSEqC mode'), currLnb.diseqcMode)
                self.list.append(self.advancedDiseqcMode)
            if currLnb.diseqcMode.value != 'none':
                self.list.append(getConfigListEntry(_('Fast DiSEqC'), currLnb.fastDiseqc))
                self.toneburst = getConfigListEntry(_('Toneburst'), currLnb.toneburst)
                self.list.append(self.toneburst)
                self.committedDiseqcCommand = getConfigListEntry(_('DiSEqC 1.0 command'), currLnb.commitedDiseqcCommand)
                self.list.append(self.committedDiseqcCommand)
                if currLnb.diseqcMode.value == '1_0':
                    if currLnb.toneburst.index and currLnb.commitedDiseqcCommand.index:
                        self.list.append(getConfigListEntry(_('Command order'), currLnb.commandOrder1_0))
                else:
                    self.uncommittedDiseqcCommand = getConfigListEntry(_('DiSEqC 1.1 command'), currLnb.uncommittedDiseqcCommand)
                    self.list.append(self.uncommittedDiseqcCommand)
                    if currLnb.uncommittedDiseqcCommand.index:
                        if currLnb.commandOrder.value == 'ct':
                            currLnb.commandOrder.value = 'cut'
                        elif currLnb.commandOrder.value == 'tc':
                            currLnb.commandOrder.value = 'tcu'
                    elif currLnb.commandOrder.index & 1:
                        currLnb.commandOrder.value = 'tc'
                    else:
                        currLnb.commandOrder.value = 'ct'
                    self.commandOrder = getConfigListEntry(_('Command order'), currLnb.commandOrder)
                    if 1 < (1 if currLnb.uncommittedDiseqcCommand.index else 0) + (1 if currLnb.commitedDiseqcCommand.index else 0) + (1 if currLnb.toneburst.index else 0):
                        self.list.append(self.commandOrder)
                    if currLnb.uncommittedDiseqcCommand.index:
                        self.list.append(getConfigListEntry(_('DiSEqC 1.1 repeats'), currLnb.diseqcRepeats))
                self.list.append(getConfigListEntry(_('Sequence repeat'), currLnb.sequenceRepeat))
                if currLnb.diseqcMode.value == '1_2':
                    if SystemInfo['CanMeasureFrontendInputPower']:
                        self.advancedPowerMeasurement = getConfigListEntry(_('Use power measurement'), currLnb.powerMeasurement)
                        self.list.append(self.advancedPowerMeasurement)
                        if currLnb.powerMeasurement.value:
                            self.list.append(getConfigListEntry(_('Power threshold in mA'), currLnb.powerThreshold))
                            self.turningSpeed = getConfigListEntry(_('Rotor turning speed'), currLnb.turningSpeed)
                            self.list.append(self.turningSpeed)
                            if currLnb.turningSpeed.value == 'fast epoch':
                                self.turnFastEpochBegin = getConfigListEntry(_('Begin time'), currLnb.fastTurningBegin)
                                self.turnFastEpochEnd = getConfigListEntry(_('End time'), currLnb.fastTurningEnd)
                                self.list.append(self.turnFastEpochBegin)
                                self.list.append(self.turnFastEpochEnd)
                    elif currLnb.powerMeasurement.value:
                        currLnb.powerMeasurement.value = False
                        currLnb.powerMeasurement.save()
                    self.advancedUsalsEntry = getConfigListEntry(_('Use USALS for this sat'), Sat.usals)
                    if lnbnum < 65:
                        self.list.append(self.advancedUsalsEntry)
                    if Sat.usals.value:
                        self.list.append(getConfigListEntry(_('Longitude'), currLnb.longitude))
                        self.list.append(getConfigListEntry(' ', currLnb.longitudeOrientation))
                        self.list.append(getConfigListEntry(_('Latitude'), currLnb.latitude))
                        self.list.append(getConfigListEntry(' ', currLnb.latitudeOrientation))
                    else:
                        self.list.append(getConfigListEntry(_('Stored position'), Sat.rotorposition))
                    if not hasattr(self, 'additionalMotorOptions'):
                        self.additionalMotorOptions = ConfigYesNo(False)
                    self.showAdditionalMotorOptions = getConfigListEntry(_('Extra motor options'), self.additionalMotorOptions)
                    self.list.append(self.showAdditionalMotorOptions)
                    if self.additionalMotorOptions.value:
                        self.list.append(getConfigListEntry('   ' + _('Horizontal turning speed') + ' [' + chr(176) + '/sec]', currLnb.turningspeedH))
                        self.list.append(getConfigListEntry('   ' + _('Vertical turning speed') + ' [' + chr(176) + '/sec]', currLnb.turningspeedV))
                        self.list.append(getConfigListEntry('   ' + _('Turning step size') + ' [' + chr(176) + ']', currLnb.tuningstepsize))
                        self.list.append(getConfigListEntry('   ' + _('Max memory positions'), currLnb.rotorPositions))
        return
Beispiel #19
0
	def fillListWithAdvancedSatEntrys(self, Sat):
		lnbnum = int(Sat.lnb.getValue())
		currLnb = self.nimConfig.advanced.lnb[lnbnum]

		if isinstance(currLnb, ConfigNothing):
			currLnb = None

		# LNBs
		self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
		self.list.append(self.advancedLnbsEntry)

		if currLnb:
			self.list.append(getConfigListEntry(_("Priority"), currLnb.prio))
			self.advancedLof = getConfigListEntry("LOF", currLnb.lof)
			self.list.append(self.advancedLof)
			if currLnb.lof.getValue() == "user_defined":
				self.list.append(getConfigListEntry("LOF/L", currLnb.lofl))
				self.list.append(getConfigListEntry("LOF/H", currLnb.lofh))
				self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))

			if currLnb.lof.getValue() == "unicable":
				self.advancedUnicable = getConfigListEntry("Unicable "+_("Configuration mode"), currLnb.unicable)
				self.list.append(self.advancedUnicable)
				if currLnb.unicable.getValue() == "unicable_user":
					self.advancedSCR = getConfigListEntry(_("Channel"), currLnb.satcruser)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), currLnb.satcrvcouser[currLnb.satcruser.index]))
					self.list.append(getConfigListEntry("LOF/L", currLnb.lofl))
					self.list.append(getConfigListEntry("LOF/H", currLnb.lofh))
					self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
				elif currLnb.unicable.getValue() == "unicable_matrix":
					manufacturer_name = currLnb.unicableMatrixManufacturer.getValue()
					manufacturer = currLnb.unicableMatrix[manufacturer_name]
					product_name = manufacturer.product.getValue()
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableMatrixManufacturer)
					self.advancedType = getConfigListEntry(_("Type"), manufacturer.product)
					self.advancedSCR = getConfigListEntry(_("Channel"), manufacturer.scr[product_name])
					self.list.append(self.advancedManufacturer)
					self.list.append(self.advancedType)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))
				elif currLnb.unicable.getValue() == "unicable_lnb":
					manufacturer_name = currLnb.unicableLnbManufacturer.getValue()
					manufacturer = currLnb.unicableLnb[manufacturer_name]
					product_name = manufacturer.product.getValue()
					self.advancedManufacturer = getConfigListEntry(_("Manufacturer"), currLnb.unicableLnbManufacturer)
					self.advancedType = getConfigListEntry(_("Type"), manufacturer.product)
					self.advancedSCR = getConfigListEntry(_("Channel"), manufacturer.scr[product_name])
					self.list.append(self.advancedManufacturer)
					self.list.append(self.advancedType)
					self.list.append(self.advancedSCR)
					self.list.append(getConfigListEntry(_("Frequency"), manufacturer.vco[product_name][manufacturer.scr[product_name].index]))

				choices = []
				connectable = nimmanager.canConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				if len(choices):
					self.advancedConnected = getConfigListEntry(_("connected"), self.nimConfig.advanced.unicableconnected)
					self.list.append(self.advancedConnected)
					if self.nimConfig.advanced.unicableconnected.getValue() == True:
						self.nimConfig.advanced.unicableconnectedTo.setChoices(choices)
						self.list.append(getConfigListEntry(_("Connected to"),self.nimConfig.advanced.unicableconnectedTo))

			else:	#kein Unicable
				self.list.append(getConfigListEntry(_("Voltage mode"), Sat.voltage))
				self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage))
				self.list.append(getConfigListEntry(_("Tone mode"), Sat.tonemode))

			if lnbnum < 33:
				self.advancedDiseqcMode = getConfigListEntry(_("DiSEqC mode"), currLnb.diseqcMode)
				self.list.append(self.advancedDiseqcMode)
			if currLnb.diseqcMode.getValue() != "none":
				self.list.append(getConfigListEntry(_("Toneburst"), currLnb.toneburst))
				self.list.append(getConfigListEntry(_("Committed DiSEqC command"), currLnb.commitedDiseqcCommand))
				self.list.append(getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
				self.list.append(getConfigListEntry(_("Sequence repeat"), currLnb.sequenceRepeat))
				if currLnb.diseqcMode.getValue() == "1_0":
					self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
				else:
					if currLnb.uncommittedDiseqcCommand.index:
						if currLnb.commandOrder.getValue() == "ct":
							currLnb.commandOrder.setValue("cut")
						elif currLnb.commandOrder.getValue() == "tc":
							currLnb.commandOrder.setValue("tcu")
					else:
						if currLnb.commandOrder.index & 1:
							currLnb.commandOrder.setValue("tc")
						else:
							currLnb.commandOrder.setValue("ct")
					self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder))
					self.uncommittedDiseqcCommand = getConfigListEntry(_("Uncommitted DiSEqC command"), currLnb.uncommittedDiseqcCommand)
					self.list.append(self.uncommittedDiseqcCommand)
					self.list.append(getConfigListEntry(_("DiSEqC repeats"), currLnb.diseqcRepeats))
				if currLnb.diseqcMode.getValue() == "1_2":
					self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))
					self.list.append(getConfigListEntry(" ", currLnb.longitudeOrientation))
					self.list.append(getConfigListEntry(_("Latitude"), currLnb.latitude))
					self.list.append(getConfigListEntry(" ", currLnb.latitudeOrientation))
					if SystemInfo["CanMeasureFrontendInputPower"]:
						self.advancedPowerMeasurement = getConfigListEntry(_("Use power measurement"), currLnb.powerMeasurement)
						self.list.append(self.advancedPowerMeasurement)
						if currLnb.powerMeasurement.getValue():
							self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
							self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
							self.list.append(self.turningSpeed)
							if currLnb.turningSpeed.getValue() == "fast epoch":
								self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
								self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
								self.list.append(self.turnFastEpochBegin)
								self.list.append(self.turnFastEpochEnd)
					else:
						if currLnb.powerMeasurement.getValue():
							currLnb.powerMeasurement.setValue(False)
							currLnb.powerMeasurement.save()
					self.advancedUsalsEntry = getConfigListEntry(_("Use USALS for this sat"), Sat.usals)
					self.list.append(self.advancedUsalsEntry)
					if not Sat.usals.getValue():
						self.list.append(getConfigListEntry(_("Stored position"), Sat.rotorposition))
					self.list.append(getConfigListEntry(_("Tuning step size") + " [" + chr(176) + "]", currLnb.tuningstepsize))
					self.list.append(getConfigListEntry(_("Memory positions"), currLnb.rotorPositions))
					self.list.append(getConfigListEntry(_("Horizontal turning speed") + " [" + chr(176) + "/sec]", currLnb.turningspeedH))
					self.list.append(getConfigListEntry(_("Vertical turning speed") + " [" + chr(176) + "/sec]", currLnb.turningspeedV))
Beispiel #20
0
    def createSetup(self):
        print 'Creating setup'
        self.list = []
        self.multiType = None
        self.configMode = None
        self.diseqcModeEntry = None
        self.advancedSatsEntry = None
        self.advancedLnbsEntry = None
        self.advancedDiseqcMode = None
        self.advancedUsalsEntry = None
        self.advancedLof = None
        self.advancedPowerMeasurement = None
        self.turningSpeed = None
        self.turnFastEpochBegin = None
        self.turnFastEpochEnd = None
        self.toneburst = None
        self.committedDiseqcCommand = None
        self.uncommittedDiseqcCommand = None
        self.commandOrder = None
        self.cableScanType = None
        self.have_advanced = False
        self.advancedUnicable = None
        self.advancedType = None
        self.advancedManufacturer = None
        self.advancedSCR = None
        self.advancedDiction = None
        self.advancedConnected = None
        self.showAdditionalMotorOptions = None
        self.selectSatsEntry = None
        self.advancedSelectSatsEntry = None
        self.singleSatEntry = None
        if self.nim.isMultiType():
            try:
                multiType = self.nimConfig.multiType
                self.multiType = getConfigListEntry(_('Tuner type'), multiType)
                self.list.append(self.multiType)
            except:
                self.multiType = None

        if self.nim.isCompatible('DVB-S'):
            self.configMode = getConfigListEntry(_('Configuration mode'), self.nimConfig.configMode)
            self.list.append(self.configMode)
            if self.nimConfig.configMode.value == 'simple':
                self.diseqcModeEntry = getConfigListEntry(pgettext('Satellite configuration mode', 'Mode'), self.nimConfig.diseqcMode)
                self.list.append(self.diseqcModeEntry)
                if self.nimConfig.diseqcMode.value in ('single', 'toneburst_a_b', 'diseqc_a_b', 'diseqc_a_b_c_d'):
                    self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
                if self.nimConfig.diseqcMode.value in ('positioner', 'positioner_select'):
                    self.createPositionerSetup(self.list)
            elif self.nimConfig.configMode.value == 'equal':
                choices = []
                nimlist = nimmanager.canEqualTo(self.nim.slot)
                for id in nimlist:
                    choices.append((str(id), nimmanager.getNimDescription(id)))

                self.nimConfig.connectedTo.setChoices(choices)
                self.list.append(getConfigListEntry(_('Tuner'), self.nimConfig.connectedTo))
            elif self.nimConfig.configMode.value == 'satposdepends':
                choices = []
                nimlist = nimmanager.canDependOn(self.nim.slot)
                for id in nimlist:
                    choices.append((str(id), nimmanager.getNimDescription(id)))

                self.nimConfig.connectedTo.setChoices(choices)
                self.list.append(getConfigListEntry(_('Tuner'), self.nimConfig.connectedTo))
            elif self.nimConfig.configMode.value == 'loopthrough':
                choices = []
                print 'connectable to:', nimmanager.canConnectTo(self.slotid)
                connectable = nimmanager.canConnectTo(self.slotid)
                for id in connectable:
                    choices.append((str(id), nimmanager.getNimDescription(id)))

                self.nimConfig.connectedTo.setChoices(choices)
                self.list.append(getConfigListEntry(_('Connected to'), self.nimConfig.connectedTo))
            elif self.nimConfig.configMode.value == 'nothing':
                pass
            elif self.nimConfig.configMode.value == 'advanced':
                self.advancedSatsEntry = getConfigListEntry(_('Satellite'), self.nimConfig.advanced.sats)
                self.list.append(self.advancedSatsEntry)
                current_config_sats = self.nimConfig.advanced.sats.value
                if current_config_sats in ('3605', '3606'):
                    self.advancedSelectSatsEntry = getConfigListEntry(_('Press OK to select satellites'), self.nimConfig.pressOKtoList)
                    self.list.append(self.advancedSelectSatsEntry)
                    self.fillListWithAdvancedSatEntrys(self.nimConfig.advanced.sat[int(current_config_sats)])
                else:
                    cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
                    satlist = self.nimConfig.advanced.sat.keys()
                    if cur_orb_pos is not None:
                        if cur_orb_pos not in satlist:
                            cur_orb_pos = satlist[0]
                        self.fillListWithAdvancedSatEntrys(self.nimConfig.advanced.sat[cur_orb_pos])
                self.have_advanced = True
            if path.exists('/proc/stb/frontend/%d/tone_amplitude' % self.nim.slot) and config.usage.setup_level.index >= 2:
                self.list.append(getConfigListEntry(_('Tone amplitude'), self.nimConfig.toneAmplitude))
            if path.exists('/proc/stb/frontend/%d/use_scpc_optimized_search_range' % self.nim.slot) and config.usage.setup_level.index >= 2:
                self.list.append(getConfigListEntry(_('SCPC optimized search range'), self.nimConfig.scpcSearchRange))
        elif self.nim.isCompatible('DVB-C'):
            self.configMode = getConfigListEntry(_('Configuration mode'), self.nimConfig.configMode)
            self.list.append(self.configMode)
            if self.nimConfig.configMode.value == 'enabled':
                self.list.append(getConfigListEntry(_('Network ID'), self.nimConfig.cable.scan_networkid))
                self.cableScanType = getConfigListEntry(_('Used service scan type'), self.nimConfig.cable.scan_type)
                self.list.append(self.cableScanType)
                if self.nimConfig.cable.scan_type.value == 'provider':
                    self.list.append(getConfigListEntry(_('Provider to scan'), self.nimConfig.cable.scan_provider))
                else:
                    if self.nimConfig.cable.scan_type.value == 'bands':
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'EU VHF I', self.nimConfig.cable.scan_band_EU_VHF_I))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'EU MID', self.nimConfig.cable.scan_band_EU_MID))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'EU VHF III', self.nimConfig.cable.scan_band_EU_VHF_III))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'EU UHF IV', self.nimConfig.cable.scan_band_EU_UHF_IV))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'EU UHF V', self.nimConfig.cable.scan_band_EU_UHF_V))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'EU SUPER', self.nimConfig.cable.scan_band_EU_SUPER))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'EU HYPER', self.nimConfig.cable.scan_band_EU_HYPER))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'US LOW', self.nimConfig.cable.scan_band_US_LOW))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'US MID', self.nimConfig.cable.scan_band_US_MID))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'US HIGH', self.nimConfig.cable.scan_band_US_HIGH))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'US SUPER', self.nimConfig.cable.scan_band_US_SUPER))
                        self.list.append(getConfigListEntry(_('Scan %s band') % 'US HYPER', self.nimConfig.cable.scan_band_US_HYPER))
                    elif self.nimConfig.cable.scan_type.value == 'steps':
                        self.list.append(getConfigListEntry(_('Frequency scan step size(khz)'), self.nimConfig.cable.scan_frequency_steps))
                    self.list.append(getConfigListEntry(_('Scan %s') % 'QAM16', self.nimConfig.cable.scan_mod_qam16))
                    self.list.append(getConfigListEntry(_('Scan %s') % 'QAM32', self.nimConfig.cable.scan_mod_qam32))
                    self.list.append(getConfigListEntry(_('Scan %s') % 'QAM64', self.nimConfig.cable.scan_mod_qam64))
                    self.list.append(getConfigListEntry(_('Scan %s') % 'QAM128', self.nimConfig.cable.scan_mod_qam128))
                    self.list.append(getConfigListEntry(_('Scan %s') % 'QAM256', self.nimConfig.cable.scan_mod_qam256))
                    self.list.append(getConfigListEntry(_('Scan %s') % 'SR6900', self.nimConfig.cable.scan_sr_6900))
                    self.list.append(getConfigListEntry(_('Scan %s') % 'SR6875', self.nimConfig.cable.scan_sr_6875))
                    self.list.append(getConfigListEntry(_('Scan additional SR'), self.nimConfig.cable.scan_sr_ext1))
                    self.list.append(getConfigListEntry(_('Scan additional SR'), self.nimConfig.cable.scan_sr_ext2))
            self.have_advanced = False
        elif self.nim.isCompatible('DVB-T'):
            self.configMode = getConfigListEntry(_('Configuration mode'), self.nimConfig.configMode)
            self.list.append(self.configMode)
            self.have_advanced = False
            if self.nimConfig.configMode.value == 'enabled':
                self.list.append(getConfigListEntry(_('Terrestrial provider'), self.nimConfig.terrestrial))
                self.list.append(getConfigListEntry(_('Enable 5V for active antenna'), self.nimConfig.terrestrial_5V))
        else:
            self.have_advanced = False
        self['config'].list = self.list
        self['config'].l.setList(self.list)
        return
Beispiel #21
0
	def createSetup(self):
		print "Creating setup"
		self.list = [ ]

		self.multiType = None
		self.configMode = None
		self.diseqcModeEntry = None
		self.advancedSatsEntry = None
		self.advancedLnbsEntry = None
		self.advancedDiseqcMode = None
		self.advancedUsalsEntry = None
		self.advancedLof = None
		self.advancedPowerMeasurement = None
		self.turningSpeed = None
		self.turnFastEpochBegin = None
		self.turnFastEpochEnd = None
		self.uncommittedDiseqcCommand = None
		self.cableScanType = None
		self.have_advanced = False
		self.advancedUnicable = None
		self.advancedType = None
		self.advancedManufacturer = None
		self.advancedSCR = None
		self.advancedConnected = None

		if self.nim.isMultiType():
			try:
				multiType = self.nimConfig.multiType
				self.multiType = getConfigListEntry(_("Tuner type"), multiType)
				self.list.append(self.multiType)
			except:
				self.multiType = None

		if self.nim.isCompatible("DVB-S"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)

			if self.nimConfig.configMode.getValue() == "simple":			#simple setup
				self.diseqcModeEntry = getConfigListEntry(pgettext("Satellite configuration mode", "Mode"), self.nimConfig.diseqcMode)
				self.list.append(self.diseqcModeEntry)
				if self.nimConfig.diseqcMode.getValue() in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
					self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.getValue())
				if self.nimConfig.diseqcMode.getValue() == "positioner":
					self.createPositionerSetup(self.list)
			elif self.nimConfig.configMode.getValue() == "equal":
				choices = []
				nimlist = nimmanager.canEqualTo(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.getValue() == "satposdepends":
				choices = []
				nimlist = nimmanager.canDependOn(self.nim.slot)
				for id in nimlist:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.getValue() == "loopthrough":
				choices = []
				print "connectable to:", nimmanager.canConnectTo(self.slotid)
				connectable = nimmanager.canConnectTo(self.slotid)
				for id in connectable:
					choices.append((str(id), nimmanager.getNimDescription(id)))
				self.nimConfig.connectedTo.setChoices(choices)
				self.list.append(getConfigListEntry(_("Connected to"), self.nimConfig.connectedTo))
			elif self.nimConfig.configMode.getValue() == "nothing":
				pass
			elif self.nimConfig.configMode.getValue() == "advanced": # advanced
				# SATs
				self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
				self.list.append(self.advancedSatsEntry)
				cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
				satlist = self.nimConfig.advanced.sat.keys()
				if cur_orb_pos is not None:
					if cur_orb_pos not in satlist:
						cur_orb_pos = satlist[0]
					currSat = self.nimConfig.advanced.sat[cur_orb_pos]
					self.fillListWithAdvancedSatEntrys(currSat)
				self.have_advanced = True
			if path.exists("/proc/stb/frontend/%d/tone_amplitude" % self.nim.slot) and config.usage.setup_level.index >= 2: # expert
				self.list.append(getConfigListEntry(_("Tone amplitude"), self.nimConfig.toneAmplitude))
		elif self.nim.isCompatible("DVB-C"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			if self.nimConfig.configMode.getValue() == "enabled":
				self.list.append(getConfigListEntry(_("Network ID"), self.nimConfig.cable.scan_networkid))
				self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
				self.list.append(self.cableScanType)
				if self.nimConfig.cable.scan_type.getValue() == "provider":
					self.list.append(getConfigListEntry(_("Provider to scan"), self.nimConfig.cable.scan_provider))
				else:
					if self.nimConfig.cable.scan_type.getValue() == "bands":
						# TRANSLATORS: option name, indicating which type of (DVB-C) band should be scanned. The name of the band is printed in '%s'. E.g.: 'Scan EU MID band'
						self.list.append(getConfigListEntry(_("Scan %s band") % ("EU VHF I"), self.nimConfig.cable.scan_band_EU_VHF_I))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("EU MID"), self.nimConfig.cable.scan_band_EU_MID))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("EU VHF III"), self.nimConfig.cable.scan_band_EU_VHF_III))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("EU UHF IV"), self.nimConfig.cable.scan_band_EU_UHF_IV))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("EU UHF V"), self.nimConfig.cable.scan_band_EU_UHF_V))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("EU SUPER"), self.nimConfig.cable.scan_band_EU_SUPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("EU HYPER"), self.nimConfig.cable.scan_band_EU_HYPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("US LOW"), self.nimConfig.cable.scan_band_US_LOW))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("US MID"), self.nimConfig.cable.scan_band_US_MID))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("US HIGH"), self.nimConfig.cable.scan_band_US_HIGH))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("US SUPER"), self.nimConfig.cable.scan_band_US_SUPER))
						self.list.append(getConfigListEntry(_("Scan %s band") % ("US HYPER"), self.nimConfig.cable.scan_band_US_HYPER))
					elif self.nimConfig.cable.scan_type.getValue() == "steps":
						self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
					# TRANSLATORS: option name, indicating which type of (DVB-C) modulation should be scanned. The modulation type is printed in '%s'. E.g.: 'Scan QAM16'
					self.list.append(getConfigListEntry(_("Scan %s") % ("QAM16"), self.nimConfig.cable.scan_mod_qam16))
					self.list.append(getConfigListEntry(_("Scan %s") % ("QAM32"), self.nimConfig.cable.scan_mod_qam32))
					self.list.append(getConfigListEntry(_("Scan %s") % ("QAM64"), self.nimConfig.cable.scan_mod_qam64))
					self.list.append(getConfigListEntry(_("Scan %s") % ("QAM128"), self.nimConfig.cable.scan_mod_qam128))
					self.list.append(getConfigListEntry(_("Scan %s") % ("QAM256"), self.nimConfig.cable.scan_mod_qam256))
					self.list.append(getConfigListEntry(_("Scan %s") % ("SR6900"), self.nimConfig.cable.scan_sr_6900))
					self.list.append(getConfigListEntry(_("Scan %s") % ("SR6875"), self.nimConfig.cable.scan_sr_6875))
					self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
					self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
			self.have_advanced = False
		elif self.nim.isCompatible("DVB-T"):
			self.configMode = getConfigListEntry(_("Configuration mode"), self.nimConfig.configMode)
			self.list.append(self.configMode)
			self.have_advanced = False
			if self.nimConfig.configMode.getValue() == "enabled":
				self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrestrial))
				self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrestrial_5V))
		else:
			self.have_advanced = False
		self["config"].list = self.list
		self["config"].l.setList(self.list)
Beispiel #22
0
    def fillListWithAdvancedSatEntrys(self, Sat):
        lnbnum = int(Sat.lnb.value)
        currLnb = self.nimConfig.advanced.lnb[lnbnum]

        if isinstance(currLnb, ConfigNothing):
            currLnb = None

        # LNBs
        self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
        self.list.append(self.advancedLnbsEntry)

        if currLnb:
            self.list.append(getConfigListEntry(_("Priority"), currLnb.prio))
            self.advancedLof = getConfigListEntry(_("Type"), currLnb.lof)
            self.list.append(self.advancedLof)
            if currLnb.lof.value == "user_defined":
                self.list.append(getConfigListEntry(_("LOF/L"), currLnb.lofl))
                self.list.append(getConfigListEntry(_("LOF/H"), currLnb.lofh))
                self.list.append(
                    getConfigListEntry(_("Threshold"), currLnb.threshold))


#			self.list.append(getConfigListEntry(_("12V Output"), currLnb.output_12v))

            if currLnb.lof.value == "unicable":
                self.advancedUnicable = getConfigListEntry(
                    "Unicable " + _("Configuration Mode"), currLnb.unicable)
                self.list.append(self.advancedUnicable)
                if currLnb.unicable.value == "unicable_user":
                    product_name = "unicable_user"
                    self._checkUnicableLofUpdateRequired(
                        currLnb, self._lastUnicableManufacturerName,
                        product_name)
                    self._lastUnicableProductName = product_name

                    self.list.append(
                        getConfigListEntry(_("Mode"), currLnb.satcruser_mode))
                    self.advancedSCR = getConfigListEntry(
                        _("Channel"), currLnb.satcruser)
                    self.list.append(self.advancedSCR)
                    self.list.append(
                        getConfigListEntry(
                            _("Frequency"),
                            currLnb.satcrvcouser[currLnb.satcruser.index]))
                    self.list.append(
                        getConfigListEntry(_("LOF/L"), currLnb.lofl))
                    self.list.append(
                        getConfigListEntry(_("LOF/H"), currLnb.lofh))
                    self.list.append(
                        getConfigListEntry(_("Threshold"), currLnb.threshold))
                elif currLnb.unicable.value == "unicable_matrix":
                    try:
                        manufacturer_name = currLnb.unicableMatrix.manufacturer.value
                        product_name = currLnb.unicableMatrix.product.value
                    except:
                        manufacturer_name = product_name = "unicable_matrix"

                    self._checkUnicableLofUpdateRequired(
                        currLnb, manufacturer_name, product_name)
                    self._lastUnicableManufacturerName = manufacturer_name
                    self._lastUnicableProductName = product_name

                    matrixConfig = currLnb.unicableMatrix
                    self.advancedManufacturer = getConfigListEntry(
                        _("Manufacturer"), matrixConfig.manufacturer)
                    self.advancedType = getConfigListEntry(
                        _("Type"), matrixConfig.product)
                    self.list.append(self.advancedManufacturer)
                    self.list.append(self.advancedType)
                    if isinstance(matrixConfig.scrs, ConfigNothing):
                        self.advancedSCR = getConfigListEntry(
                            _("Channel"), matrixConfig.scr)
                        self.list.append(self.advancedSCR)
                        self.list.append(
                            getConfigListEntry(
                                _("Frequency"),
                                matrixConfig.vco[matrixConfig.scr.index]))
                    else:
                        self.list.append(
                            getConfigListEntry(_("Usable SCRs"),
                                               matrixConfig.scrs))
                elif currLnb.unicable.value == "unicable_lnb":
                    try:
                        product_name = currLnb.unicableLnb.product.value
                        manufacturer_name = currLnb.unicableLnb.manufacturer.value
                    except:
                        manufacturer_name = product_name = "unicable_lnb"
                    self._checkUnicableLofUpdateRequired(
                        currLnb, manufacturer_name, product_name)
                    self._lastUnicableManufacturerName = manufacturer_name
                    self._lastUnicableProductName = product_name

                    lnbConfig = currLnb.unicableLnb
                    self.advancedManufacturer = getConfigListEntry(
                        _("Manufacturer"), lnbConfig.manufacturer)
                    self.advancedType = getConfigListEntry(
                        _("Type"), lnbConfig.product)
                    self.list.append(self.advancedManufacturer)
                    self.list.append(self.advancedType)
                    if isinstance(lnbConfig.scrs, ConfigNothing):
                        self.advancedSCR = getConfigListEntry(
                            _("Channel"), lnbConfig.scr)
                        self.list.append(self.advancedSCR)
                        self.list.append(
                            getConfigListEntry(
                                _("Frequency"),
                                lnbConfig.vco[lnbConfig.scr.index]))
                    else:
                        self.list.append(
                            getConfigListEntry(_("Usable SCRs"),
                                               lnbConfig.scrs))
                self.unicableUsePinEntry = getConfigListEntry(
                    _("Use PIN"), currLnb.unicable_use_pin)
                self.list.append(self.unicableUsePinEntry)
                if currLnb.unicable_use_pin.value:
                    self.list.append(
                        getConfigListEntry(_("PIN"), currLnb.unicable_pin))

                choices = []
                connectable = nimmanager.canConnectTo(self.slotid)
                for id, type in connectable:
                    choices.append((str(id), nimmanager.getNimDescription(id)))
                if len(choices):
                    self.advancedConnected = getConfigListEntry(
                        _("connected"),
                        self.nimConfig.advanced.unicableconnected)
                    self.list.append(self.advancedConnected)
                    if self.nimConfig.advanced.unicableconnected.value == True:
                        self.nimConfig.advanced.unicableconnectedTo.setChoices(
                            choices)
                        self.list.append(
                            getConfigListEntry(
                                _("Connected to"),
                                self.nimConfig.advanced.unicableconnectedTo))
                if lnbnum >= 33:
                    choices = []
                    dependable = nimmanager.canDependOn(self.slotid)
                    for id, type in dependable:
                        choices.append(
                            (str(id), nimmanager.getNimDescription(id)))
                    if len(choices):
                        self.advancedDepends = getConfigListEntry(
                            _("Positioner depends"),
                            self.nimConfig.advanced.unicabledepends)
                        self.list.append(self.advancedDepends)
                        if self.nimConfig.advanced.unicabledepends.value == True:
                            self.nimConfig.advanced.unicabledependsOn.setChoices(
                                choices)
                            self.list.append(
                                getConfigListEntry(
                                    _("Depends on"),
                                    self.nimConfig.advanced.unicabledependsOn))
            else:  #kein Unicable
                self.list.append(
                    getConfigListEntry(_("Voltage mode"), Sat.voltage))
                self.list.append(
                    getConfigListEntry(_("Tone mode"), Sat.tonemode))

            self.list.append(
                getConfigListEntry(_("Increased voltage"),
                                   currLnb.increased_voltage))

            if lnbnum < 33:
                self.advancedDiseqcMode = getConfigListEntry(
                    _("DiSEqC mode"), currLnb.diseqcMode)
                self.list.append(self.advancedDiseqcMode)
            if currLnb.diseqcMode.value != "none":
                self.list.append(
                    getConfigListEntry(_("Toneburst"), currLnb.toneburst))
                self.list.append(
                    getConfigListEntry(_("Committed DiSEqC command"),
                                       currLnb.commitedDiseqcCommand))
                self.list.append(
                    getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
                self.list.append(
                    getConfigListEntry(_("Sequence repeat"),
                                       currLnb.sequenceRepeat))
                if currLnb.diseqcMode.value == "1_0":
                    self.list.append(
                        getConfigListEntry(_("Command order"),
                                           currLnb.commandOrder1_0))
                else:
                    if currLnb.uncommittedDiseqcCommand.index:
                        if currLnb.commandOrder.value == "ct":
                            currLnb.commandOrder.value = "cut"
                        elif currLnb.commandOrder.value == "tc":
                            currLnb.commandOrder.value = "tcu"
                    else:
                        if currLnb.commandOrder.index & 1:
                            currLnb.commandOrder.value = "tc"
                        else:
                            currLnb.commandOrder.value = "ct"
                    self.list.append(
                        getConfigListEntry(_("Command order"),
                                           currLnb.commandOrder))
                    self.uncommittedDiseqcCommand = getConfigListEntry(
                        _("Uncommitted DiSEqC command"),
                        currLnb.uncommittedDiseqcCommand)
                    self.list.append(self.uncommittedDiseqcCommand)
                    self.list.append(
                        getConfigListEntry(_("DiSEqC repeats"),
                                           currLnb.diseqcRepeats))
                if currLnb.diseqcMode.value == "1_2" and (
                        not self.advancedDepends
                        or not self.nimConfig.advanced.unicabledepends.value):
                    self.list.append(
                        getConfigListEntry(_("Longitude"), currLnb.longitude))
                    self.list.append(
                        getConfigListEntry(" ", currLnb.longitudeOrientation))
                    self.list.append(
                        getConfigListEntry(_("Latitude"), currLnb.latitude))
                    self.list.append(
                        getConfigListEntry(" ", currLnb.latitudeOrientation))
                    if SystemInfo["CanMeasureFrontendInputPower"] & (
                            1 << self.slotid):
                        self.advancedPowerMeasurement = getConfigListEntry(
                            _("Use Power Measurement"),
                            currLnb.powerMeasurement)
                        self.list.append(self.advancedPowerMeasurement)
                        if currLnb.powerMeasurement.value:
                            self.list.append(
                                getConfigListEntry(_("Power threshold in mA"),
                                                   currLnb.powerThreshold))
                            self.turningSpeed = getConfigListEntry(
                                _("Rotor turning speed"), currLnb.turningSpeed)
                            self.list.append(self.turningSpeed)
                            if currLnb.turningSpeed.value == "fast epoch":
                                self.turnFastEpochBegin = getConfigListEntry(
                                    _("Begin time"), currLnb.fastTurningBegin)
                                self.turnFastEpochEnd = getConfigListEntry(
                                    _("End time"), currLnb.fastTurningEnd)
                                self.list.append(self.turnFastEpochBegin)
                                self.list.append(self.turnFastEpochEnd)
                    else:
                        if currLnb.powerMeasurement.value:
                            currLnb.powerMeasurement.value = False
                            currLnb.powerMeasurement.save()
                    if not currLnb.powerMeasurement.value:
                        self.list.append(
                            getConfigListEntry(
                                _("Rotor speed in degree per second"),
                                currLnb.degreePerSecond))
                    self.advancedUsalsEntry = getConfigListEntry(
                        _("Use usals for this sat"), Sat.usals)
                    self.list.append(self.advancedUsalsEntry)
                    if not Sat.usals.value:
                        self.list.append(
                            getConfigListEntry(_("Stored position"),
                                               Sat.rotorposition))
                    if config.usage.setup_level.index >= 2:  # expert
                        self.list.append(
                            getConfigListEntry(
                                _("Rotor is exclusively controlled by this dreambox"
                                  ), self.nimConfig.positionerExclusively))