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;
}
#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
{
if (!m_timeoutCount)
{
eDebug("[SEC] rotor timout");
+ m_sec->setRotorMoving(false);
setSecSequencePos(m_sec_sequence.current()->steps);
}
else
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;
RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
{
+ eDebug("(%d)tune", m_fe);
+
if (m_type == -1)
return -ENODEV;
{
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;
}
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
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);
addSatellite(130);
setVoltageMode(eDVBSatelliteSwitchParameters::HV);
setToneMode(eDVBSatelliteSwitchParameters::HILO);
-#endif
+#else
// Rotor
addLNB();
setVoltageMode(eDVBSatelliteSwitchParameters::HV);
setToneMode(eDVBSatelliteSwitchParameters::HILO);
setRotorPosNum(1); // stored pos 1
+#endif
}
int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite &sat, iDVBFrontend *fe, int frontend_id )
bool eDVBSatelliteEquipmentControl::isRotorMoving()
{
- // TODO please fill with life
- return false;
+ return m_rotorMoving;
+}
+
+void eDVBSatelliteEquipmentControl::setRotorMoving(bool b)
+{
+ m_rotorMoving=b;
}
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);
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();
};