Beispiel #1
0
def SatfinderMain(session, close=None, **kwargs):
    nims = nimmanager.getNimListOfType("DVB-S")

    nimList = []
    for x in nims:
        if nimmanager.getNimConfig(x).configMode.value in ("loopthrough",
                                                           "satposdepends",
                                                           "nothing"):
            continue
        if nimmanager.getNimConfig(x).configMode.value == "advanced" and len(
                nimmanager.getSatListForNim(x)) < 1:
            continue
        nimList.append(x)

    if len(nimList) == 0:
        session.open(
            MessageBox,
            _("No satellites configured. Plese check your tuner setup."),
            MessageBox.TYPE_ERROR)
    else:
        if session.nav.RecordTimer.isRecording():
            session.open(
                MessageBox,
                _("A recording is currently running. Please stop the recording before trying to start the satfinder."
                  ), MessageBox.TYPE_ERROR)
        else:
            session.openWithCallback(close, Satfinder)
Beispiel #2
0
def SatfinderMain(session, close = None, **kwargs):
    nims = nimmanager.getNimListOfType('DVB-S')
    nimList = []
    for x in nims:
        if nimmanager.getNimConfig(x).configMode.value in ('loopthrough', 'satposdepends', 'nothing'):
            continue
        if nimmanager.getNimConfig(x).configMode.value == 'advanced' and len(nimmanager.getSatListForNim(x)) < 1:
            continue
        nimList.append(x)

    if len(nimList) == 0:
        session.open(MessageBox, _('No satellites configured. Plese check your tuner setup.'), MessageBox.TYPE_ERROR)
    else:
        session.openWithCallback(close, Satfinder)
Beispiel #3
0
	def updateList(self):
		self.list = [ ]
		for x in nimmanager.nim_slots:
			slotid = x.slot
			nimConfig = nimmanager.getNimConfig(x.slot)
			text = nimConfig.configMode.value
			if self.showNim(x):
				if x.isCompatible("DVB-S"):
					if nimConfig.configMode.value in ("loopthrough", "equal", "satposdepends"):
						text = { "loopthrough": _("Loop through to"),
								 "equal": _("Equal to"),
								 "satposdepends": _("Second cable of motorized LNB") } [nimConfig.configMode.value]
						text += " " + _("Tuner") + " " + ["A", "B", "C", "D"][int(nimConfig.connectedTo.value)]
					elif nimConfig.configMode.value == "nothing":
						text = _("not configured")
					elif nimConfig.configMode.value == "simple":
						if nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
							text = {"single": _("Single"), "toneburst_a_b": _("Toneburst A/B"), "diseqc_a_b": _("DiSEqC A/B"), "diseqc_a_b_c_d": _("DiSEqC A/B/C/D")}[nimConfig.diseqcMode.value] + "\n"
							text += _("Sats") + ": "
							satnames = []
							if nimConfig.diseqcA.orbital_position < 3600:
								satnames.append(nimmanager.getSatName(int(nimConfig.diseqcA.value)))
							if nimConfig.diseqcMode.value in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
								if nimConfig.diseqcB.orbital_position < 3600:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcB.value)))
							if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
								if nimConfig.diseqcC.orbital_position < 3600:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcC.value)))
								if nimConfig.diseqcD.orbital_position < 3600:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcD.value)))
							if len(satnames) <= 2:
								text += ", ".join(satnames)
							elif len(satnames) > 2:
								# we need a newline here, since multi content lists don't support automtic line wrapping
								text += ", ".join(satnames[:2]) + ",\n"
								text += "         " + ", ".join(satnames[2:])
						elif nimConfig.diseqcMode.value in ("positioner", "positioner_select"):
							text = {"positioner": _("Positioner"), "positioner_select": _("Positioner (selecting satellites)")}[nimConfig.diseqcMode.value]
							text += ":"
							if nimConfig.positionerMode.value == "usals":
								text += "USALS"
							elif nimConfig.positionerMode.value == "manual":
								text += _("Manual")
						else:
							text = _("Simple")
					elif nimConfig.configMode.value == "advanced":
						text = _("Advanced")
				elif x.isCompatible("DVB-T") or x.isCompatible("DVB-C"):
					if nimConfig.configMode.value == "nothing":
						text = _("Nothing connected")
					elif nimConfig.configMode.value == "enabled":
						text = _("Enabled")
				if x.isMultiType():
					text = _("Switchable tuner types:") + "(" + ','.join(x.getMultiTypeList().values()) + ")" + "\n" + text
				if not x.isSupported():
					text = _("Tuner is not supported")

				self.list.append((slotid, x.friendly_full_description, text, x))
		self["nimlist"].setList(self.list)
		self["nimlist"].updateList(self.list)
Beispiel #4
0
	def getTurningSpeed(self, pol=0):
		tuner = self.getCurrentTuner()
		if tuner is not None:
			from Components.NimManager import nimmanager
			nimConfig = nimmanager.getNimConfig(tuner)
			if nimConfig.configMode.value == "simple":
				if "positioner" in nimConfig.diseqcMode.value:
					nim = config.Nims[tuner]
					if pol in (1, 3): # vertical
						return nim.turningspeedV.float
					return nim.turningspeedH.float
			elif nimConfig.configMode.value == "advanced":
				if self.cur_orbpos != INVALID_POSITION:
					satlist = nimConfig.advanced.sat.keys()
					if self.cur_orbpos in satlist:
						currSat = nimConfig.advanced.sat[self.cur_orbpos]
						lnbnum = int(currSat.lnb.value)
						currLnb = lnbnum and nimConfig.advanced.lnb[lnbnum]
						diseqcmode = currLnb and currLnb.diseqcMode.value or ""
						if diseqcmode == "1_2":
							if pol in (1, 3): # vertical
								return currLnb.turningspeedV.float
							return currLnb.turningspeedH.float
		if pol in (1, 3):
			return 1.0
		return 1.5
Beispiel #5
0
	def updateList(self):
		self.list = [ ]
		for x in nimmanager.nim_slots:
			slotid = x.slot
			nimConfig = nimmanager.getNimConfig(x.slot)
			text = nimConfig.configMode.value
			if self.showNim(x):
				if x.isCompatible("DVB-S"):
					if nimConfig.configMode.value in ("loopthrough", "equal", "satposdepends"):
						text = { "loopthrough": _("Loop through to"),
								 "equal": _("Equal to"),
								 "satposdepends": _("Second cable of motorized LNB") } [nimConfig.configMode.value]
						text += " " + _("Tuner") + " " + ["A", "B", "C", "D"][int(nimConfig.connectedTo.value)]
					elif nimConfig.configMode.value == "nothing":
						text = _("not configured")
					elif nimConfig.configMode.value == "simple":
						if nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
							text = {"single": _("Single"), "toneburst_a_b": _("Toneburst A/B"), "diseqc_a_b": _("DiSEqC A/B"), "diseqc_a_b_c_d": _("DiSEqC A/B/C/D")}[nimConfig.diseqcMode.value] + "\n"
							text += _("Sats") + ": "
							satnames = []
							if nimConfig.diseqcA.orbital_position < 3600:
								satnames.append(nimmanager.getSatName(int(nimConfig.diseqcA.value)))
							if nimConfig.diseqcMode.value in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
								if nimConfig.diseqcB.orbital_position < 3600:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcB.value)))
							if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
								if nimConfig.diseqcC.orbital_position < 3600:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcC.value)))
								if nimConfig.diseqcD.orbital_position < 3600:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcD.value)))
							if len(satnames) <= 2:
								text += ", ".join(satnames)
							elif len(satnames) > 2:
								# we need a newline here, since multi content lists don't support automtic line wrapping
								text += ", ".join(satnames[:2]) + ",\n"
								text += "         " + ", ".join(satnames[2:])
						elif nimConfig.diseqcMode.value in ("positioner", "positioner_select"):
							text = {"positioner": _("Positioner"), "positioner_select": _("Positioner (selecting satellites)")}[nimConfig.diseqcMode.value]
							text += ":"
							if nimConfig.positionerMode.value == "usals":
								text += "USALS"
							elif nimConfig.positionerMode.value == "manual":
								text += _("Manual")
						else:
							text = _("Simple")
					elif nimConfig.configMode.value == "advanced":
						text = _("Advanced")
				elif x.isCompatible("DVB-T") or x.isCompatible("DVB-C"):
					if nimConfig.configMode.value == "nothing":
						text = _("Nothing connected")
					elif nimConfig.configMode.value == "enabled":
						text = _("Enabled")
				if x.isMultiType():
					text = _("Switchable tuner types:") + "(" + ','.join(x.getMultiTypeList().values()) + ")" + "\n" + text
				if not x.isSupported():
					text = _("Tuner is not supported")

				self.list.append((slotid, x.friendly_full_description, text, x))
		self["nimlist"].setList(self.list)
		self["nimlist"].updateList(self.list)
Beispiel #6
0
 def getTurningSpeed(self, pol=0):
     tuner = self.getCurrentTuner()
     if tuner is not None:
         nimConfig = nimmanager.getNimConfig(tuner).dvbs
         if nimConfig.configMode.value == 'simple':
             if 'positioner' in nimConfig.diseqcMode.value:
                 nim = config.Nims[tuner].dvbs
                 if pol in (1, 3):
                     return nim.turningspeedV.float
                 return nim.turningspeedH.float
         elif nimConfig.configMode.value == 'advanced':
             if self.cur_orbpos != INVALID_POSITION:
                 satlist = nimConfig.advanced.sat.keys()
                 if self.cur_orbpos in satlist:
                     currSat = nimConfig.advanced.sat[self.cur_orbpos]
                     lnbnum = int(currSat.lnb.value)
                     currLnb = lnbnum and nimConfig.advanced.lnb[lnbnum]
                     diseqcmode = currLnb and currLnb.diseqcMode.value or ''
                     if diseqcmode == '1_2':
                         if pol in (1, 3):
                             return currLnb.turningspeedV.float
                         return currLnb.turningspeedH.float
     if pol in (1, 3):
         return 1.0
     else:
         return 1.5
Beispiel #7
0
	def okbuttonClick(self):
		nim = self["nimlist"].getCurrent()
		nim = nim and nim[3]

		if isFBCLink(nim.slot):
			if nim.isCompatible("DVB-S"):
				nimConfig = nimmanager.getNimConfig(nim.slot).dvbs
			elif nim.isCompatible("DVB-C"):
				nimConfig = nimmanager.getNimConfig(nim.slot).dvbc
			elif nim.isCompatible("DVB-T"):
				nimConfig = nimmanager.getNimConfig(nim.slot).dvbt

			if nimConfig.configMode.value == "loopthrough":
				return
		if nim is not None and not nim.empty and nim.isSupported():
			self.session.openWithCallback(boundFunction(self.NimSetupCB, self["nimlist"].getIndex()), self.resultclass, nim.slot)
Beispiel #8
0
 def getTurningSpeed(self, pol=0):
     tuner = self.getCurrentTuner()
     if tuner is not None:
         nimConfig = nimmanager.getNimConfig(tuner)
         if nimConfig.configMode.value == "simple":
             if "positioner" in nimConfig.diseqcMode.value:
                 nim = config.Nims[tuner]
                 if pol in (1, 3):  # vertical
                     return nim.turningspeedV.float
                 return nim.turningspeedH.float
         elif nimConfig.configMode.value == "advanced":
             if self.cur_orbpos != INVALID_POSITION:
                 satlist = nimConfig.advanced.sat.keys()
                 if self.cur_orbpos in satlist:
                     currSat = nimConfig.advanced.sat[self.cur_orbpos]
                     lnbnum = int(currSat.lnb.value)
                     currLnb = lnbnum and nimConfig.advanced.lnb[lnbnum]
                     diseqcmode = currLnb and currLnb.diseqcMode.value or ""
                     if diseqcmode == "1_2":
                         if pol in (1, 3):  # vertical
                             return currLnb.turningspeedV.float
                         return currLnb.turningspeedH.float
     if pol in (1, 3):
         return 1.0
     return 1.5
Beispiel #9
0
 def getTurningSpeed(self, pol = 0):
     tuner = self.getCurrentTuner()
     if tuner is not None:
         nimConfig = nimmanager.getNimConfig(tuner)
         if nimConfig.configMode.value == 'simple':
             if 'positioner' in nimConfig.diseqcMode.value:
                 nim = config.Nims[tuner]
                 if pol in (1, 3):
                     return nim.turningspeedV.float
                 return nim.turningspeedH.float
         elif nimConfig.configMode.value == 'advanced':
             if self.cur_orbpos != INVALID_POSITION:
                 satlist = nimConfig.advanced.sat.keys()
                 if self.cur_orbpos in satlist:
                     currSat = nimConfig.advanced.sat[self.cur_orbpos]
                     lnbnum = int(currSat.lnb.value)
                     currLnb = lnbnum and nimConfig.advanced.lnb[lnbnum]
                     diseqcmode = currLnb and currLnb.diseqcMode.value or ''
                     if diseqcmode == '1_2':
                         if pol in (1, 3):
                             return currLnb.turningspeedV.float
                         return currLnb.turningspeedH.float
     if pol in (1, 3):
         return 1.0
     else:
         return 1.5
Beispiel #10
0
		def SatfinderMain(self):
			nims = nimmanager.getNimListOfType("DVB-S")

			nimList = []
			for x in nims:
				if nimmanager.getNimConfig(x).configMode.value in ("loopthrough", "satposdepends", "nothing"):
					continue
				if nimmanager.getNimConfig(x).configMode.value == "advanced" and len(nimmanager.getSatListForNim(x)) < 1:
					continue
				nimList.append(x)

			if len(nimList) == 0:
				self.session.open(MessageBox, _("No satellites configured. Plese check your tuner setup."), MessageBox.TYPE_ERROR)
			else:
				if self.session.nav.RecordTimer.isRecording():
					self.session.open(MessageBox, _("A recording is currently running. Please stop the recording before trying to start the satfinder."), MessageBox.TYPE_ERROR)
				else:
					self.session.open(Satfinder)
Beispiel #11
0
	def okbuttonClick(self):
		nim = self["nimlist"].getCurrent()
		nim = nim and nim[3]

		nimConfig = nimmanager.getNimConfig(nim.slot)
		if isFBCLink(nim) and nimConfig.configMode.value == "loopthrough":
			return

		if nim is not None and not nim.empty and nim.isSupported():
			self.session.openWithCallback(self.NimSetupCB, self.resultclass, nim.slot)
Beispiel #12
0
	def showNim(self, nim):
		nimConfig = nimmanager.getNimConfig(nim.slot)
		if nim.isCompatible("DVB-S"):
			if nimConfig.configMode.value in ("loopthrough_internal", "loopthrough_external", "equal", "satposdepends", "nothing"):
				return False
			configured_sats = nimmanager.getSatListForNim(nim.slot)
			if len(configured_sats) == 0:
				return False
			return True
		return False
	def showNim(self, nim):
		nimConfig = nimmanager.getNimConfig(nim.slot)
		if nim.isCompatible("DVB-S"):
			if nimConfig.configMode.value in ("loopthrough", "equal", "satposdepends", "nothing"):
				return False
			configured_sats = nimmanager.getSatListForNim(nim.slot)
			if len(configured_sats) == 0:
				return False
			return True
		return False
Beispiel #14
0
	def showNim(self, nim):
		nimConfig = nimmanager.getNimConfig(nim.slot).dvbs
		if nim.isCompatible("DVB-S"):
			if nimConfig.configMode.value in ("loopthrough", "equal", "satposdepends", "nothing"):
				return False
			if nimConfig.configMode.value == "simple":
				if nimConfig.diseqcMode.value == "positioner":
					return True
			return True
		return False
Beispiel #15
0
	def okbuttonClick(self):
		nim = self["nimlist"].getCurrent()
		nim = nim and nim[3]

		nimConfig = nimmanager.getNimConfig(nim.slot)
		if nim.isFBCLink() and nimConfig.configMode.value == "nothing" and not getLinkedSlotID(nim.slot) == -1:
			return

		if nim is not None and not nim.empty and nim.isSupported():
			self.session.openWithCallback(boundFunction(self.NimSetupCB, self["nimlist"].getIndex()), self.resultclass, nim.slot)
Beispiel #16
0
def SatfinderMain(session, close=None, **kwargs):
    nims = nimmanager.getNimListOfType('DVB-S')
    nimList = []
    for x in nims:
        if nimmanager.getNimConfig(x).configMode.value in ('loopthrough',
                                                           'satposdepends',
                                                           'nothing'):
            continue
        if nimmanager.getNimConfig(x).configMode.value == 'advanced' and len(
                nimmanager.getSatListForNim(x)) < 1:
            continue
        nimList.append(x)

    if len(nimList) == 0:
        session.open(
            MessageBox,
            _('No satellites configured. Plese check your tuner setup.'),
            MessageBox.TYPE_ERROR)
    else:
        session.openWithCallback(close, Satfinder)
Beispiel #17
0
    def okbuttonClick(self):
        nim = self["nimlist"].getCurrent()
        nim = nim and nim[3]

        nimConfig = nimmanager.getNimConfig(nim.slot)
        if isFBCLink(nim.slot) and nimConfig.configMode.value == "loopthrough":
            return

        if nim is not None and not nim.empty and nim.isSupported():
            self.session.openWithCallback(self.NimSetupCB, self.resultclass,
                                          nim.slot)
Beispiel #18
0
	def okbuttonClick(self):
		recordings = self.session.nav.getRecordings()
		next_rec_time = self.session.nav.RecordTimer.getNextRecordingTime()
		if recordings or (next_rec_time and next_rec_time > 0 and (next_rec_time - time()) < 360):
			self.session.open(MessageBox, _("Recording(s) are in progress or coming up in few seconds!"), MessageBox.TYPE_INFO, timeout=5, enable_input=False)
		else:
			nim = self["nimlist"].getCurrent()
			nim = nim and nim[3]
			nimConfig = nimmanager.getNimConfig(nim.slot)
			if isFBCLink(nim) and nimConfig.configMode.value == "loopthrough":
				return
			if nim is not None and not nim.empty and nim.isSupported():
				self.session.openWithCallback(boundFunction(self.NimSetupCB, self["nimlist"].getIndex()), self.resultclass, nim.slot)
Beispiel #19
0
	def SatfinderMain(self):
		nims = nimmanager.getNimListOfType("DVB-S")

		nimList = []
		for x in nims:
			if not nimmanager.getNimConfig(x).configMode.value in ("loopthrough", "satposdepends", "nothing"):
				nimList.append(x)

		if len(nimList) == 0:
			self.session.open(MessageBox, _("No satellite 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 start the satfinder."), MessageBox.TYPE_ERROR)
			else:
				self.session.open(Satfinder)
Beispiel #20
0
    def loadFBCLinks(self):
        for x in nimmanager.nim_slots:
            slotid = x.slot
            nimConfig = nimmanager.getNimConfig(x.slot)
            configMode = nimConfig.configMode.value
            if self.showNim(x):
                if x.isCompatible("DVB-S"):
                    if isFBCLink(x.slot) and configMode != "advanced":
                        link = getLinkedSlotID(x.slot)

                        if link == -1:
                            nimConfig.configMode.value = "nothing"
                        else:
                            nimConfig.configMode.value = "loopthrough"
                            nimConfig.connectedTo.value = str(link)
Beispiel #21
0
	def SatfinderMain(self):
		nims = nimmanager.getNimListOfType("DVB-S")

		nimList = []
		for x in nims:
			if not nimmanager.getNimConfig(x).configMode.value in ("loopthrough", "satposdepends", "nothing"):
				nimList.append(x)

		if len(nimList) == 0:
			self.session.open(MessageBox, _("No satellite 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 start the satfinder."), MessageBox.TYPE_ERROR)
			else:
				self.session.open(Satfinder)
Beispiel #22
0
	def loadFBCLinks(self):
		for x in nimmanager.nim_slots:
			slotid = x.slot
			if self.showNim(x):
				if x.isCompatible("DVB-S"):
					nimConfig = nimmanager.getNimConfig(x.slot).dvbs
					configMode = nimConfig.configMode.value
					if isFBCLink(x.slot) and configMode != "advanced":
						link = getLinkedSlotID(x.slot)

						if link == -1:
							nimConfig.configMode.value = "nothing"
						else:
							nimConfig.configMode.value = "loopthrough"
							nimConfig.connectedTo.value = str(link)
Beispiel #23
0
	def okbuttonClick(self):
		recordings = self.session.nav.getRecordings()
		next_rec_time = self.session.nav.RecordTimer.getNextRecordingTime()
		if recordings or (next_rec_time and next_rec_time > 0 and (next_rec_time - time()) < 360):
			self.session.open(MessageBox, _("Recording(s) are in progress or coming up in few seconds!"), MessageBox.TYPE_INFO, timeout=5, enable_input=False)
		else:
			nim = self["nimlist"].getCurrent()
			nim = nim and nim[3]

			nimConfig = nimmanager.getNimConfig(nim.slot)
			if nim.isFBCLink() and nimConfig.configMode.value == "nothing" and not getLinkedSlotID(nim.slot) == -1:
				return

			if nim is not None and not nim.empty and nim.isSupported():
				self.session.openWithCallback(boundFunction(self.NimSetupCB, self["nimlist"].getIndex()), self.resultclass, nim.slot)
Beispiel #24
0
	def updateList(self):
		self.list = [ ]
		for x in nimmanager.nim_slots:
			slotid = x.slot
			nimConfig = nimmanager.getNimConfig(x.slot)
			text = nimConfig.configMode.value
			if self.showNim(x):
				if x.isCompatible("DVB-S"):
					if nimConfig.configMode.value in ("loopthrough", "equal", "satposdepends"):
						text = { "loopthrough": _("loopthrough to"),
								 "equal": _("equal to"),
								 "satposdepends": _("second cable of motorized LNB") } [nimConfig.configMode.value]
						text += " " + _("Tuner") + " " + ["A", "B", "C", "D"][int(nimConfig.connectedTo.value)]
					elif nimConfig.configMode.value == "nothing":
						text = _("nothing connected")
					elif nimConfig.configMode.value == "simple":
						if nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
							text = _("Sats") + ": " 
							if nimConfig.diseqcA.orbital_position != 3601:
								text += nimmanager.getSatName(int(nimConfig.diseqcA.value))
							if nimConfig.diseqcMode.value in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
								if nimConfig.diseqcB.orbital_position != 3601:
									text += "," + nimmanager.getSatName(int(nimConfig.diseqcB.value))
							if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
								if nimConfig.diseqcC.orbital_position != 3601:
									text += "," + nimmanager.getSatName(int(nimConfig.diseqcC.value))
								if nimConfig.diseqcD.orbital_position != 3601:
									text += "," + nimmanager.getSatName(int(nimConfig.diseqcD.value))
						elif nimConfig.diseqcMode.value == "positioner":
							text = _("Positioner") + ":"
							if nimConfig.positionerMode.value == "usals":
								text += _("USALS")
							elif nimConfig.positionerMode.value == "manual":
								text += _("manual")
						else:	
							text = _("simple")
					elif nimConfig.configMode.value == "advanced":
						text = _("advanced")
				elif x.isCompatible("DVB-T") or x.isCompatible("DVB-C"):
					if nimConfig.configMode.value == "nothing":
						text = _("nothing connected")
					elif nimConfig.configMode.value == "enabled":
						text = _("enabled")
					
				self.list.append((slotid, x.friendly_full_description, text, x))
		self["nimlist"].setList(self.list)
		self["nimlist"].updateList(self.list)
Beispiel #25
0
	def __init__(self, session):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Satfinder"))

		nimlist = nimmanager.getNimListOfType("DVB-S")
		nimMenuList = []
		for x in nimlist:
			if not nimmanager.getNimConfig(x).configMode.getValue() in ("loopthrough", "satposdepends", "nothing"):
				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)
Beispiel #26
0
def SatfinderMain(session, **kwargs):
	nims = nimmanager.getNimListOfType("DVB-S")

	nimList = []
	for x in nims:
		if not nimmanager.getNimConfig(x).configMode.getValue() in ("loopthrough", "satposdepends", "nothing"):
			nimList.append(x)

	if len(nimList) == 0:
		session.open(MessageBox, _("No satellite 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 start the satfinder."), MessageBox.TYPE_ERROR)
		else:
			if len(nimList) == 1:
				session.open(Satfinder, nimList[0])
			else:
				session.open(SatNimSelection)
Beispiel #27
0
def SatfinderMain(session, **kwargs):
	nims = nimmanager.getNimListOfType("DVB-S")

	nimList = []
	for x in nims:
		if not nimmanager.getNimConfig(x).configMode.value in ("loopthrough", "satposdepends", "nothing"):
			nimList.append(x)

	if len(nimList) == 0:
		session.open(MessageBox, _("No satellite 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 start the satfinder."), MessageBox.TYPE_ERROR)
		else:
			if len(nimList) == 1:
				session.open(Satfinder, nimList[0])
			else:
				session.open(SatNimSelection)
Beispiel #28
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Satfinder"))

        nimlist = nimmanager.getNimListOfType("DVB-S")
        nimMenuList = []
        for x in nimlist:
            if not nimmanager.getNimConfig(x).configMode.getValue() in (
                    "loopthrough", "satposdepends", "nothing"):
                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)
Beispiel #29
0
	def SatfinderMain(self):
		if getBoxType() == '7300s':
			self.session.open(MessageBox, _("No Positionerplugin found please Check it!"), MessageBox.TYPE_ERROR)
		else:
			from Plugins.SystemPlugins.Satfinder.plugin import Satfinder
			nims = nimmanager.getNimListOfType("DVB-S")

			nimList = []
			for x in nims:
				if not nimmanager.getNimConfig(x).dvbs.configMode.value in ("loopthrough", "satposdepends", "nothing"):
					nimList.append(x)

			if len(nimList) == 0:
				self.session.open(MessageBox, _("No satellite 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 start the satfinder."), MessageBox.TYPE_ERROR)
				else:
					if len(nimList) == 1:
						self.session.open(Satfinder)
					elif len(nimList) > 1:
						self.session.open(Satfinder)
Beispiel #30
0
    def parseNimConfiguration(self):
        self.diseqc_position = {}
        for x in nimmanager.nim_slots:
            nimConfig = nimmanager.getNimConfig(x.slot)

            if x.isCompatible("DVB-S"):
                if nimConfig.configMode.value == "simple":
                    #					print "[FastZapSupport] nimConfig.diseqcMode.value : ", nimConfig.diseqcMode.value
                    if nimConfig.diseqcMode.value == "single" and not nimConfig.simpleSingleSendDiSEqC.value:
                        continue

                    elif nimConfig.diseqcMode.value == "diseqc_a_b" or nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
                        pass

                    else:
                        continue

                    if nimConfig.diseqcA.orbital_position != 3601:  # 3601: nothing connected
                        if not self.diseqc_position.has_key(
                                nimConfig.diseqcA.orbital_position):
                            self.diseqc_position[
                                nimConfig.diseqcA.orbital_position] = {
                                    "pos": "AA",
                                    "lofth": 11700000
                                }

                    if nimConfig.diseqcB.orbital_position != 3601:
                        if not self.diseqc_position.has_key(
                                nimConfig.diseqcB.orbital_position):
                            self.diseqc_position[
                                nimConfig.diseqcB.orbital_position] = {
                                    "pos": "AB",
                                    "lofth": 11700000
                                }

                    if nimConfig.diseqcC.orbital_position != 3601:
                        if not self.diseqc_position.has_key(
                                nimConfig.diseqcC.orbital_position):
                            self.diseqc_position[
                                nimConfig.diseqcC.orbital_position] = {
                                    "pos": "BA",
                                    "lofth": 11700000
                                }

                    if nimConfig.diseqcD.orbital_position != 3601:
                        if not self.diseqc_position.has_key(
                                nimConfig.diseqcD.orbital_position):
                            self.diseqc_position[
                                nimConfig.diseqcD.orbital_position] = {
                                    "pos": "BB",
                                    "lofth": 11700000
                                }

                elif nimConfig.configMode.value == "advanced":
                    if nimConfig.advanced.sats.orbital_position is None:
                        continue

                    cur_orb_pos = nimConfig.advanced.sats.orbital_position
                    satlist = nimConfig.advanced.sat.keys()

                    if cur_orb_pos not in satlist:
                        cur_orb_pos = satlist[0]

                    currSat = nimConfig.advanced.sat[cur_orb_pos]
                    lnbnum = int(currSat.lnb.value)
                    currLnb = nimConfig.advanced.lnb[lnbnum]

                    if isinstance(currLnb, ConfigNothing):
                        continue

                    if currLnb.lof.value == "universal_lnb":
                        lofth = 11700000

                    elif currLnb.lof.value == "user_defined":
                        lofth = int(currLnb.threshold.value) * 1000
                    else:
                        continue

                    if currLnb.diseqcMode.value == "none":
                        continue

                    if currLnb.commitedDiseqcCommand.value == "none":
                        continue

                    if currLnb.commitedDiseqcCommand.value in [
                            "AA", "AB", "BA", "BB"
                    ]:
                        position = currLnb.commitedDiseqcCommand.value

                    else:
                        position = "AA"

                    self.diseqc_position[cur_orb_pos] = {
                        "pos": position,
                        "lofth": lofth
                    }
Beispiel #31
0
	def updateList(self):
		self.list = [ ]
		slot_names = [ x.getSlotInputName(True) for x in nimmanager.nim_slots ]
		for x in nimmanager.nim_slots:
			slotid = x.slot
			nimConfig = nimmanager.getNimConfig(x.slot)
			#text = nimConfig.configMode.value
			if self.showNim(x):
				text = ""
				if x.isCompatible("DVB-C"):
					if x.isMultiType():
						text += "DVB-C: "
					text += _(NimManager.config_mode_str[nimConfig.cable.configMode.value]) + "\n"
				if x.isCompatible("DVB-T"):
					if nimConfig.terrest.configMode.value == "enabled" and nimConfig.terrest.use5V.value:
						txt2 = " (+5 Volt)\n"
					else:
						txt2 = "\n" 
					if x.isMultiType():
						text += x.isCompatible("DVB-T2") and 'DVB-T2: ' or 'DVB-T: ' 
					text += _(NimManager.config_mode_str[nimConfig.terrest.configMode.value]) + txt2
				if x.isCompatible("DVB-S"):
					txt = '' if not x.isMultiType() else x.isCompatible("DVB-S2") and 'DVB-S2: ' or 'DVB-S: '
					configMode = nimConfig.sat.configMode.value
					if configMode in ("loopthrough", "equal", "satposdepends"):
						if configMode == "loopthrough":
							txt += nimConfig.sat.configMode.getText()
						else:
							txt += _(nimmanager.config_mode_str[configMode])
						txt += " %s %s" %(_("Tuner"), slot_names[int(nimConfig.connectedTo.value)])
					elif configMode == "nothing":
						txt += _(NimManager.config_mode_str[configMode])
					elif configMode == "simple":
						if nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
							txt += {"single": _("Single"), "toneburst_a_b": _("Toneburst A/B"), "diseqc_a_b": _("DiSEqC A/B"), "diseqc_a_b_c_d": _("DiSEqC A/B/C/D")}[nimConfig.diseqcMode.value] + "\n"
							txt += _("Sats") + ": " 
							satnames = []
							if nimConfig.diseqcA.orbital_position != 3601:
								satnames.append(nimmanager.getSatName(int(nimConfig.diseqcA.value)))
							if nimConfig.diseqcMode.value in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
								if nimConfig.diseqcB.orbital_position != 3601:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcB.value)))
							if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
								if nimConfig.diseqcC.orbital_position != 3601:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcC.value)))
								if nimConfig.diseqcD.orbital_position != 3601:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcD.value)))
							if len(satnames) <= 2:
								txt += ", ".join(satnames)
							elif len(satnames) > 2:
								# we need a newline here, since multi content lists don't support automtic line wrapping
								txt += ", ".join(satnames[:2]) + ",\n"
								txt += "         " + ", ".join(satnames[2:])
						elif nimConfig.diseqcMode.value == "positioner":
							txt += _("Positioner") + ":"
							if nimConfig.positionerMode.value == "usals":
								txt += _("USALS")
							elif nimConfig.positionerMode.value == "manual":
								txt += _("manual")
						else:	
							txt = _("simple")
					elif configMode == "advanced":
						txt += _("advanced")
					text += txt
				if not x.isSupported():
					text = _("tuner is not supported")

				self.list.append((slotid, x.friendly_full_description, text, x))
		self["nimlist"].setList(self.list)
		self["nimlist"].updateList(self.list)
Beispiel #32
0
    def updateList(self):
        self.list = []
        for x in nimmanager.nim_slots:
            slotid = x.slot
            nimConfig = nimmanager.getNimConfig(x.slot)
            text = nimConfig.configMode.value
            if self.showNim(x):
                if x.isCompatible("DVB-S"):
                    if nimConfig.configMode.value in ("loopthrough", "equal",
                                                      "satposdepends"):
                        text = {
                            "loopthrough": _("loopthrough to"),
                            "equal": _("equal to"),
                            "satposdepends": _("second cable of motorized LNB")
                        }[nimConfig.configMode.value]
                        text += " " + _("Tuner") + " " + [
                            "A", "B", "C", "D"
                        ][int(nimConfig.connectedTo.value)]
                    elif nimConfig.configMode.value == "nothing":
                        text = _("nothing connected")
                    elif nimConfig.configMode.value == "simple":
                        if nimConfig.diseqcMode.value in ("single",
                                                          "toneburst_a_b",
                                                          "diseqc_a_b",
                                                          "diseqc_a_b_c_d"):
                            text = _("Sats") + ": "
                            if nimConfig.diseqcA.orbital_position != 3601:
                                text += nimmanager.getSatName(
                                    int(nimConfig.diseqcA.value))
                            if nimConfig.diseqcMode.value in (
                                    "toneburst_a_b", "diseqc_a_b",
                                    "diseqc_a_b_c_d"):
                                if nimConfig.diseqcB.orbital_position != 3601:
                                    text += "," + nimmanager.getSatName(
                                        int(nimConfig.diseqcB.value))
                            if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
                                if nimConfig.diseqcC.orbital_position != 3601:
                                    text += "," + nimmanager.getSatName(
                                        int(nimConfig.diseqcC.value))
                                if nimConfig.diseqcD.orbital_position != 3601:
                                    text += "," + nimmanager.getSatName(
                                        int(nimConfig.diseqcD.value))
                        elif nimConfig.diseqcMode.value == "positioner":
                            text = _("Positioner") + ":"
                            if nimConfig.positionerMode.value == "usals":
                                text += _("USALS")
                            elif nimConfig.positionerMode.value == "manual":
                                text += _("manual")
                        else:
                            text = _("simple")
                    elif nimConfig.configMode.value == "advanced":
                        text = _("advanced")
                elif x.isCompatible("DVB-T") or x.isCompatible("DVB-C"):
                    if nimConfig.configMode.value == "nothing":
                        text = _("nothing connected")
                    elif nimConfig.configMode.value == "enabled":
                        text = _("enabled")

                self.list.append(
                    (slotid, x.friendly_full_description, text, x))
        self["nimlist"].setList(self.list)
        self["nimlist"].updateList(self.list)
Beispiel #33
0
	def parseNimConfiguration(self):
		self.diseqc_position = {}
		for x in nimmanager.nim_slots:
			nimConfig = nimmanager.getNimConfig(x.slot)

			if x.isCompatible("DVB-S"):
				if nimConfig.configMode.value == "simple":
#					print "[FastZapSupport] nimConfig.diseqcMode.value : ", nimConfig.diseqcMode.value
					if nimConfig.diseqcMode.value == "single" and not nimConfig.simpleSingleSendDiSEqC.value:					
						continue

					elif nimConfig.diseqcMode.value == "diseqc_a_b" or nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
						pass

					else:
						continue

					if nimConfig.diseqcA.orbital_position != 3601: # 3601: nothing connected
						if not self.diseqc_position.has_key(nimConfig.diseqcA.orbital_position):
							self.diseqc_position[nimConfig.diseqcA.orbital_position] = {"pos" : "AA", "lofth" : 11700000}

					if nimConfig.diseqcB.orbital_position != 3601:
						if not self.diseqc_position.has_key(nimConfig.diseqcB.orbital_position):
							self.diseqc_position[nimConfig.diseqcB.orbital_position] = {"pos" : "AB", "lofth" : 11700000}

					if nimConfig.diseqcC.orbital_position != 3601:
						if not self.diseqc_position.has_key(nimConfig.diseqcC.orbital_position):
							self.diseqc_position[nimConfig.diseqcC.orbital_position] = {"pos" : "BA", "lofth" : 11700000}

					if nimConfig.diseqcD.orbital_position != 3601:
						if not self.diseqc_position.has_key(nimConfig.diseqcD.orbital_position):
							self.diseqc_position[nimConfig.diseqcD.orbital_position] = {"pos" : "BB", "lofth": 11700000}

				elif nimConfig.configMode.value == "advanced":
					if nimConfig.advanced.sats.orbital_position is None:
						continue

					cur_orb_pos = nimConfig.advanced.sats.orbital_position
					satlist = nimConfig.advanced.sat.keys()

					if cur_orb_pos not in satlist:
						cur_orb_pos = satlist[0]

					currSat = nimConfig.advanced.sat[cur_orb_pos]
					lnbnum = int(currSat.lnb.value)
					currLnb = nimConfig.advanced.lnb[lnbnum]

					if isinstance(currLnb, ConfigNothing):
						continue

					if currLnb.lof.value == "universal_lnb":
						lofth = 11700000

					elif currLnb.lof.value == "user_defined":
						lofth = int(currLnb.threshold.value) * 1000
					else:
						continue

					if currLnb.diseqcMode.value == "none":
						continue

					if currLnb.commitedDiseqcCommand.value == "none":
						continue

					if currLnb.commitedDiseqcCommand.value in ["AA", "AB", "BA", "BB"]:
						position = currLnb.commitedDiseqcCommand.value

					else:
						position = "AA"

					self.diseqc_position[cur_orb_pos] = {"pos" : position, "lofth" : lofth}
Beispiel #34
0
    def updateList(self, index = None):
        self.list = []
        for x in nimmanager.nim_slots:
            slotid = x.slot
            nimConfig = nimmanager.getNimConfig(x.slot)
            text = nimConfig.configMode.value
            if self.showNim(x):
                if x.isCompatible('DVB-S'):
                    if nimConfig.configMode.value in ('loopthrough', 'equal', 'satposdepends'):
                        text = {'loopthrough': _('Loop through to'),
                         'equal': _('Equal to'),
                         'satposdepends': _('Second cable of motorized LNB')}[nimConfig.configMode.value]
                        if len(x.input_name) > 1:
                            text += ' ' + _('Tuner') + ' ' + ['A1',
                             'A2',
                             'B',
                             'C'][int(nimConfig.connectedTo.value)]
                        else:
                            text += ' ' + _('Tuner') + ' ' + ['A',
                             'B',
                             'C',
                             'D'][int(nimConfig.connectedTo.value)]
                    elif nimConfig.configMode.value == 'nothing':
                        text = _('not configured')
                    elif nimConfig.configMode.value == 'simple':
                        if nimConfig.diseqcMode.value in ('single', 'toneburst_a_b', 'diseqc_a_b', 'diseqc_a_b_c_d'):
                            text = {'single': _('Single'),
                             'toneburst_a_b': _('Toneburst A/B'),
                             'diseqc_a_b': _('DiSEqC A/B'),
                             'diseqc_a_b_c_d': _('DiSEqC A/B/C/D')}[nimConfig.diseqcMode.value] + '\n'
                            text += _('Sats') + ': '
                            satnames = []
                            if nimConfig.diseqcA.orbital_position < 3600:
                                satnames.append(nimmanager.getSatName(int(nimConfig.diseqcA.value)))
                            if nimConfig.diseqcMode.value in ('toneburst_a_b', 'diseqc_a_b', 'diseqc_a_b_c_d'):
                                if nimConfig.diseqcB.orbital_position < 3600:
                                    satnames.append(nimmanager.getSatName(int(nimConfig.diseqcB.value)))
                            if nimConfig.diseqcMode.value == 'diseqc_a_b_c_d':
                                if nimConfig.diseqcC.orbital_position < 3600:
                                    satnames.append(nimmanager.getSatName(int(nimConfig.diseqcC.value)))
                                if nimConfig.diseqcD.orbital_position < 3600:
                                    satnames.append(nimmanager.getSatName(int(nimConfig.diseqcD.value)))
                            if len(satnames) <= 2:
                                text += ', '.join(satnames)
                            elif len(satnames) > 2:
                                text += ', '.join(satnames[:2]) + ',\n'
                                text += '         ' + ', '.join(satnames[2:])
                        elif nimConfig.diseqcMode.value in ('positioner', 'positioner_select'):
                            text = {'positioner': _('Positioner'),
                             'positioner_select': _('Positioner (selecting satellites)')}[nimConfig.diseqcMode.value]
                            text += ':'
                            if nimConfig.positionerMode.value == 'usals':
                                text += 'USALS'
                            elif nimConfig.positionerMode.value == 'manual':
                                text += _('Manual')
                        else:
                            text = _('Simple')
                    elif nimConfig.configMode.value == 'advanced':
                        text = _('Advanced')
                elif x.isCompatible('DVB-T') or x.isCompatible('DVB-C'):
                    if nimConfig.configMode.value == 'nothing':
                        text = _('nothing connected')
                    elif nimConfig.configMode.value == 'enabled':
                        text = _('Enabled')
                if x.isMultiType():
                    text = _('Switchable tuner types:') + '(' + ','.join(x.getMultiTypeList().values()) + ')' + '\n' + text
                if not x.isSupported():
                    text = _('Tuner is not supported')
                self.list.append((slotid,
                 x.friendly_full_description,
                 text,
                 x))

        self['nimlist'].setList(self.list)
        self['nimlist'].updateList(self.list)
        if index is not None:
            self['nimlist'].setIndex(index)
        return
Beispiel #35
0
	def updateList(self):
		self.list = [ ]
		slot_names = [ x.slot_input_name for x in nimmanager.nim_slots ]
		for x in nimmanager.nim_slots:
			slotid = x.slot
			nimConfig = nimmanager.getNimConfig(x.slot)
			#text = nimConfig.configMode.value
			if self.showNim(x):
				text = ""
				if x.isCompatible("DVB-C"):
					if x.isMultiType():
						text += "DVB-C: "
					text += _(NimManager.config_mode_str[nimConfig.cable.configMode.value]) + "\n"
				if x.isCompatible("DVB-T"):
					if nimConfig.terrest.configMode.value == "enabled" and nimConfig.terrest.use5V.value:
						txt2 = " (+5 Volt)\n"
					else:
						txt2 = "\n" 
					if x.isMultiType():
						text += x.isCompatible("DVB-T2") and 'DVB-T2: ' or 'DVB-T: ' 
					text += _(NimManager.config_mode_str[nimConfig.terrest.configMode.value]) + txt2
				if x.isCompatible("DVB-S"):
					txt = '' if not x.isMultiType() else x.isCompatible("DVB-S2") and 'DVB-S2: ' or 'DVB-S: '
					configMode = nimConfig.sat.configMode.value
					if configMode in ("loopthrough", "equal", "satposdepends"):
						if configMode == "loopthrough":
							txt += nimConfig.sat.configMode.getText()
						else:
							txt += _(nimmanager.config_mode_str[configMode])
						txt += " %s %s" %(_("Tuner"), slot_names[int(nimConfig.connectedTo.value)])
					elif configMode == "nothing":
						txt += _(NimManager.config_mode_str[configMode])
					elif configMode == "simple":
						if nimConfig.diseqcMode.value in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
							txt += {"single": _("Single"), "toneburst_a_b": _("Toneburst A/B"), "diseqc_a_b": _("DiSEqC A/B"), "diseqc_a_b_c_d": _("DiSEqC A/B/C/D")}[nimConfig.diseqcMode.value] + "\n"
							txt += _("Sats") + ": " 
							satnames = []
							if nimConfig.diseqcA.orbital_position != 3601:
								satnames.append(nimmanager.getSatName(int(nimConfig.diseqcA.value)))
							if nimConfig.diseqcMode.value in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"):
								if nimConfig.diseqcB.orbital_position != 3601:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcB.value)))
							if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
								if nimConfig.diseqcC.orbital_position != 3601:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcC.value)))
								if nimConfig.diseqcD.orbital_position != 3601:
									satnames.append(nimmanager.getSatName(int(nimConfig.diseqcD.value)))
							if len(satnames) <= 2:
								txt += ", ".join(satnames)
							elif len(satnames) > 2:
								# we need a newline here, since multi content lists don't support automtic line wrapping
								txt += ", ".join(satnames[:2]) + ",\n"
								txt += "         " + ", ".join(satnames[2:])
						elif nimConfig.diseqcMode.value == "positioner":
							txt += _("Positioner") + ":"
							if nimConfig.positionerMode.value == "usals":
								txt += _("USALS")
							elif nimConfig.positionerMode.value == "manual":
								txt += _("manual")
						else:	
							txt = _("simple")
					elif configMode == "advanced":
						txt += _("advanced")
					text += txt
				if not x.isSupported():
					text = _("tuner is not supported")

				self.list.append((slotid, x.friendly_full_description, text, x))
		self["nimlist"].setList(self.list)
		self["nimlist"].updateList(self.list)
Beispiel #36
0
	def __init__(self, session):

		self["actions"] = ActionMap(["OkCancelActions","WizardActions"],
		{
			"ok": self.TestAction,
			"cancel": self.keyCancel,
			"agingstart": self.Agingmode,
		}, -2)

		Screen.__init__(self, session)
		TESTPROGRAM_DATE = "2009-12-09"
		TESTPROGRAM_VERSION = "Version 00.01"
		self["testdate"]=Label((TESTPROGRAM_DATE))
		self["testversion"]=Label(("Loading version..."))
		self["mactext"]=Label(("Loading mac address..."))
		nimConfig = nimmanager.getNimConfig(0)
		nimConfig.configMode.slot_id=0
		nimConfig.configMode.value= "simple"
		nimConfig.diseqcMode.value="diseqc_a_b"
		nimConfig.diseqcA.value="160"
		nimConfig.diseqcB.value="100"
		nimConfig = nimmanager.getNimConfig(1)
		nimConfig.configMode.slot_id=1		
		nimConfig.configMode.value= "simple"
		nimConfig.diseqcMode.value="diseqc_a_b"
		nimConfig.diseqcA.value="130"
		nimConfig.diseqcB.value="192"
		nimmanager.sec.update()		
		
		system("cp /usr/lib/enigma2/python/Plugins/SystemPlugins/FactoryTest/testdb /etc/enigma2/lamedb")
		db = eDVBDB.getInstance()
		db.reloadServicelist()

		tlist = []
		tlist.append((" 0. sata & extend hdd test",0))
		tlist.append((" 1. Front test",1))
		tlist.append((" 2. Smartcard test",2))
		tlist.append((" 3. T1 H 22K x 4:3 CVBS",3))
		tlist.append((" 4. T1 V 22k o 16:9 RGB",4))
		tlist.append((" 5. T2 H 22k x 4:3 YC",5))
		tlist.append((" 6. T2 V 22k o 16:9 CVBS",6))
		tlist.append((" 7. VCR Scart loop",7))
		tlist.append((" 8. rs232 test",8))
		tlist.append((" 9. usb test",9))
		tlist.append(("10. ethernet & mac test",10))
#		tlist.append(("11. DRAM test",11))
#		tlist.append(("12. Flash test",12))
#		tlist.append(("13. DRAM+Flash test",13))
		tlist.append(("11. factory default",11))
		tlist.append(("12. shutdown",12))
		self["testlist"] = MenuList(tlist)
		self.rlist = []
#		for x in range(15):
		for x in range(12):
			self.rlist.append((".."))
		self["resultlist"] = TestResultList(self.rlist)
		self.NetworkState = 0
		self.first = 0

		self.avswitch = AVSwitch()
		self.memTest = eMemtest()
		self.scTest= eSctest()
		
		self.feid=0

		self.servicelist = ServiceList()
		self.oldref = session.nav.getCurrentlyPlayingServiceReference()
		print "oldref",self.oldref
		session.nav.stopService() # try to disable foreground service
		
		self.tunemsgtimer = eTimer()
		self.tunemsgtimer.callback.append(self.tunemsg)

		self.camstep = 1
		self.camtimer = eTimer()
		self.camtimer.callback.append(self.cam_state)
		self.getmacaddr()
		self.getversion()
		
		self.tunerlock = 0
		self.tuningtimer = eTimer()
		self.tuningtimer.callback.append(self.updateStatus)