From dafa266c71fd625cd5a9bedbea10a47e27c868ad Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 27 Oct 2009 11:45:32 +0100 Subject: [PATCH] fix rotor tuning symbol --- lib/dvb/frontend.cpp | 8 ++++---- lib/dvb/idvb.h | 2 +- lib/dvb/sec.cpp | 9 ++++++--- lib/dvb/sec.h | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index c6bf6aa..c0263fb 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -604,7 +604,7 @@ int eDVBFrontend::closeFrontend(bool force) setVoltage(iDVBFrontend::voltageOff); m_tuneTimer->stop(); if (m_sec && !m_simulate) - m_sec->setRotorMoving(false); + m_sec->setRotorMoving(m_slotid, false); if (!::close(m_fd)) m_fd=-1; else @@ -1694,12 +1694,12 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer break; case eSecCommand::SET_ROTOR_MOVING: if (!m_simulate) - m_sec->setRotorMoving(true); + m_sec->setRotorMoving(m_slotid, true); ++m_sec_sequence.current(); break; case eSecCommand::SET_ROTOR_STOPPED: if (!m_simulate) - m_sec->setRotorMoving(false); + m_sec->setRotorMoving(m_slotid, false); ++m_sec_sequence.current(); break; case eSecCommand::IF_INPUTPOWER_DELTA_GOTO: @@ -2344,7 +2344,7 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where) goto tune_error; } if (!m_simulate) - m_sec->setRotorMoving(false); + m_sec->setRotorMoving(m_slotid, false); res=prepare_sat(feparm, timeout); if (res) goto tune_error; diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h index 26ab5e5..cff4dbb 100644 --- a/lib/dvb/idvb.h +++ b/lib/dvb/idvb.h @@ -490,7 +490,7 @@ class iDVBSatelliteEquipmentControl: public iObject public: virtual RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int frontend_id, unsigned int timeout)=0; virtual int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *fe, int frontend_id, int *highest_score_lnb=0)=0; - virtual void setRotorMoving(bool)=0; + virtual void setRotorMoving(int slotid, bool)=0; }; struct eDVBCIRouting diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index c06c603..9124688 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -37,7 +37,7 @@ void eDVBSatelliteEquipmentControl::setParam(int param, int value) } eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList &avail_frontends, eSmartPtrList &avail_simulate_frontends) - :m_lnbidx((sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters))-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends), m_avail_simulate_frontends(avail_simulate_frontends), m_rotorMoving(false) + :m_lnbidx((sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters))-1), m_curSat(m_lnbs[0].m_satellites.end()), m_avail_frontends(avail_frontends), m_avail_simulate_frontends(avail_simulate_frontends), m_rotorMoving(0) { if (!instance) instance = this; @@ -1481,7 +1481,10 @@ bool eDVBSatelliteEquipmentControl::isRotorMoving() return m_rotorMoving; } -void eDVBSatelliteEquipmentControl::setRotorMoving(bool b) +void eDVBSatelliteEquipmentControl::setRotorMoving(int slot_no, bool b) { - m_rotorMoving=b; + if (b) + m_rotorMoving |= (1 << slot_no); + else + m_rotorMoving &= ~(1 << slot_no); } diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index 5d96932..c50aee4 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -298,7 +298,7 @@ private: int m_lnbidx; // current index for set parameters std::map::iterator m_curSat; eSmartPtrList &m_avail_frontends, &m_avail_simulate_frontends; - bool m_rotorMoving; + int m_rotorMoving; int m_not_linked_slot_mask; bool m_canMeasureInputPower; #endif @@ -359,7 +359,7 @@ public: RESULT setTunerDepends(int from, int to); void setSlotNotLinked(int tuner_no); - void setRotorMoving(bool); // called from the frontend's + void setRotorMoving(int, bool); // called from the frontend's bool isRotorMoving(); bool canMeasureInputPower() { return m_canMeasureInputPower; } }; -- 2.7.4