From 02172ca65853b9f61d46c0e5e7823ee69f203b83 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Tue, 11 Apr 2006 21:41:17 +0000 Subject: some logic to detect useable nims for rotor plugin --- lib/python/Components/NimManager.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'lib/python/Components') diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 950f48fd..824f9f71 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -434,7 +434,6 @@ class NimManager: def getTerrestrialFlags(self, nim): return self.terrestrialsList[config.Nims[nim].terrestrial.value][1] - def getConfiguredSats(self): return self.sec.getSatList() @@ -600,6 +599,28 @@ class NimManager: list.append(x) return list + def getRotorSatListForNim(self, slotid): + list = [] + if (self.getNimType(slotid) == self.nimType["DVB-S"]): + #print "slotid:", slotid + + #print "self.satellites:", self.satList[config.Nims[slotid].diseqcA.value] + #print "diseqcA:", config.Nims[slotid].diseqcA.value + configMode = currentConfigSelectionElement(config.Nims[slotid].configMode) + if configMode == "simple": + if (config.Nims[slotid].diseqcMode.value == 4): + for x in self.satList: + list.append(x) + elif configMode == "advanced": + for x in self.satList: + nim = config.Nims[slotid] + lnbnum = nim.advanced.sat[x[1]].lnb.value + if lnbnum != 0: + lnb = nim.advanced.lnb[lnbnum] + if lnb.diseqcMode.value == 3: # diseqc 1.2 + list.append(x) + return list + def nimDiseqcModeChanged(self, slotid, mode): #print "nimDiseqcModeChanged set to " + str(mode) pass -- cgit v1.2.3