diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-12-01 09:49:12 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-12-01 09:49:12 +0000 |
| commit | 184706abfa809e8d8b6452a599313fe0e341c980 (patch) | |
| tree | 295ca82868cfe1a06dce279c7bef30c324870909 /lib | |
| parent | 2f6625c7a2308755191b04facd03a4a5527c064c (diff) | |
| download | enigma2-184706abfa809e8d8b6452a599313fe0e341c980.tar.gz enigma2-184706abfa809e8d8b6452a599313fe0e341c980.zip | |
rotor running detection should now work ( yet only with measure input power )
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dvb/frontend.cpp | 12 | ||||
| -rw-r--r-- | lib/dvb/idvb.h | 1 | ||||
| -rw-r--r-- | lib/dvb/sec.cpp | 15 | ||||
| -rw-r--r-- | lib/dvb/sec.h | 4 |
4 files changed, 25 insertions, 7 deletions
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; i<entries; ++i) m_data[i] = -1; + m_data[7] = !m_fe; + + eDebug("m_data[7] = %d %d", m_data[7], m_fe); + return; } @@ -333,7 +337,7 @@ void eDVBFrontend::feEvent(int w) #if HAVE_DVB_API_VERSION < 3 if (event.type == FE_COMPLETION_EV) #else - eDebug("fe event: status %x, inversion %s", event.status, (event.parameters.inversion == INVERSION_ON) ? "on" : "off"); + eDebug("(%d)fe event: status %x, inversion %s", m_fe, event.status, (event.parameters.inversion == INVERSION_ON) ? "on" : "off"); if (event.status & FE_HAS_LOCK) #endif { @@ -503,6 +507,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer if (!m_timeoutCount) { eDebug("[SEC] rotor timout"); + m_sec->setRotorMoving(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<eDVBRegisteredFrontend> &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<eDVBR addSatellite(130); setVoltageMode(eDVBSatelliteSwitchParameters::HV); setToneMode(eDVBSatelliteSwitchParameters::HILO); -#endif +#else // Rotor addLNB(); @@ -103,6 +103,7 @@ eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBR setVoltageMode(eDVBSatelliteSwitchParameters::HV); setToneMode(eDVBSatelliteSwitchParameters::HILO); setRotorPosNum(1); // stored pos 1 +#endif } int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite &sat, iDVBFrontend *fe, int frontend_id ) @@ -938,6 +939,10 @@ RESULT eDVBSatelliteEquipmentControl::setTunerLinked(int tu1, int tu2) bool eDVBSatelliteEquipmentControl::isRotorMoving() { - // TODO please fill with life - return false; + return m_rotorMoving; +} + +void eDVBSatelliteEquipmentControl::setRotorMoving(bool b) +{ + m_rotorMoving=b; } diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index 93d9cf24..aa9c0271 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -211,6 +211,7 @@ class eDVBSatelliteEquipmentControl: public iDVBSatelliteEquipmentControl int m_lnbidx; // current index for set parameters std::map<int, eDVBSatelliteSwitchParameters>::iterator m_curSat; eSmartPtrList<eDVBRegisteredFrontend> &m_avail_frontends; + bool m_rotorMoving; #endif public: eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &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(); }; |
