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
#if HAVE_DVB_API_VERSION < 3
if (event.type == FE_COMPLETION_EV)
#else
- eDebug("(%d)fe event: status %x, inversion %s", m_dvbid, event.status, (event.parameters.inversion == INVERSION_ON) ? "on" : "off");
+ eDebug("(%d)fe event: status %x, inversion %s, m_tuning %d", m_dvbid, event.status, (event.parameters.inversion == INVERSION_ON) ? "on" : "off", m_tuning);
if (event.status & FE_HAS_LOCK)
#endif
{
state = stateLock;
} else
{
- if (m_tuning)
+ if (m_tuning) {
state = stateTuning;
+#if HAVE_DVB_API_VERSION >= 3
+ if (event.status & FE_TIMEDOUT) {
+ eDebug("FE_TIMEDOUT! ..abort");
+ m_tuneTimer->stop();
+ timeout();
+ return;
+ }
+ ++m_tuning;
+#else
+ m_tuneTimer->stop();
+ timeout();
+#endif
+ }
else
{
eDebug("stateLostLock");
ret = (int)(snr_in_db * 100);
}
else if (strstr(m_description, "Alps BSBE1 C01A") ||
- !strcmp(m_description, "Alps -S(STV0288)"))
+ strstr(m_description, "Alps -S(STV0288)"))
{
if (snr == 0)
ret = 0;
if (snr != 0)
ret = 10 * (int)(-100 * (log10(snr) - log10(255)));
}
- else if (!strcmp(m_description, "BCM4506"))
+ else if (strstr(m_description, "BCM4506") || strstr(m_description, "BCM4505"))
ret = (snr * 100) >> 8;
if (type == signalQuality)
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:
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;
if (!m_simulate)
{
m_tuneTimer->start(0,true);
+ m_tuning = 1;
if (m_state != stateTuning)
{
- m_tuning = 1;
m_state = stateTuning;
m_stateChanged(this);
}