aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2009-02-20 11:39:29 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2009-02-20 11:39:29 +0100
commitfd7605d30bb6b1523282dfb0493826dfd2e26152 (patch)
tree2f1fd5309079389430a912bfc99738646ed74dcd /lib
parentc7e6f96e31b2ffd4cdc9419d5f9ed4912b960745 (diff)
parent29d62cc699d7043a749e6f184925b7fd14b5daab (diff)
downloadenigma2-fd7605d30bb6b1523282dfb0493826dfd2e26152.tar.gz
enigma2-fd7605d30bb6b1523282dfb0493826dfd2e26152.zip
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb/dvbtime.cpp2
-rw-r--r--lib/dvb/sec.cpp8
-rw-r--r--lib/dvb/sec.h3
-rw-r--r--lib/gui/elistboxcontent.cpp8
-rw-r--r--lib/python/Components/NimManager.py10
-rwxr-xr-xlib/python/Components/config.py13
-rw-r--r--lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py3
7 files changed, 34 insertions, 13 deletions
diff --git a/lib/dvb/dvbtime.cpp b/lib/dvb/dvbtime.cpp
index d879cfac..89650f25 100644
--- a/lib/dvb/dvbtime.cpp
+++ b/lib/dvb/dvbtime.cpp
@@ -145,7 +145,7 @@ eDVBLocalTimeHandler *eDVBLocalTimeHandler::instance;
DEFINE_REF(eDVBLocalTimeHandler);
eDVBLocalTimeHandler::eDVBLocalTimeHandler()
- :m_time_ready(false), m_updateNonTunedTimer(eTimer::create(eApp))
+ :m_updateNonTunedTimer(eTimer::create(eApp)), m_time_ready(false)
{
if ( !instance )
instance=this;
diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp
index ac1a2028..8aa0631c 100644
--- a/lib/dvb/sec.cpp
+++ b/lib/dvb/sec.cpp
@@ -563,7 +563,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
compare.tone = iDVBFrontend::toneOff;
sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
- sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) );
+ sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC]) );
if (diseqc13V)
vlt = iDVBFrontend::voltage13;
@@ -705,7 +705,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
compare.tone = iDVBFrontend::toneOff;
sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, iDVBFrontend::toneOff) );
- sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) );
+ sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC]) );
compare.voltage = iDVBFrontend::voltageOff;
compare.steps = +4;
@@ -839,7 +839,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
compare.tone = tone;
sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) );
- sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) );
+ sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_CONT_TONE_CHANGE]) );
sec_sequence.push_back( eSecCommand(eSecCommand::SET_FRONTEND) );
cmd.direction=1; // check for running rotor
@@ -884,7 +884,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
compare.tone = tone;
sec_sequence.push_back( eSecCommand(eSecCommand::IF_TONE_GOTO, compare) );
sec_sequence.push_back( eSecCommand(eSecCommand::SET_TONE, tone) );
- sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_CONT_TONE]) );
+ sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_FINAL_CONT_TONE_CHANGE]) );
}
sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_SWITCHPARMS) );
diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h
index 5bff6bf7..5d969328 100644
--- a/lib/dvb/sec.h
+++ b/lib/dvb/sec.h
@@ -271,7 +271,8 @@ class eDVBSatelliteEquipmentControl: public iDVBSatelliteEquipmentControl
DECLARE_REF(eDVBSatelliteEquipmentControl);
public:
enum {
- DELAY_AFTER_CONT_TONE=0, // delay after continuous tone change
+ DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC=0, // delay after continuous tone disable before diseqc command
+ DELAY_AFTER_FINAL_CONT_TONE_CHANGE, // delay after continuous tone change before tune
DELAY_AFTER_FINAL_VOLTAGE_CHANGE, // delay after voltage change at end of complete sequence
DELAY_BETWEEN_DISEQC_REPEATS, // delay between repeated diseqc commands
DELAY_AFTER_LAST_DISEQC_CMD, // delay after last diseqc command
diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp
index 44973af7..bf183f99 100644
--- a/lib/gui/elistboxcontent.cpp
+++ b/lib/gui/elistboxcontent.cpp
@@ -779,6 +779,10 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
if (PyInt_Check(pstring) && data) /* if the string is in fact a number, it refers to the 'data' list. */
pstring = PyTuple_GetItem(data, PyInt_AsLong(pstring));
+ /* don't do anything if we have 'None' as string */
+ if (pstring == Py_None)
+ continue;
+
const char *string = (PyString_Check(pstring)) ? PyString_AsString(pstring) : "<not-a-string>";
int x = PyInt_AsLong(px) + offset.x();
int y = PyInt_AsLong(py) + offset.y();
@@ -945,6 +949,10 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
if (PyInt_Check(ppixmap) && data) /* if the pixemap is in fact a number, it refers to the 'data' list. */
ppixmap = PyTuple_GetItem(data, PyInt_AsLong(ppixmap));
+ /* don't do anything if we have 'None' as pixmap */
+ if (ppixmap == Py_None)
+ continue;
+
int x = PyInt_AsLong(px) + offset.x();
int y = PyInt_AsLong(py) + offset.y();
int width = PyInt_AsLong(pwidth);
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py
index 6dc49dcf..75ad3779 100644
--- a/lib/python/Components/NimManager.py
+++ b/lib/python/Components/NimManager.py
@@ -835,9 +835,13 @@ class NimManager:
def InitSecParams():
config.sec = ConfigSubsection()
- x = ConfigInteger(default=15, limits = (0, 9999))
- x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_CONT_TONE, configElement.value))
- config.sec.delay_after_continuous_tone_change = x
+ x = ConfigInteger(default=25, limits = (0, 9999))
+ x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC, configElement.value))
+ config.sec.delay_after_continuous_tone_disable_before_diseqc = x
+
+ x = ConfigInteger(default=10, limits = (0, 9999))
+ x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_FINAL_CONT_TONE_CHANGE, configElement.value))
+ config.sec.delay_after_final_continuous_tone_change = x
x = ConfigInteger(default=10, limits = (0, 9999))
x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_FINAL_VOLTAGE_CHANGE, configElement.value))
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index a6d34152..e3a29b52 100755
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -279,6 +279,7 @@ class ConfigSelection(ConfigElement):
if default is None:
default = self.choices.default()
+ self._descr = None
self.default = self._value = self.last_value = default
self.changed()
@@ -296,6 +297,7 @@ class ConfigSelection(ConfigElement):
self._value = value
else:
self._value = self.default
+ self._descr = None
self.changed()
def tostring(self, val):
@@ -307,7 +309,7 @@ class ConfigSelection(ConfigElement):
def setCurrentText(self, text):
i = self.choices.index(self.value)
self.choices[i] = text
- self.description[text] = text
+ self._descr = self.description[text] = text
self._value = text
value = property(getValue, setValue)
@@ -336,13 +338,18 @@ class ConfigSelection(ConfigElement):
self.value = self.choices[(i + 1) % nchoices]
def getText(self):
- descr = self.description[self.value]
+ if self._descr is not None:
+ return self._descr
+ descr = self._descr = self.description[self.value]
if descr:
return _(descr)
return descr
def getMulti(self, selected):
- descr = self.description[self.value]
+ if self._descr is not None:
+ descr = self._descr
+ else:
+ descr = self._descr = self.description[self.value]
if descr:
return ("text", _(descr))
return ("text", descr)
diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py
index ec223d3e..ec472e72 100644
--- a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py
@@ -25,7 +25,8 @@ class SecParameterSetup(Screen, ConfigListScreen):
list = [
("Delay after diseqc reset command", config.sec.delay_after_diseqc_reset_cmd),
("Delay after diseqc peripherial poweron command", config.sec.delay_after_diseqc_peripherial_poweron_cmd),
- ("Delay after continuous tone change", config.sec.delay_after_continuous_tone_change),
+ ("Delay after continuous tone disable before diseqc", config.sec.delay_after_continuous_tone_disable_before_diseqc),
+ ("Delay after final continuous tone change", config.sec.delay_after_final_continuous_tone_change),
("Delay after last voltage change", config.sec.delay_after_final_voltage_change),
("Delay between diseqc commands", config.sec.delay_between_diseqc_repeats),
("Delay after last diseqc command", config.sec.delay_after_last_diseqc_command),