Пример #1
0
 def PositionerMain(self):
     nimList = nimmanager.getNimListOfType("DVB-S")
     if len(nimList) == 0:
         self.session.open(MessageBox, _("No positioner capable frontend found."), MessageBox.TYPE_ERROR)
     else:
         if len(NavigationInstance.instance.getRecordings()) > 0:
             self.session.open(
                 MessageBox,
                 _(
                     "A recording is currently running. Please stop the recording before trying to configure the positioner."
                 ),
                 MessageBox.TYPE_ERROR,
             )
         else:
             usableNims = []
             for x in nimList:
                 configured_rotor_sats = nimmanager.getRotorSatListForNim(x)
                 if len(configured_rotor_sats) != 0:
                     usableNims.append(x)
             if len(usableNims) == 1:
                 self.session.open(PositionerSetup, usableNims[0])
             elif len(usableNims) > 1:
                 self.session.open(RotorNimSelection)
             else:
                 self.session.open(
                     MessageBox, _("No tuner is configured for use with a diseqc positioner!"), MessageBox.TYPE_ERROR
                 )
Пример #2
0
 def isRotorSat(self, slot, orb_pos):
     rotorSatsForNim = nimmanager.getRotorSatListForNim(slot)
     if len(rotorSatsForNim) > 0:
         for sat in rotorSatsForNim:
             if sat[0] == orb_pos:
                 return True
     return False
Пример #3
0
def PositionerMain(session, **kwargs):
    nimList = nimmanager.getNimListOfType("DVB-S")
    if len(nimList) == 0:
        session.open(MessageBox, _("No positioner capable frontend found."),
                     MessageBox.TYPE_ERROR)
    else:
        if session.nav.RecordTimer.isRecording():
            session.open(
                MessageBox,
                _("A recording is currently running. Please stop the recording before trying to configure the positioner."
                  ), MessageBox.TYPE_ERROR)
        else:
            usableNims = []
            for x in nimList:
                configured_rotor_sats = nimmanager.getRotorSatListForNim(x)
                if len(configured_rotor_sats) != 0:
                    usableNims.append(x)
            if len(usableNims) == 1:
                session.open(PositionerSetup, usableNims[0])
            elif len(usableNims) > 1:
                session.open(RotorNimSelection)
            else:
                session.open(
                    MessageBox,
                    _("No tuner is configured for use with a diseqc positioner!"
                      ), MessageBox.TYPE_ERROR)
Пример #4
0
    def isMotorizedTuner(self):
        for x in nimmanager.nim_slots:
            for sat in nimmanager.getRotorSatListForNim(x.slot):
                if sat[0]:
                    return (True, x.slot)

        return (False, None)
Пример #5
0
 def isRotorSat(self, slot, orb_pos):
     rotorSatsForNim = nimmanager.getRotorSatListForNim(slot)
     if len(rotorSatsForNim) > 0:
         for sat in rotorSatsForNim:
             if sat[0] == orb_pos:
                 return True
     return False
Пример #6
0
    def PositionerMain(self):
        nimList = nimmanager.getNimListOfType('DVB-S')
        if len(nimList) == 0:
            self.session.open(MessageBox,
                              _('No positioner capable frontend found.'),
                              MessageBox.TYPE_ERROR)
        elif len(
                NavigationInstance.instance.getRecordings(
                    False, pNavigation.isAnyRecording)) > 0:
            self.session.open(
                MessageBox,
                _('A recording is currently running. Please stop the recording before trying to configure the positioner.'
                  ), MessageBox.TYPE_ERROR)
        else:
            usableNims = []
            for x in nimList:
                configured_rotor_sats = nimmanager.getRotorSatListForNim(x)
                if len(configured_rotor_sats) != 0:
                    usableNims.append(x)

            if len(usableNims) == 1:
                self.session.open(PositionerSetup, usableNims[0])
            elif len(usableNims) > 1:
                self.session.open(RotorNimSelection)
            else:
                self.session.open(
                    MessageBox,
                    _('No tuner is configured for use with a diseqc positioner!'
                      ), MessageBox.TYPE_ERROR)
Пример #7
0
	def startDishMovingIfRotorSat(self):
		self["rotorstatus"].setText("")
		orb_pos = self.getOrbPos()
		self.orb_pos = 0
		self.feid = int(self.scan_nims.value)
		rotorSatsForNim = nimmanager.getRotorSatListForNim(self.feid)
		if len(rotorSatsForNim) < 1:
			self.releaseFrontend() # stop dish if moving due to previous call
			return False
		rotorSat = False
		for sat in rotorSatsForNim:
			if sat[0] == orb_pos:
				rotorSat = True
				break
		if not rotorSat:
			self.releaseFrontend() # stop dish if moving due to previous call
			return False
		tps = nimmanager.getTransponders(orb_pos)
		if len(tps) < 1:
			return False
		if Lastrotorposition is not None and config.misc.lastrotorposition.value != 9999:
			text = _("Rotor: ") + self.OrbToStr(config.misc.lastrotorposition.value)
			self["rotorstatus"].setText(text)
		# freq, sr, pol, fec, inv, orb, sys, mod, roll, pilot 
		transponder = (tps[0][1] / 1000, tps[0][2] / 1000, tps[0][3], tps[0][4], 2, orb_pos, tps[0][5], tps[0][6], tps[0][8], tps[0][9])
		if not self.prepareFrontend():
			return False
		self.tuner.tune(transponder)
		self.orb_pos = orb_pos
		if Lastrotorposition is not None and config.misc.lastrotorposition.value != 9999:
			self.statusTimer.stop()
			self.startStatusTimer()
		return True
Пример #8
0
def getUsableRotorNims(only_first=False):
    usableRotorNims = []
    nimList = nimmanager.getNimListOfType("DVB-S")
    for nim in nimList:
        if nimmanager.getRotorSatListForNim(nim, only_first=only_first):
            usableRotorNims.append(nim)
            if only_first:
                break
    return usableRotorNims
Пример #9
0
	def isSatRotorMode(self):
		satRotorMode = False
		tuner = self.getCurrentTuner()
		if tuner is not None:
			for sat in nimmanager.getRotorSatListForNim(tuner):
				if sat[0] == self.cur_orbpos:
					satRotorMode = True
					break
		return satRotorMode
Пример #10
0
	def isSatRotorMode(self):
		satRotorMode = False
		tuner = self.getCurrentTuner()
		if tuner is not None:
			for sat in nimmanager.getRotorSatListForNim(tuner):
				if sat[0] == self.cur_orbpos:
					satRotorMode = True
					break
		return satRotorMode
Пример #11
0
	def isMotorizedTuner(self):
		try:
			for x in nimmanager.nim_slots:
				for sat in nimmanager.getRotorSatListForNim(x.slot):
					if sat[0]:
						return (True, x.slot)
		except:
			pass
		return (False, None)
Пример #12
0
	def createConfig(self, foo):
		global tuning
		if not tuning:
			tuning = ConfigSubsection()
			tuning.type = ConfigSelection(
				default = "manual_transponder",
				choices = { "manual_transponder" : _("Manual transponder"),
							"predefined_transponder" : _("Predefined transponder") } )
			tuning.sat = ConfigSatlist(list=nimmanager.getRotorSatListForNim(self.feid))
			tuning.sat.addNotifier(self.tuningSatChanged)
			self.updateTransponders()
		orb_pos = self.fe_data.get("orbital_position", None)
		if orb_pos is not None:
			for x in nimmanager.getRotorSatListForNim(self.feid):
				opos = str(orb_pos)
				if x[0] == orb_pos and tuning.sat.value != opos:
					tuning.sat.value = opos
			del self.fe_data["orbital_position"]
		ScanSetup.createConfig(self, self.fe_data)
Пример #13
0
	def createConfig(self, foo):
		global tuning
		if not tuning:
			tuning = ConfigSubsection()
			tuning.type = ConfigSelection(
				default = "manual_transponder",
				choices = { "manual_transponder" : _("Manual transponder"),
							"predefined_transponder" : _("Predefined transponder") } )
			tuning.sat = ConfigSatlist(list=nimmanager.getRotorSatListForNim(self.feid))
			tuning.sat.addNotifier(self.tuningSatChanged)
			self.updateTransponders()
		orb_pos = self.fe_data.get("orbital_position", None)
		if orb_pos is not None:
			for x in nimmanager.getRotorSatListForNim(self.feid):
				opos = str(orb_pos)
				if x[0] == orb_pos and tuning.sat.value != opos:
					tuning.sat.value = opos
			del self.fe_data["orbital_position"]
		ScanSetup.createConfig(self, self.fe_data)
Пример #14
0
	def getActiveTuner(self):
		if not eDVBSatelliteEquipmentControl.getInstance().isRotorMoving():
			service = self.source.service
			feinfo = service and service.frontendInfo()
			tuner = feinfo and feinfo.getAll(True)
			if tuner:
				num = tuner.get("tuner_number")
				orb_pos = tuner.get("orbital_position")
				if isinstance(num, int) and orb_pos:
					satList = nimmanager.getRotorSatListForNim(num)
					for sat in satList:
						if sat[0] == orb_pos:
							return num
		return ""
Пример #15
0
def showrotorpositionChoicesUpdate(update=False):
	choiceslist = [("no", _("no")), ("yes", _("yes")), ("withtext", _("with text")), ("tunername", _("with tuner name"))]
	count = 0
	for x in nimmanager.nim_slots:
		if nimmanager.getRotorSatListForNim(x.slot, only_first=True):
			choiceslist.append((str(x.slot), x.getSlotName() + _(" (auto detection)")))
			count += 1
	if count > 1:
		choiceslist.append(("all", _("all tuners") + _(" (auto detection)")))
		choiceslist.remove(("tunername", _("with tuner name")))
	if not update:
		config.misc.showrotorposition = ConfigSelection(default="no", choices=choiceslist)
	else:
		config.misc.showrotorposition.setChoices(choiceslist, "no")
	SystemInfo["isRotorTuner"] = count > 0
Пример #16
0
	def __init__(self, session):
		Screen.__init__(self, session)

		nimlist = nimmanager.getNimListOfType("DVB-S")
		nimMenuList = []
		for x in nimlist:
			if len(nimmanager.getRotorSatListForNim(x)) != 0:
				nimMenuList.append((nimmanager.nim_slots[x].friendly_full_description, x))

		self["nimlist"] = MenuList(nimMenuList)

		self["actions"] = ActionMap(["OkCancelActions"],
		{
			"ok": self.okbuttonClick ,
			"cancel": self.close
		}, -1)
Пример #17
0
	def __init__(self, session):
		Screen.__init__(self, session)

		nimlist = nimmanager.getNimListOfType("DVB-S")
		nimMenuList = []
		for x in nimlist:
			if len(nimmanager.getRotorSatListForNim(x)) != 0:
				nimMenuList.append((nimmanager.nim_slots[x].friendly_full_description, x))

		self["nimlist"] = MenuList(nimMenuList)

		self["actions"] = ActionMap(["OkCancelActions"],
		{
			"ok": self.okbuttonClick ,
			"cancel": self.close
		}, -1)
Пример #18
0
	def __serviceStarted(self):
		if self.__state == self.STATE_SHOWN:
			self.hide()
		if not self.showdish:
			return

		service = self.session.nav.getCurrentService()
		info = service and service.info()
		data = info and info.getInfoObject(iServiceInformation.sTransponderData)
		if not data or data == -1:
			return

		tuner_type = data.get("tuner_type")
		if tuner_type and "DVB-S" in tuner_type:
			cur_orbpos = data.get("orbital_position", INVALID_POSITION)
			tuner_number = self.getCurrentTuner()
			if tuner_number is not None:
				if cur_orbpos in nimmanager.getRotorSatListForNim(tuner_number):
					self.cur_orbpos = cur_orbpos
					self.cur_polar  = data.get("polarization", 0)
					self.rotorTimer.start(500, False)
Пример #19
0
	def PositionerMain(self):
		if getBoxType() == '7300s':
			self.session.open(MessageBox, _("No Positionerplugin found please Check it!"), MessageBox.TYPE_ERROR)	
		else:
			from Plugins.SystemPlugins.PositionerSetup.plugin import PositionerSetup, RotorNimSelection	
			nimList = nimmanager.getNimListOfType("DVB-S")
			if len(nimList) == 0:
				self.session.open(MessageBox, _("No positioner capable frontend found."), MessageBox.TYPE_ERROR)
			else:
				if len(NavigationInstance.instance.getRecordings()) > 0:
					self.session.open(MessageBox, _("A recording is currently running. Please stop the recording before trying to configure the positioner."), MessageBox.TYPE_ERROR)
				else:
					usableNims = []
					for x in nimList:
						configured_rotor_sats = nimmanager.getRotorSatListForNim(x)
						if len(configured_rotor_sats) != 0:
							usableNims.append(x)
					if len(usableNims) == 1:
						self.session.open(PositionerSetup, usableNims[0])
					elif len(usableNims) > 1:
						self.session.open(RotorNimSelection)
					else:
						self.session.open(MessageBox, _("No tuner is configured for use with a diseqc positioner!"), MessageBox.TYPE_ERROR)
Пример #20
0
    def __serviceStarted(self):
        if self.__state == self.STATE_SHOWN:
            self.hide()
        if not self.showdish:
            return

        service = self.session.nav.getCurrentService()
        info = service and service.info()
        data = info and info.getInfoObject(
            iServiceInformation.sTransponderData)
        if not data or data == -1:
            return

        tuner_type = data.get("tuner_type")
        if tuner_type and "DVB-S" in tuner_type:
            cur_orbpos = data.get("orbital_position", INVALID_POSITION)
            tuner_number = self.getCurrentTuner()
            if tuner_number is not None:
                if cur_orbpos in nimmanager.getRotorSatListForNim(
                        tuner_number):
                    self.cur_orbpos = cur_orbpos
                    self.cur_polar = data.get("polarization", 0)
                    self.rotorTimer.start(500, False)
Пример #21
0
	def startDishMovingIfRotorSat(self):
		orb_pos = self.getOrbPos()
		self.feid = int(self.scan_nims.value)
		rotorSatsForNim = nimmanager.getRotorSatListForNim(self.feid)
		if len(rotorSatsForNim) < 1:
			self.releaseFrontend() # stop dish if moving due to previous call
			return False
		rotorSat = False
		for sat in rotorSatsForNim:
			if sat[0] == orb_pos:
				rotorSat = True
				break
		if not rotorSat:
			self.releaseFrontend() # stop dish if moving due to previous call
			return False
		tps = nimmanager.getTransponders(orb_pos)
		if len(tps) < 1:
			return False
		# freq, sr, pol, fec, inv, orb, sys, mod, roll, pilot 
		transponder = (tps[0][1] / 1000, tps[0][2] / 1000, tps[0][3], tps[0][4], 2, orb_pos, tps[0][5], tps[0][6], tps[0][8], tps[0][9])
		if not self.prepareFrontend():
			return False
		self.tuner.tune(transponder)
		return True
Пример #22
0
	def startDishMovingIfRotorSat(self):
		orb_pos = self.getOrbPos()
		self.feid = int(self.scan_nims.value)
		rotorSatsForNim = nimmanager.getRotorSatListForNim(self.feid)
		if len(rotorSatsForNim) < 1:
			self.releaseFrontend() # stop dish if moving due to previous call
			return False
		rotorSat = False
		for sat in rotorSatsForNim:
			if sat[0] == orb_pos:
				rotorSat = True
				break
		if not rotorSat:
			self.releaseFrontend() # stop dish if moving due to previous call
			return False
		tps = nimmanager.getTransponders(orb_pos)
		if len(tps) < 1:
			return False
		# freq, sr, pol, fec, inv, orb, sys, mod, roll, pilot 
		transponder = (tps[0][1] / 1000, tps[0][2] / 1000, tps[0][3], tps[0][4], 2, orb_pos, tps[0][5], tps[0][6], tps[0][8], tps[0][9])
		if not self.prepareFrontend():
			return False
		self.tuner.tune(transponder)
		return True
Пример #23
0
    def createConfig(self, frontendData):
        satlist = nimmanager.getRotorSatListForNim(self.feid)
        orb_pos = self.fe_data.get("orbital_position", None)
        self.tuning = ConfigSubsection()
        self.tuning.type = ConfigSelection(default="manual_transponder",
                                           choices={
                                               "manual_transponder":
                                               _("Manual transponder"),
                                               "predefined_transponder":
                                               _("Predefined transponder")
                                           })
        self.tuning.sat = ConfigSatlist(list=satlist)
        if orb_pos is not None:
            for x in satlist:
                opos = str(orb_pos)
                if x[0] == orb_pos and self.tuning.sat.value != opos:
                    self.tuning.sat.value = opos
            del self.fe_data["orbital_position"]

        self.updateTransponders()

        defaultSat = {
            "orbpos": 192,
            "system": eDVBFrontendParametersSatellite.System_DVB_S,
            "frequency": 11836,
            "inversion": eDVBFrontendParametersSatellite.Inversion_Unknown,
            "symbolrate": 27500,
            "polarization":
            eDVBFrontendParametersSatellite.Polarisation_Horizontal,
            "fec": eDVBFrontendParametersSatellite.FEC_Auto,
            "fec_s2": eDVBFrontendParametersSatellite.FEC_9_10,
            "fec_s2x_qpsk": eDVBFrontendParametersSatellite.FEC_13_45,
            "fec_s2x_8psk": eDVBFrontendParametersSatellite.FEC_23_36,
            "fec_s2x_8apsk": eDVBFrontendParametersSatellite.FEC_5_9_L,
            "fec_s2x_16apsk": eDVBFrontendParametersSatellite.FEC_1_2_L,
            "fec_s2x_32apsk": eDVBFrontendParametersSatellite.FEC_2_3_L,
            "modulation": eDVBFrontendParametersSatellite.Modulation_QPSK,
            "modulation_s2x": eDVBFrontendParametersSatellite.Modulation_QPSK,
            "is_id": -1,
            "pls_mode": eDVBFrontendParametersSatellite.PLS_Unknown,
            "pls_code": 0
        }

        if frontendData is not None:
            ttype = frontendData.get("tuner_type", "UNKNOWN")
            defaultSat["system"] = frontendData.get(
                "system", eDVBFrontendParametersSatellite.System_DVB_S)
            defaultSat["frequency"] = frontendData.get("frequency", 0) / 1000
            defaultSat["inversion"] = frontendData.get(
                "inversion", eDVBFrontendParametersSatellite.Inversion_Unknown)
            defaultSat["symbolrate"] = frontendData.get("symbol_rate",
                                                        0) / 1000
            defaultSat["polarization"] = frontendData.get(
                "polarization",
                eDVBFrontendParametersSatellite.Polarisation_Horizontal)
            defaultSat["orbpos"] = frontendData.get("orbital_position", 0)

            defaultSat["modulation"] = frontendData.get(
                "modulation", eDVBFrontendParametersSatellite.Modulation_QPSK)
            defaultSat["modulation_s2x"] = frontendData.get(
                "modulation", eDVBFrontendParametersSatellite.Modulation_QPSK)

            if defaultSat[
                    "modulation"] > eDVBFrontendParametersSatellite.Modulation_8PSK:
                defaultSat[
                    "modulation"] = eDVBFrontendParametersSatellite.Modulation_8PSK

            if defaultSat[
                    "system"] == eDVBFrontendParametersSatellite.System_DVB_S2:
                defaultSat["fec_s2"] = frontendData.get(
                    "fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
            elif defaultSat[
                    "system"] == eDVBFrontendParametersSatellite.System_DVB_S2X:
                if defaultSat[
                        "modulation_s2x"] == eDVBFrontendParametersSatellite.Modulation_QPSK:
                    defaultSat["fec_s2x_qpsk"] = frontendData.get(
                        "fec_inner", eDVBFrontendParametersSatellite.FEC_13_45)
                elif defaultSat[
                        "modulation_s2x"] == eDVBFrontendParametersSatellite.Modulation_8PSK:
                    defaultSat["fec_s2x_8psk"] = frontendData.get(
                        "fec_inner", eDVBFrontendParametersSatellite.FEC_23_36)
                elif defaultSat[
                        "modulation_s2x"] == eDVBFrontendParametersSatellite.Modulation_8APSK:
                    defaultSat["fec_s2x_8apsk"] = frontendData.get(
                        "fec_inner", eDVBFrontendParametersSatellite.FEC_5_9_L)
                elif defaultSat[
                        "modulation_s2x"] == eDVBFrontendParametersSatellite.Modulation_16APSK:
                    defaultSat["fec_s2x_16apsk"] = frontendData.get(
                        "fec_inner", eDVBFrontendParametersSatellite.FEC_1_2_L)
                elif defaultSat[
                        "modulation_s2x"] == eDVBFrontendParametersSatellite.Modulation_32APSK:
                    defaultSat["fec_s2x_32apsk"] = frontendData.get(
                        "fec_inner", eDVBFrontendParametersSatellite.FEC_2_3_L)
            else:
                defaultSat["fec"] = frontendData.get(
                    "fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)

            if defaultSat["system"] in (
                    eDVBFrontendParametersSatellite.System_DVB_S2,
                    eDVBFrontendParametersSatellite.System_DVB_S2X):
                defaultSat["rolloff"] = frontendData.get(
                    "rolloff",
                    eDVBFrontendParametersSatellite.RollOff_alpha_0_35)
                defaultSat["pilot"] = frontendData.get(
                    "pilot", eDVBFrontendParametersSatellite.Pilot_Unknown)
                defaultSat["is_id"] = frontendData.get("is_id",
                                                       defaultSat["is_id"])
                defaultSat["pls_mode"] = frontendData.get(
                    "pls_mode", defaultSat["pls_mode"])
                defaultSat["pls_code"] = frontendData.get(
                    "pls_code", defaultSat["pls_code"])

        self.scan_sat = ConfigSubsection()

        sat_choices = [
            (eDVBFrontendParametersSatellite.System_DVB_S, _("DVB-S")),
            (eDVBFrontendParametersSatellite.System_DVB_S2, _("DVB-S2"))
        ]

        sat_choices_dvbs2x = [
            (eDVBFrontendParametersSatellite.System_DVB_S, _("DVB-S")),
            (eDVBFrontendParametersSatellite.System_DVB_S2, _("DVB-S2")),
            (eDVBFrontendParametersSatellite.System_DVB_S2X, _("DVB-S2X"))
        ]

        self.scan_sat.system = ConfigSelection(default=defaultSat["system"],
                                               choices=sat_choices)
        self.scan_sat.system_dvbs2x = ConfigSelection(
            default=defaultSat["system"], choices=sat_choices_dvbs2x)
        self.scan_sat.frequency = ConfigInteger(
            default=defaultSat["frequency"], limits=(1, 99999))
        self.scan_sat.inversion = ConfigSelection(
            default=defaultSat["inversion"],
            choices=[(eDVBFrontendParametersSatellite.Inversion_Off, _("Off")),
                     (eDVBFrontendParametersSatellite.Inversion_On, _("On")),
                     (eDVBFrontendParametersSatellite.Inversion_Unknown,
                      _("Auto"))])
        self.scan_sat.symbolrate = ConfigInteger(
            default=defaultSat["symbolrate"], limits=(1, 99999))
        self.scan_sat.polarization = ConfigSelection(
            default=defaultSat["polarization"],
            choices=[
                (eDVBFrontendParametersSatellite.Polarisation_Horizontal,
                 _("horizontal")),
                (eDVBFrontendParametersSatellite.Polarisation_Vertical,
                 _("vertical")),
                (eDVBFrontendParametersSatellite.Polarisation_CircularLeft,
                 _("circular left")),
                (eDVBFrontendParametersSatellite.Polarisation_CircularRight,
                 _("circular right"))
            ])
        self.scan_sat.fec = ConfigSelection(
            default=defaultSat["fec"],
            choices=[(eDVBFrontendParametersSatellite.FEC_Auto, _("Auto")),
                     (eDVBFrontendParametersSatellite.FEC_1_2, "1/2"),
                     (eDVBFrontendParametersSatellite.FEC_2_3, "2/3"),
                     (eDVBFrontendParametersSatellite.FEC_3_4, "3/4"),
                     (eDVBFrontendParametersSatellite.FEC_5_6, "5/6"),
                     (eDVBFrontendParametersSatellite.FEC_7_8, "7/8"),
                     (eDVBFrontendParametersSatellite.FEC_None, _("None"))])
        self.scan_sat.fec_s2 = ConfigSelection(
            default=defaultSat["fec_s2"],
            choices=[(eDVBFrontendParametersSatellite.FEC_1_2, "1/2"),
                     (eDVBFrontendParametersSatellite.FEC_2_3, "2/3"),
                     (eDVBFrontendParametersSatellite.FEC_3_4, "3/4"),
                     (eDVBFrontendParametersSatellite.FEC_3_5, "3/5"),
                     (eDVBFrontendParametersSatellite.FEC_4_5, "4/5"),
                     (eDVBFrontendParametersSatellite.FEC_5_6, "5/6"),
                     (eDVBFrontendParametersSatellite.FEC_7_8, "7/8"),
                     (eDVBFrontendParametersSatellite.FEC_8_9, "8/9"),
                     (eDVBFrontendParametersSatellite.FEC_9_10, "9/10")])
        self.scan_sat.fec_s2x_qpsk = ConfigSelection(
            default=defaultSat["fec_s2x_qpsk"],
            choices=[(eDVBFrontendParametersSatellite.FEC_13_45, "13/45"),
                     (eDVBFrontendParametersSatellite.FEC_9_20, "9/20"),
                     (eDVBFrontendParametersSatellite.FEC_11_20, "11/20")])

        self.scan_sat.fec_s2x_8psk = ConfigSelection(
            default=defaultSat["fec_s2x_8psk"],
            choices=[(eDVBFrontendParametersSatellite.FEC_23_36, "23/36"),
                     (eDVBFrontendParametersSatellite.FEC_25_36, "25/36"),
                     (eDVBFrontendParametersSatellite.FEC_13_18, "13/28")])

        self.scan_sat.fec_s2x_8apsk = ConfigSelection(
            default=defaultSat["fec_s2x_8apsk"],
            choices=[(eDVBFrontendParametersSatellite.FEC_5_9_L, "5/9-L"),
                     (eDVBFrontendParametersSatellite.FEC_26_45_L, "26/45-L")])

        self.scan_sat.fec_s2x_16apsk = ConfigSelection(
            default=defaultSat["fec_s2x_16apsk"],
            choices=[(eDVBFrontendParametersSatellite.FEC_1_2_L, "1/2-L"),
                     (eDVBFrontendParametersSatellite.FEC_8_15_L, "8/15-L"),
                     (eDVBFrontendParametersSatellite.FEC_5_9_L, "5/9-L"),
                     (eDVBFrontendParametersSatellite.FEC_26_45, "26/45"),
                     (eDVBFrontendParametersSatellite.FEC_3_5, "3/5"),
                     (eDVBFrontendParametersSatellite.FEC_3_5_L, "3/5-L"),
                     (eDVBFrontendParametersSatellite.FEC_28_45, "28/45"),
                     (eDVBFrontendParametersSatellite.FEC_23_36, "23/36"),
                     (eDVBFrontendParametersSatellite.FEC_2_3_L, "2/3-L"),
                     (eDVBFrontendParametersSatellite.FEC_25_36, "25/36"),
                     (eDVBFrontendParametersSatellite.FEC_13_18, "13/18"),
                     (eDVBFrontendParametersSatellite.FEC_7_9, "7/9"),
                     (eDVBFrontendParametersSatellite.FEC_77_90, "77/90")])

        self.scan_sat.fec_s2x_32apsk = ConfigSelection(
            default=defaultSat["fec_s2x_32apsk"],
            choices=[(eDVBFrontendParametersSatellite.FEC_2_3_L, "2/3-L"),
                     (eDVBFrontendParametersSatellite.FEC_32_45, "32/45"),
                     (eDVBFrontendParametersSatellite.FEC_11_15, "11/15"),
                     (eDVBFrontendParametersSatellite.FEC_7_9, "7/9")])
        self.scan_sat.modulation = ConfigSelection(
            default=defaultSat["modulation"],
            choices=[(eDVBFrontendParametersSatellite.Modulation_QPSK, "QPSK"),
                     (eDVBFrontendParametersSatellite.Modulation_8PSK, "8PSK")
                     ])
        self.scan_sat.modulation_dvbs2x = ConfigSelection(
            default=defaultSat["modulation_s2x"],
            choices=[
                (eDVBFrontendParametersSatellite.Modulation_QPSK, "QPSK"),
                (eDVBFrontendParametersSatellite.Modulation_8PSK, "8PSK"),
                (eDVBFrontendParametersSatellite.Modulation_8APSK, "8APSK"),
                (eDVBFrontendParametersSatellite.Modulation_16APSK, "16APSK"),
                (eDVBFrontendParametersSatellite.Modulation_32APSK, "32APSK")
            ])
        self.scan_sat.rolloff = ConfigSelection(
            default=defaultSat.get(
                "rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35),
            choices=[
                (eDVBFrontendParametersSatellite.RollOff_alpha_0_35, "0.35"),
                (eDVBFrontendParametersSatellite.RollOff_alpha_0_25, "0.25"),
                (eDVBFrontendParametersSatellite.RollOff_alpha_0_20, "0.20")
            ])
        self.scan_sat.pilot = ConfigSelection(
            default=defaultSat.get(
                "pilot", eDVBFrontendParametersSatellite.Pilot_Unknown),
            choices=[(eDVBFrontendParametersSatellite.Pilot_Off, _("Off")),
                     (eDVBFrontendParametersSatellite.Pilot_On, _("On")),
                     (eDVBFrontendParametersSatellite.Pilot_Unknown, _("Auto"))
                     ])
        self.scan_sat.is_id = ConfigInteger(
            default=defaultSat["is_id"] if defaultSat["is_id"] != -1 else 0,
            limits=(0, 255))
        self.scan_sat.is_id_bool = ConfigSelection(
            default=defaultSat["is_id"] != -1,
            choices=[(True, _("Multistream")), (False, _("Ordinary"))])
        self.scan_sat.pls_mode = ConfigSelection(
            default=defaultSat["pls_mode"],
            choices=[(eDVBFrontendParametersSatellite.PLS_Root, _("Root")),
                     (eDVBFrontendParametersSatellite.PLS_Gold, _("Gold")),
                     (eDVBFrontendParametersSatellite.PLS_Combo, _("Combo")),
                     (eDVBFrontendParametersSatellite.PLS_Unknown, _("Auto"))])
        self.scan_sat.pls_code = ConfigInteger(default=defaultSat["pls_code"],
                                               limits=(0, 262143))
Пример #24
0
 def updateRotorSatList(self):
     self.available_sat = []
     for x in nimmanager.nim_slots:
         for sat in nimmanager.getRotorSatListForNim(x.slot):
             if sat[0] not in self.available_sat:
                 self.available_sat.append(sat[0])
Пример #25
0
	def createConfig(self, frontendData):
		satlist = nimmanager.getRotorSatListForNim(self.feid)
		orb_pos = self.fe_data.get("orbital_position", None)
		orb_pos_str = str(orb_pos)
		self.tuning = ConfigSubsection()
		self.tuning.type = ConfigSelection(
				default = "manual_transponder",
				choices = { "manual_transponder" : _("Manual transponder"),
							"predefined_transponder" : _("Predefined transponder") } )
		self.tuning.sat = ConfigSatlist(list = satlist)
		if orb_pos is not None:
			for sat in satlist:
				if sat[0] == orb_pos and self.tuning.sat.value != orb_pos_str:
					self.tuning.sat.value = orb_pos_str
		self.updateTransponders()

		defaultSat = {
			"orbpos": 192,
			"system": eDVBFrontendParametersSatellite.System_DVB_S,
			"frequency": 11836,
			"inversion": eDVBFrontendParametersSatellite.Inversion_Unknown,
			"symbolrate": 27500,
			"polarization": eDVBFrontendParametersSatellite.Polarisation_Horizontal,
			"fec": eDVBFrontendParametersSatellite.FEC_Auto,
			"fec_s2": eDVBFrontendParametersSatellite.FEC_9_10,
			"modulation": eDVBFrontendParametersSatellite.Modulation_QPSK }
		if frontendData is not None:
			ttype = frontendData.get("tuner_type", "UNKNOWN")
			defaultSat["system"] = frontendData.get("system", eDVBFrontendParametersSatellite.System_DVB_S)
			defaultSat["frequency"] = frontendData.get("frequency", 0) / 1000
			defaultSat["inversion"] = frontendData.get("inversion", eDVBFrontendParametersSatellite.Inversion_Unknown)
			defaultSat["symbolrate"] = frontendData.get("symbol_rate", 0) / 1000
			defaultSat["polarization"] = frontendData.get("polarization", eDVBFrontendParametersSatellite.Polarisation_Horizontal)
			if defaultSat["system"] == eDVBFrontendParametersSatellite.System_DVB_S2:
				defaultSat["fec_s2"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
				defaultSat["rolloff"] = frontendData.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35)
				defaultSat["pilot"] = frontendData.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown)
			else:
				defaultSat["fec"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
			defaultSat["modulation"] = frontendData.get("modulation", eDVBFrontendParametersSatellite.Modulation_QPSK)
			defaultSat["orbpos"] = frontendData.get("orbital_position", 0)

		self.scan_sat = ConfigSubsection()
		self.scan_sat.system = ConfigSelection(default = defaultSat["system"], choices = [
			(eDVBFrontendParametersSatellite.System_DVB_S, _("DVB-S")),
			(eDVBFrontendParametersSatellite.System_DVB_S2, _("DVB-S2"))])
		self.scan_sat.frequency = ConfigInteger(default = defaultSat["frequency"], limits = (1, 99999))
		self.scan_sat.inversion = ConfigSelection(default = defaultSat["inversion"], choices = [
			(eDVBFrontendParametersSatellite.Inversion_Off, _("Off")),
			(eDVBFrontendParametersSatellite.Inversion_On, _("On")),
			(eDVBFrontendParametersSatellite.Inversion_Unknown, _("Auto"))])
		self.scan_sat.symbolrate = ConfigInteger(default = defaultSat["symbolrate"], limits = (1, 99999))
		self.scan_sat.polarization = ConfigSelection(default = defaultSat["polarization"], choices = [
			(eDVBFrontendParametersSatellite.Polarisation_Horizontal, _("horizontal")),
			(eDVBFrontendParametersSatellite.Polarisation_Vertical, _("vertical")),
			(eDVBFrontendParametersSatellite.Polarisation_CircularLeft, _("circular left")),
			(eDVBFrontendParametersSatellite.Polarisation_CircularRight, _("circular right"))])
		self.scan_sat.fec = ConfigSelection(default = defaultSat["fec"], choices = [
			(eDVBFrontendParametersSatellite.FEC_Auto, _("Auto")),
			(eDVBFrontendParametersSatellite.FEC_1_2, "1/2"),
			(eDVBFrontendParametersSatellite.FEC_2_3, "2/3"),
			(eDVBFrontendParametersSatellite.FEC_3_4, "3/4"),
			(eDVBFrontendParametersSatellite.FEC_5_6, "5/6"),
			(eDVBFrontendParametersSatellite.FEC_7_8, "7/8"),
			(eDVBFrontendParametersSatellite.FEC_None, _("None"))])
		self.scan_sat.fec_s2 = ConfigSelection(default = defaultSat["fec_s2"], choices = [
			(eDVBFrontendParametersSatellite.FEC_1_2, "1/2"),
			(eDVBFrontendParametersSatellite.FEC_2_3, "2/3"),
			(eDVBFrontendParametersSatellite.FEC_3_4, "3/4"),
			(eDVBFrontendParametersSatellite.FEC_3_5, "3/5"),
			(eDVBFrontendParametersSatellite.FEC_4_5, "4/5"),
			(eDVBFrontendParametersSatellite.FEC_5_6, "5/6"),
			(eDVBFrontendParametersSatellite.FEC_7_8, "7/8"),
			(eDVBFrontendParametersSatellite.FEC_8_9, "8/9"),
			(eDVBFrontendParametersSatellite.FEC_9_10, "9/10")])
		self.scan_sat.modulation = ConfigSelection(default = defaultSat["modulation"], choices = [
			(eDVBFrontendParametersSatellite.Modulation_QPSK, "QPSK"),
			(eDVBFrontendParametersSatellite.Modulation_8PSK, "8PSK")])
		self.scan_sat.rolloff = ConfigSelection(default = defaultSat.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35), choices = [
			(eDVBFrontendParametersSatellite.RollOff_alpha_0_35, "0.35"),
			(eDVBFrontendParametersSatellite.RollOff_alpha_0_25, "0.25"),
			(eDVBFrontendParametersSatellite.RollOff_alpha_0_20, "0.20"),
			(eDVBFrontendParametersSatellite.RollOff_auto, _("Auto"))])
		self.scan_sat.pilot = ConfigSelection(default = defaultSat.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown), choices = [
			(eDVBFrontendParametersSatellite.Pilot_Off, _("Off")),
			(eDVBFrontendParametersSatellite.Pilot_On, _("On")),
			(eDVBFrontendParametersSatellite.Pilot_Unknown, _("Auto"))])
Пример #26
0
	def __init__(self, session, feid):
		self.session = session
		Screen.__init__(self, session)
		self.feid = feid
		self.oldref = None
		log.open(self.LOG_SIZE)
		if config.Nims[self.feid].configMode.value == 'advanced':
			self.advanced = True
			self.advancedconfig = config.Nims[self.feid].advanced
			self.advancedsats = self.advancedconfig.sat
			self.availablesats = map(lambda x: x[0], nimmanager.getRotorSatListForNim(self.feid))
		else:
			self.advanced = False

		cur = { }
		if not self.openFrontend():
			self.oldref = session.nav.getCurrentlyPlayingServiceReference()
			service = session.nav.getCurrentService()
			feInfo = service and service.frontendInfo()
			if feInfo:
				cur = feInfo.getTransponderData(True)
			del feInfo
			del service
			session.nav.stopService() # try to disable foreground service
			if not self.openFrontend():
				if session.pipshown: # try to disable pip
					service = self.session.pip.pipservice
					feInfo = service and service.frontendInfo()
					if feInfo:
						cur = feInfo.getTransponderData(True)
					del feInfo
					del service
					from Screens.InfoBar import InfoBar
					InfoBar.instance and hasattr(InfoBar.instance, "showPiP") and InfoBar.instance.showPiP()
				if not self.openFrontend():
					self.frontend = None # in normal case this should not happen
					if hasattr(self, 'raw_channel'):
						del self.raw_channel

		self.frontendStatus = { }
		self.diseqc = Diseqc(self.frontend)
		# True means we dont like that the normal sec stuff sends commands to the rotor!
		self.tuner = Tuner(self.frontend, ignore_rotor = True)

		tp = ( cur.get("frequency", 0) / 1000,
			cur.get("symbol_rate", 0) / 1000,
			cur.get("polarization", eDVBFrontendParametersSatellite.Polarisation_Horizontal),
			cur.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto),
			cur.get("inversion", eDVBFrontendParametersSatellite.Inversion_Unknown),
			cur.get("orbital_position", 0),
			cur.get("system", eDVBFrontendParametersSatellite.System_DVB_S),
			cur.get("modulation", eDVBFrontendParametersSatellite.Modulation_QPSK),
			cur.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35),
			cur.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown))

		self.tuner.tune(tp)
		self.isMoving = False
		self.stopOnLock = False

		self.red = Button("")
		self["key_red"] = self.red
		self.green = Button("")
		self["key_green"] = self.green
		self.yellow = Button("")
		self["key_yellow"] = self.yellow
		self.blue = Button("")
		self["key_blue"] = self.blue

		self.list = []
		self["list"] = ConfigList(self.list)

		self["snr_db"] = TunerInfo(TunerInfo.SNR_DB, statusDict = self.frontendStatus)
		self["snr_percentage"] = TunerInfo(TunerInfo.SNR_PERCENTAGE, statusDict = self.frontendStatus)
		self["ber_value"] = TunerInfo(TunerInfo.BER_VALUE, statusDict = self.frontendStatus)
		self["snr_bar"] = TunerInfo(TunerInfo.SNR_BAR, statusDict = self.frontendStatus)
		self["ber_bar"] = TunerInfo(TunerInfo.BER_BAR, statusDict = self.frontendStatus)
		self["lock_state"] = TunerInfo(TunerInfo.LOCK_STATE, statusDict = self.frontendStatus)

		self["frequency_value"] = Label("")
		self["symbolrate_value"] = Label("")
		self["fec_value"] = Label("")
		self["polarisation"] = Label("")
		self["status_bar"] = Label("")
		self.statusMsgTimeoutTicks = 0
		self.statusMsgBlinking = False
		self.statusMsgBlinkCount = 0
		self.statusMsgBlinkRate = 500 / self.UPDATE_INTERVAL	# milliseconds
		self.tuningChangedTo(tp)

		self["actions"] = NumberActionMap(["DirectionActions", "OkCancelActions", "ColorActions", "TimerEditActions", "InputActions"],
		{
			"ok": self.keyOK,
			"cancel": self.keyCancel,
			"up": self.keyUp,
			"down": self.keyDown,
			"left": self.keyLeft,
			"right": self.keyRight,
			"red": self.redKey,
			"green": self.greenKey,
			"yellow": self.yellowKey,
			"blue": self.blueKey,
			"log": self.showLog,
			"1": self.keyNumberGlobal,
			"2": self.keyNumberGlobal,
			"3": self.keyNumberGlobal,
			"4": self.keyNumberGlobal,
			"5": self.keyNumberGlobal,
			"6": self.keyNumberGlobal,
			"7": self.keyNumberGlobal,
			"8": self.keyNumberGlobal,
			"9": self.keyNumberGlobal,
			"0": self.keyNumberGlobal
		}, -1)

		self.updateColors("tune")

		self.statusTimer = eTimer()
		self.statusTimer.callback.append(self.updateStatus)
		self.collectingStatistics = False
		self.statusTimer.start(self.UPDATE_INTERVAL, True)
		self.dataAvailable = Event()
		self.onClose.append(self.__onClose)

		self.createConfig()
		self.createSetup()
Пример #27
0
	def __init__(self, session, feid):
		self.session = session
		Screen.__init__(self, session)
		self.feid = feid
		self.oldref = None
		log.open(self.LOG_SIZE)
		if config.Nims[self.feid].configMode.value == 'advanced':
			self.advanced = True
			self.advancedconfig = config.Nims[self.feid].advanced
			self.advancedsats = self.advancedconfig.sat
			self.availablesats = map(lambda x: x[0], nimmanager.getRotorSatListForNim(self.feid))
		else:
			self.advanced = False

		cur = { }
		if not self.openFrontend():
			self.oldref = session.nav.getCurrentlyPlayingServiceReference()
			service = session.nav.getCurrentService()
			feInfo = service and service.frontendInfo()
			if feInfo:
				cur = feInfo.getTransponderData(True)
			del feInfo
			del service
			session.nav.stopService() # try to disable foreground service
			if not self.openFrontend():
				if session.pipshown: # try to disable pip
					service = self.session.pip.pipservice
					feInfo = service and service.frontendInfo()
					if feInfo:
						cur = feInfo.getTransponderData(True)
					del feInfo
					del service
					from Screens.InfoBar import InfoBar
					InfoBar.instance and hasattr(InfoBar.instance, "showPiP") and InfoBar.instance.showPiP()
				if not self.openFrontend():
					self.frontend = None # in normal case this should not happen
					if hasattr(self, 'raw_channel'):
						del self.raw_channel

		self.frontendStatus = { }
		self.diseqc = Diseqc(self.frontend)
		# True means we dont like that the normal sec stuff sends commands to the rotor!
		self.tuner = Tuner(self.frontend, ignore_rotor = True)

		tp = ( cur.get("frequency", 0) / 1000,
			cur.get("symbol_rate", 0) / 1000,
			cur.get("polarization", eDVBFrontendParametersSatellite.Polarisation_Horizontal),
			cur.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto),
			cur.get("inversion", eDVBFrontendParametersSatellite.Inversion_Unknown),
			cur.get("orbital_position", 0),
			cur.get("system", eDVBFrontendParametersSatellite.System_DVB_S),
			cur.get("modulation", eDVBFrontendParametersSatellite.Modulation_QPSK),
			cur.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35),
			cur.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown))

		self.tuner.tune(tp)
		self.isMoving = False
		self.stopOnLock = False

		self.red = Button("")
		self["key_red"] = self.red
		self.green = Button("")
		self["key_green"] = self.green
		self.yellow = Button("")
		self["key_yellow"] = self.yellow
		self.blue = Button("")
		self["key_blue"] = self.blue

		self.list = []
		self["list"] = ConfigList(self.list)

		self["snr_db"] = TunerInfo(TunerInfo.SNR_DB, statusDict = self.frontendStatus)
		self["snr_percentage"] = TunerInfo(TunerInfo.SNR_PERCENTAGE, statusDict = self.frontendStatus)
		self["ber_value"] = TunerInfo(TunerInfo.BER_VALUE, statusDict = self.frontendStatus)
		self["snr_bar"] = TunerInfo(TunerInfo.SNR_BAR, statusDict = self.frontendStatus)
		self["ber_bar"] = TunerInfo(TunerInfo.BER_BAR, statusDict = self.frontendStatus)
		self["lock_state"] = TunerInfo(TunerInfo.LOCK_STATE, statusDict = self.frontendStatus)

		self["frequency_value"] = Label("")
		self["symbolrate_value"] = Label("")
		self["fec_value"] = Label("")
		self["polarisation"] = Label("")
		self["status_bar"] = Label("")
		self.statusMsgTimeoutTicks = 0
		self.statusMsgBlinking = False
		self.statusMsgBlinkCount = 0
		self.statusMsgBlinkRate = 500 / self.UPDATE_INTERVAL	# milliseconds
		self.tuningChangedTo(tp)

		self["actions"] = NumberActionMap(["DirectionActions", "OkCancelActions", "ColorActions", "TimerEditActions", "InputActions"],
		{
			"ok": self.keyOK,
			"cancel": self.keyCancel,
			"up": self.keyUp,
			"down": self.keyDown,
			"left": self.keyLeft,
			"right": self.keyRight,
			"red": self.redKey,
			"green": self.greenKey,
			"yellow": self.yellowKey,
			"blue": self.blueKey,
			"log": self.showLog,
			"1": self.keyNumberGlobal,
			"2": self.keyNumberGlobal,
			"3": self.keyNumberGlobal,
			"4": self.keyNumberGlobal,
			"5": self.keyNumberGlobal,
			"6": self.keyNumberGlobal,
			"7": self.keyNumberGlobal,
			"8": self.keyNumberGlobal,
			"9": self.keyNumberGlobal,
			"0": self.keyNumberGlobal
		}, -1)

		self.updateColors("tune")

		self.statusTimer = eTimer()
		self.statusTimer.callback.append(self.updateStatus)
		self.collectingStatistics = False
		self.statusTimer.start(self.UPDATE_INTERVAL, True)
		self.dataAvailable = Event()
		self.onClose.append(self.__onClose)

		self.createConfig()
		self.createSetup()
Пример #28
0
	def createConfig(self, frontendData):
		satlist = nimmanager.getRotorSatListForNim(self.feid)
		orb_pos = self.fe_data.get("orbital_position", None)
		orb_pos_str = str(orb_pos)
		self.tuning = ConfigSubsection()
		self.tuning.type = ConfigSelection(
				default = "manual_transponder",
				choices = { "manual_transponder" : _("Manual transponder"),
							"predefined_transponder" : _("Predefined transponder") } )
		self.tuning.sat = ConfigSatlist(list = satlist)
		if orb_pos is not None:
			for sat in satlist:
				if sat[0] == orb_pos and self.tuning.sat.value != orb_pos_str:
					self.tuning.sat.value = orb_pos_str
		self.updateTransponders()

		defaultSat = {
			"orbpos": 192,
			"system": eDVBFrontendParametersSatellite.System_DVB_S,
			"frequency": 11836,
			"inversion": eDVBFrontendParametersSatellite.Inversion_Unknown,
			"symbolrate": 27500,
			"polarization": eDVBFrontendParametersSatellite.Polarisation_Horizontal,
			"fec": eDVBFrontendParametersSatellite.FEC_Auto,
			"fec_s2": eDVBFrontendParametersSatellite.FEC_9_10,
			"modulation": eDVBFrontendParametersSatellite.Modulation_QPSK }
		if frontendData is not None:
			ttype = frontendData.get("tuner_type", "UNKNOWN")
			defaultSat["system"] = frontendData.get("system", eDVBFrontendParametersSatellite.System_DVB_S)
			defaultSat["frequency"] = frontendData.get("frequency", 0) / 1000
			defaultSat["inversion"] = frontendData.get("inversion", eDVBFrontendParametersSatellite.Inversion_Unknown)
			defaultSat["symbolrate"] = frontendData.get("symbol_rate", 0) / 1000
			defaultSat["polarization"] = frontendData.get("polarization", eDVBFrontendParametersSatellite.Polarisation_Horizontal)
			if defaultSat["system"] == eDVBFrontendParametersSatellite.System_DVB_S2:
				defaultSat["fec_s2"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
				defaultSat["rolloff"] = frontendData.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35)
				defaultSat["pilot"] = frontendData.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown)
			else:
				defaultSat["fec"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
			defaultSat["modulation"] = frontendData.get("modulation", eDVBFrontendParametersSatellite.Modulation_QPSK)
			defaultSat["orbpos"] = frontendData.get("orbital_position", 0)

		self.scan_sat = ConfigSubsection()
		self.scan_sat.system = ConfigSelection(default = defaultSat["system"], choices = [
			(eDVBFrontendParametersSatellite.System_DVB_S, _("DVB-S")),
			(eDVBFrontendParametersSatellite.System_DVB_S2, _("DVB-S2"))])
		self.scan_sat.frequency = ConfigInteger(default = defaultSat["frequency"], limits = (1, 99999))
		self.scan_sat.inversion = ConfigSelection(default = defaultSat["inversion"], choices = [
			(eDVBFrontendParametersSatellite.Inversion_Off, _("Off")),
			(eDVBFrontendParametersSatellite.Inversion_On, _("On")),
			(eDVBFrontendParametersSatellite.Inversion_Unknown, _("Auto"))])
		self.scan_sat.symbolrate = ConfigInteger(default = defaultSat["symbolrate"], limits = (1, 99999))
		self.scan_sat.polarization = ConfigSelection(default = defaultSat["polarization"], choices = [
			(eDVBFrontendParametersSatellite.Polarisation_Horizontal, _("horizontal")),
			(eDVBFrontendParametersSatellite.Polarisation_Vertical, _("vertical")),
			(eDVBFrontendParametersSatellite.Polarisation_CircularLeft, _("circular left")),
			(eDVBFrontendParametersSatellite.Polarisation_CircularRight, _("circular right"))])
		self.scan_sat.fec = ConfigSelection(default = defaultSat["fec"], choices = [
			(eDVBFrontendParametersSatellite.FEC_Auto, _("Auto")),
			(eDVBFrontendParametersSatellite.FEC_1_2, "1/2"),
			(eDVBFrontendParametersSatellite.FEC_2_3, "2/3"),
			(eDVBFrontendParametersSatellite.FEC_3_4, "3/4"),
			(eDVBFrontendParametersSatellite.FEC_5_6, "5/6"),
			(eDVBFrontendParametersSatellite.FEC_7_8, "7/8"),
			(eDVBFrontendParametersSatellite.FEC_None, _("None"))])
		self.scan_sat.fec_s2 = ConfigSelection(default = defaultSat["fec_s2"], choices = [
			(eDVBFrontendParametersSatellite.FEC_1_2, "1/2"),
			(eDVBFrontendParametersSatellite.FEC_2_3, "2/3"),
			(eDVBFrontendParametersSatellite.FEC_3_4, "3/4"),
			(eDVBFrontendParametersSatellite.FEC_3_5, "3/5"),
			(eDVBFrontendParametersSatellite.FEC_4_5, "4/5"),
			(eDVBFrontendParametersSatellite.FEC_5_6, "5/6"),
			(eDVBFrontendParametersSatellite.FEC_7_8, "7/8"),
			(eDVBFrontendParametersSatellite.FEC_8_9, "8/9"),
			(eDVBFrontendParametersSatellite.FEC_9_10, "9/10")])
		self.scan_sat.modulation = ConfigSelection(default = defaultSat["modulation"], choices = [
			(eDVBFrontendParametersSatellite.Modulation_QPSK, "QPSK"),
			(eDVBFrontendParametersSatellite.Modulation_8PSK, "8PSK")])
		self.scan_sat.rolloff = ConfigSelection(default = defaultSat.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35), choices = [
			(eDVBFrontendParametersSatellite.RollOff_alpha_0_35, "0.35"),
			(eDVBFrontendParametersSatellite.RollOff_alpha_0_25, "0.25"),
			(eDVBFrontendParametersSatellite.RollOff_alpha_0_20, "0.20"),
			(eDVBFrontendParametersSatellite.RollOff_auto, _("Auto"))])
		self.scan_sat.pilot = ConfigSelection(default = defaultSat.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown), choices = [
			(eDVBFrontendParametersSatellite.Pilot_Off, _("Off")),
			(eDVBFrontendParametersSatellite.Pilot_On, _("On")),
			(eDVBFrontendParametersSatellite.Pilot_Unknown, _("Auto"))])
Пример #29
0
 def isMotorizedTuner(self):
     for x in nimmanager.nim_slots:
         if nimmanager.getRotorSatListForNim(x.slot, only_first=True):
             return (True, x.slot)
     return (False, None)
Пример #30
0
 def updateRotorSatList(self):
     self.available_sat = []
     for x in nimmanager.nim_slots:
         for sat in nimmanager.getRotorSatListForNim(x.slot):
             if sat[0] not in self.available_sat:
                 self.available_sat.append(sat[0])