From: Andreas Monzner Date: Sat, 19 Jul 2008 10:24:01 +0000 (+0000) Subject: remove no more needed function X-Git-Tag: 2.6.0~1017 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/5fc2635967a60400e54854500332e2be21b88b79 remove no more needed function --- diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 5c0601ad..0f43d77f 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -1148,111 +1148,6 @@ struct sat_compare } }; -PyObject *eDVBSatelliteEquipmentControl::get_exclusive_satellites(int tu1, int tu2) -{ - ePyObject ret; - - if (tu1 != tu2) - { - eDVBRegisteredFrontend *p1=NULL, *p2=NULL; - int cnt=0; - for (eSmartPtrList::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it, ++cnt) - { - if (cnt == tu1) - p1 = *it; - else if (cnt == tu2) - p2 = *it; - } - - if (p1 && p2) - { - // check for linked tuners - - do - { - long tmp; - p1->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp); - if (tmp != -1) - p1 = (eDVBRegisteredFrontend*)tmp; - else - break; - } - while (true); - - do - { - long tmp; - p2->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp); - if (tmp != -1) - p2 = (eDVBRegisteredFrontend*)tmp; - else - break; - } - while (true); - - if (p1 != p2) - { - long tmp1=-1; - long tmp2=-1; - // check for rotor dependency - p1->m_frontend->getData(eDVBFrontend::SATPOS_DEPENDS_PTR, tmp1); - if (tmp1 != -1) - p1 = (eDVBRegisteredFrontend*)tmp1; - p2->m_frontend->getData(eDVBFrontend::SATPOS_DEPENDS_PTR, tmp2); - if (tmp2 != -1) - p2 = (eDVBRegisteredFrontend*)tmp2; - if (p1 != p2) - { - int tu1_mask = 1 << p1->m_frontend->getSlotID(), - tu2_mask = 1 << p2->m_frontend->getSlotID(); - std::set tu1sats, tu2sats; - std::list tu1difference, tu2difference; - std::insert_iterator > insert1(tu1difference, tu1difference.begin()), - insert2(tu2difference, tu2difference.begin()); - for (int idx=0; idx <= m_lnbidx; ++idx ) - { - eDVBSatelliteLNBParameters &lnb_param = m_lnbs[idx]; - for (std::map::iterator sit(lnb_param.m_satellites.begin()); - sit != lnb_param.m_satellites.end(); ++sit) - { - if ( lnb_param.slot_mask & tu1_mask ) - tu1sats.insert(sat_compare(sit->first, lnb_param.m_lof_lo, lnb_param.m_lof_hi)); - if ( lnb_param.slot_mask & tu2_mask ) - tu2sats.insert(sat_compare(sit->first, lnb_param.m_lof_lo, lnb_param.m_lof_hi)); - } - } - std::set_difference(tu1sats.begin(), tu1sats.end(), - tu2sats.begin(), tu2sats.end(), - insert1); - std::set_difference(tu2sats.begin(), tu2sats.end(), - tu1sats.begin(), tu1sats.end(), - insert2); - if (!tu1sats.empty() || !tu2sats.empty()) - { - int idx=0; - ret = PyList_New(2+tu1difference.size()+tu2difference.size()); - - PyList_SET_ITEM(ret, idx++, PyInt_FromLong(tu1difference.size())); - for(std::list::iterator it(tu1difference.begin()); it != tu1difference.end(); ++it) - PyList_SET_ITEM(ret, idx++, PyInt_FromLong(it->orb_pos)); - - PyList_SET_ITEM(ret, idx++, PyInt_FromLong(tu2difference.size())); - for(std::list::iterator it(tu2difference.begin()); it != tu2difference.end(); ++it) - PyList_SET_ITEM(ret, idx++, PyInt_FromLong(it->orb_pos)); - } - } - } - } - } - if (!ret) - { - ret = PyList_New(2); - PyList_SET_ITEM(ret, 0, PyInt_FromLong(0)); - PyList_SET_ITEM(ret, 1, PyInt_FromLong(0)); - } - return ret; -} - RESULT eDVBSatelliteEquipmentControl::setTunerLinked(int tu1, int tu2) { eSecDebug("eDVBSatelliteEquipmentControl::setTunerLinked(%d, %d)", tu1, tu2); diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index 18935b97..92aff3dc 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -322,7 +322,6 @@ public: RESULT setTunerDepends(int from, int to); void setSlotNotLinked(int tuner_no); - PyObject *get_exclusive_satellites(int tu1, int tu2); void setRotorMoving(bool); // called from the frontend's bool isRotorMoving(); bool canMeasureInputPower() { return m_canMeasureInputPower; } diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index 2a80fcbe..b14c7e74 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -797,18 +797,6 @@ class ScanSimple(ConfigListScreen, Screen, CableTransponderSearchSupport): def getNetworksForNim(self, nim): if nim.isCompatible("DVB-S"): networks = nimmanager.getSatListForNim(nim.slot) -# the original code took "loopthrough" etc. into account. Do we need this? -# if nimmanager.getNimConfigMode(1) in ["loopthrough", "satposdepends", "equal", "nothing"]: -# return False -# sec = eDVBSatelliteEquipmentControl.getInstance() -# if sec is not None: -# exclusive_satellites = sec.get_exclusive_satellites(0,1) -# if len(exclusive_satellites) == 2: -# return False -# idx = exclusive_satellites[0]+1 -# exclusive_nim_sats = exclusive_satellites[idx+1:idx+1+exclusive_satellites[idx]] -# if len(exclusive_nim_sats): -# return True elif not nim.empty: networks = [ nim.type ] # "DVB-C" or "DVB-T". TODO: seperate networks for different C/T tuners, if we want to support that. else: