aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/frontend.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-12-05 15:30:41 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-12-05 15:30:41 +0000
commitd28a04695ff2ac8931c89c0d08a4cc7931916dd8 (patch)
tree8bad081dc32065af62875978fae169078865f8e3 /lib/dvb/frontend.cpp
parent763193df158ff0432fb67b37589f910b93c84c17 (diff)
downloadenigma2-d28a04695ff2ac8931c89c0d08a4cc7931916dd8.tar.gz
enigma2-d28a04695ff2ac8931c89c0d08a4cc7931916dd8.zip
small optimize
Diffstat (limited to 'lib/dvb/frontend.cpp')
-rw-r--r--lib/dvb/frontend.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp
index c4d64122..d8be8494 100644
--- a/lib/dvb/frontend.cpp
+++ b/lib/dvb/frontend.cpp
@@ -1147,7 +1147,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer
case eSecCommand::IF_VOLTAGE_GOTO:
{
eSecCommand::pair &compare = m_sec_sequence.current()->compare;
- if ( compare.voltage == m_curVoltage && setSecSequencePos(compare.steps) )
+ if ( compare.voltage == m_data[CUR_VOLTAGE] && setSecSequencePos(compare.steps) )
break;
++m_sec_sequence.current();
break;
@@ -1155,7 +1155,23 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer
case eSecCommand::IF_NOT_VOLTAGE_GOTO:
{
eSecCommand::pair &compare = m_sec_sequence.current()->compare;
- if ( compare.voltage != m_curVoltage && setSecSequencePos(compare.steps) )
+ if ( compare.voltage != m_data[CUR_VOLTAGE] && setSecSequencePos(compare.steps) )
+ break;
+ ++m_sec_sequence.current();
+ break;
+ }
+ case eSecCommand::IF_TONE_GOTO:
+ {
+ eSecCommand::pair &compare = m_sec_sequence.current()->compare;
+ if ( compare.tone == m_data[CUR_TONE] && setSecSequencePos(compare.steps) )
+ break;
+ ++m_sec_sequence.current();
+ break;
+ }
+ case eSecCommand::IF_NOT_TONE_GOTO:
+ {
+ eSecCommand::pair &compare = m_sec_sequence.current()->compare;
+ if ( compare.tone != m_data[CUR_TONE] && setSecSequencePos(compare.steps) )
break;
++m_sec_sequence.current();
break;
@@ -1214,7 +1230,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer
case eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO:
{
eSecCommand::pair &compare = m_sec_sequence.current()->compare;
- int idx = compare.voltage;
+ int idx = compare.val;
if ( idx == 0 || idx == 1 )
{
int idle = readInputpower();
@@ -1261,7 +1277,7 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer
break;
case eSecCommand::IF_INPUTPOWER_DELTA_GOTO:
{
- int idleInputpower = m_idleInputpower[ (m_curVoltage&1) ? 0 : 1];
+ int idleInputpower = m_idleInputpower[ (m_data[CUR_VOLTAGE]&1) ? 0 : 1];
eSecCommand::rotor &cmd = m_sec_sequence.current()->measure;
const char *txt = cmd.direction ? "running" : "stopped";
eDebug("[SEC] waiting for rotor %s %d, idle %d, delta %d",
@@ -1834,7 +1850,7 @@ RESULT eDVBFrontend::setVoltage(int voltage)
bool increased=false;
fe_sec_voltage_t vlt;
#endif
- m_curVoltage=voltage;
+ m_data[CUR_VOLTAGE]=voltage;
switch (voltage)
{
case voltageOff:
@@ -1889,7 +1905,7 @@ RESULT eDVBFrontend::setTone(int t)
#else
fe_sec_tone_mode_t tone;
#endif
-
+ m_data[CUR_TONE]=t;
switch (t)
{
case toneOn: