From: Andreas Monzner Date: Thu, 1 Dec 2005 09:49:12 +0000 (+0000) Subject: rotor running detection should now work ( yet only with measure input power ) X-Git-Tag: 2.6.0~4847 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/184706abfa809e8d8b6452a599313fe0e341c980?ds=sidebyside rotor running detection should now work ( yet only with measure input power ) --- diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index a05963cd..795841b8 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -292,6 +292,10 @@ eDVBFrontend::eDVBFrontend(int adap, int fe, int &ok): m_type(-1), m_fe(fe), m_c for (int i=0; isetRotorMoving(false); setSecSequencePos(m_sec_sequence.current()->steps); } else @@ -553,6 +558,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer eDebug("[SEC] rotor %s step %d ok", txt, cmd.okcount); if ( cmd.okcount > 6 ) { + m_sec->setRotorMoving(cmd.direction); eDebug("[SEC] rotor is %s", txt); if (setSecSequencePos(cmd.steps)) break; @@ -611,6 +617,8 @@ RESULT eDVBFrontend::getFrontendType(int &t) RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where) { + eDebug("(%d)tune", m_fe); + if (m_type == -1) return -ENODEV; @@ -1009,6 +1017,8 @@ RESULT eDVBFrontend::setData(int num, int val) { if ( num < (int)(sizeof(m_data)/sizeof(int)) ) { + if ( num == 0 ) + eDebug("(%d) set csw %02x", m_fe, val); m_data[num] = val; return 0; } diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h index 699474d3..119b6e37 100644 --- a/lib/dvb/idvb.h +++ b/lib/dvb/idvb.h @@ -355,6 +355,7 @@ class iDVBSatelliteEquipmentControl: public iObject public: virtual RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, eDVBFrontendParametersSatellite &sat, int frontend_id)=0; virtual int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *fe, int frontend_id)=0; + virtual void setRotorMoving(bool)=0; }; struct eDVBCIRouting diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 48ab922a..64443066 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -21,14 +21,14 @@ DEFINE_REF(eDVBSatelliteEquipmentControl); eDVBSatelliteEquipmentControl *eDVBSatelliteEquipmentControl::instance; eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList &avail_frontends) - :m_lnbidx(-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends) + :m_lnbidx(-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends), m_rotorMoving(false) { if (!instance) instance = this; clear(); -#if 0 +#if 1 // ASTRA addLNB(); setLNBTunerMask(3); @@ -62,7 +62,7 @@ eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList::iterator m_curSat; eSmartPtrList &m_avail_frontends; + bool m_rotorMoving; #endif public: eDVBSatelliteEquipmentControl(eSmartPtrList &avail_frontends); @@ -252,7 +253,8 @@ public: RESULT setRotorPosNum(int rotor_pos_num); /* Tuner Specific Parameters */ RESULT setTunerLinked(int from, int to); - + + void setRotorMoving(bool); // called from the frontend's bool isRotorMoving(); };