}
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;
ret = 15000;
}
+ if (sat.no_rotor_command_on_tune && !rotor) {
+ eSecDebugNoSimulate("no rotor but no_rotor_command_on_tune is set.. ignore lnb %d", idx);
+ continue;
+ }
+
eSecDebugNoSimulate("ret1 %d", ret);
if (linked_in_use)
else
ret += 15;
eSecDebugNoSimulate("ret2 %d", ret);
- if (ret) // special case when this tuner is linked to a satpos dependent tuner
- {
- fe->getData(eDVBFrontend::SATPOS_DEPENDS_PTR, satpos_depends_ptr);
- if (satpos_depends_ptr != -1)
- {
- eDVBRegisteredFrontend *satpos_depends_to_fe = (eDVBRegisteredFrontend*) satpos_depends_ptr;
- satpos_depends_to_fe->m_frontend->getData(eDVBFrontend::ROTOR_POS, rotor_pos);
- if (!rotor || rotor_pos == -1 /* we dont know the rotor position yet */
- || rotor_pos != sat.orbital_position ) // not the same orbital position?
- {
- ret = 0;
- }
- }
- }
- eSecDebugNoSimulate("ret3 %d", ret);
}
else if (satpos_depends_ptr != -1)
{
else
ret += 10;
}
+ eSecDebugNoSimulate("ret3 %d", ret);
}
else // current fe is dependent of another tuner ... (so this fe can't turn the rotor!)
{
for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it)
{
long tmp;
- if (!strcmp(it->m_frontend->getDescription(), "BCM4501 (internal)") && !it->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp) && tmp != -1)
+ char c;
+ if (sscanf(it->m_frontend->getDescription(), "BCM450%c (internal)", &c) == 1 && !it->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp) && tmp != -1)
{
FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
if (!f || fwrite("B", 1, 1, f) != 1)
if (tu1 != tu2)
{
eDVBRegisteredFrontend *p1=NULL, *p2=NULL;
-
- for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it)
+ eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin());
+ for (; it != m_avail_frontends.end(); ++it)
{
if (it->m_frontend->getSlotID() == tu1)
p1 = *it;
}
if (p1 && p2)
{
+ char c;
p1->m_frontend->setData(eDVBFrontend::LINKED_PREV_PTR, (long)p2);
p2->m_frontend->setData(eDVBFrontend::LINKED_NEXT_PTR, (long)p1);
- if (!strcmp(p1->m_frontend->getDescription(), p2->m_frontend->getDescription()) && !strcmp(p1->m_frontend->getDescription(), "BCM4501 (internal)"))
+ if (!strcmp(p1->m_frontend->getDescription(), p2->m_frontend->getDescription()) && sscanf(p1->m_frontend->getDescription(), "BCM450%c (internal)", &c) == 1)
{
FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
if (!f || fwrite("A", 1, 1, f) != 1)
}
p1=p2=NULL;
- for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_simulate_frontends.begin()); it != m_avail_simulate_frontends.end(); ++it)
+ it=m_avail_simulate_frontends.begin();
+ for (; it != m_avail_simulate_frontends.end(); ++it)
{
if (it->m_frontend->getSlotID() == tu1)
p1 = *it;
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);
}