fix rotor tuning symbol
authorghost <andreas.monzner@multimedia-labs.de>
Tue, 27 Oct 2009 10:45:32 +0000 (11:45 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Tue, 27 Oct 2009 23:48:48 +0000 (00:48 +0100)
lib/dvb/frontend.cpp
lib/dvb/idvb.h
lib/dvb/sec.cpp
lib/dvb/sec.h

index c6bf6aa..c0263fb 100644 (file)
@@ -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;
index 26ab5e5..cff4dbb 100644 (file)
@@ -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
index c06c603..9124688 100644 (file)
@@ -37,7 +37,7 @@ void eDVBSatelliteEquipmentControl::setParam(int param, int value)
 }
 
 eDVBSatelliteEquipmentControl::eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &avail_frontends, eSmartPtrList<eDVBRegisteredFrontend> &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);
 }
index 5d96932..c50aee4 100644 (file)
@@ -298,7 +298,7 @@ private:
        int m_lnbidx; // current index for set parameters
        std::map<int, eDVBSatelliteSwitchParameters>::iterator m_curSat;
        eSmartPtrList<eDVBRegisteredFrontend> &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; }
 };