- def startSatBlindscanSearch(self, nim_idx, orbpos, session):
- if self.blindscan_start_frequency.value < 950*1000000 or self.blindscan_start_frequency.value > 2150*1000000 :
- self.session.open(MessageBox, _("Please check again.\nStart frequency must be between 950 and 2150."), MessageBox.TYPE_ERROR)
- return
- if self.blindscan_stop_frequency.value < 950*1000000 or self.blindscan_stop_frequency.value > 2150*1000000 :
- self.session.open(MessageBox, _("Please check again.\nStop frequency must be between 950 and 2150."), MessageBox.TYPE_ERROR)
- return
- if self.blindscan_start_frequency.value > self.blindscan_stop_frequency.value :
- self.session.open(MessageBox, _("Please check again.\nFrequency : start value is larger than stop value."), MessageBox.TYPE_ERROR)
- return
- if self.blindscan_start_symbol.value < 2*1000000 or self.blindscan_start_symbol.value > 45*1000000 :
- self.session.open(MessageBox, _("Please check again.\nStart symbolrate must be between 2MHz and 45MHz."), MessageBox.TYPE_ERROR)
- return
- if self.blindscan_stop_symbol.value < 2*1000000 or self.blindscan_stop_symbol.value > 45*1000000 :
- self.session.open(MessageBox, _("Please check again.\nStop symbolrate must be between 2MHz and 45MHz."), MessageBox.TYPE_ERROR)
- return
- if self.blindscan_start_symbol.value > self.blindscan_stop_symbol.value :
- self.session.open(MessageBox, _("Please check again.\nSymbolrate : start value is larger than stop value."), MessageBox.TYPE_ERROR)
- return
-
- self.__tlist = [ ]
- self.remainingdata = ""
- self.feid = nim_idx
- if not self.openFrontend():
- self.oldref = session.nav.getCurrentlyPlayingServiceReference()
- session.nav.stopService() # try to disable foreground service
- if not self.openFrontend():
- if session.pipshown: # try to disable pip
- session.pipshown = False
- del session.pip
- if not self.openFrontend():
- self.frontend = None # in normal case this should not happen
-
- self.tuner = Tuner(self.frontend)
- sat = self.satList[0][self.scan_satselection[0].index]
-
- tab_hilow = {"high" : 1, "low" : 0}
- returnvalue = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
- if tab_hilow[self.blindscan_hi.value]:
- self.scan_sat.frequency.value = 12515
- else:
- self.scan_sat.frequency.value = 11015
- returnvalue = (self.scan_sat.frequency.value,
- 0,
- self.scan_sat.polarization.value,
- 0,
- 0,
- int(orbpos[0]),
- eDVBFrontendParametersSatellite.System_DVB_S,
- 0,
- 0,
- 0)
- self.tuner.tune(returnvalue)
-
- self.blind_search_container = eConsoleAppContainer()
- self.blind_search_container.appClosed.append(self.blindScanSearchClosed)
- self.blind_search_container.dataAvail.append(self.getBlindTransponderData)
- cmd = "/usr/lib/enigma2/python/Plugins/SystemPlugins/Blindscan/vuplus_blindscan %d %d %d %d %d %d %d" % (self.blindscan_start_frequency.value/1000000, self.blindscan_stop_frequency.value/1000000, self.blindscan_start_symbol.value/1000000, self.blindscan_stop_symbol.value/1000000, self.scan_sat.polarization.value, tab_hilow[self.blindscan_hi.value], self.feid)
- print "prepared command : ", cmd
- self.blind_search_container.execute(cmd)
-
- tmpstr = _("Preparing scanning... \nPlease wait a few minutes.")
- self.blind_search_session = self.session.openWithCallback(self.blindTransponderSearchSessionClosed, MessageBox, tmpstr, MessageBox.TYPE_INFO)
-
-class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
- skin="""
- <screen name="Blindscan" position="center,center" size="560,250" title="Blindscan">
- <ePixmap pixmap="Vu_HD/buttons/red.png" position="5,0" size="140,40" alphatest="on" />
- <ePixmap pixmap="Vu_HD/buttons/green.png" position="145,0" size="140,40" alphatest="on" />
- <ePixmap pixmap="Vu_HD/buttons/button_off.png" position="285,0" size="140,40" alphatest="on" />
- <ePixmap pixmap="Vu_HD/buttons/button_off.png" position="425,0" size="140,40" alphatest="on" />
- <widget source="key_red" render="Label" position="20,0" zPosition="1" size="115,30" font="Regular;20" halign="center" valign="center" transparent="1" />
- <widget source="key_green" render="Label" position="160,0" zPosition="1" size="115,30" font="Regular;20" halign="center" valign="center" transparent="1" />
- <widget name="config" position="5,50" size="550,200" scrollbarMode="showOnDemand" />
- </screen>
- """
- def __init__(self, session):
- Screen.__init__(self, session)
-
- self.updateSatList()
- self.service = session.nav.getCurrentService()
- self.current_play_service = self.session.nav.getCurrentlyPlayingServiceReference()