From: Andreas Monzner Date: Thu, 19 Oct 2006 19:59:05 +0000 (+0000) Subject: fix python part of ePythonConfig::getConfigQuery... so now default ac3 and 5V X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=e128ab84e720068a36530a0dab1426f893697247 fix python part of ePythonConfig::getConfigQuery... so now default ac3 and 5V on Terrestrial Tuner are working again --- diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index cfd2610..3905a18 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -1782,10 +1782,10 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where) std::string enable_5V; char configStr[255]; - snprintf(configStr, 255, "config.Nim%c.terrestrial_5V", 'A'+m_fe); + snprintf(configStr, 255, "config.Nims.%d.terrestrial_5V", m_fe); m_sec_sequence.push_back( eSecCommand(eSecCommand::START_TUNE_TIMEOUT) ); ePythonConfigQuery::getConfigValue(configStr, enable_5V); - if (enable_5V == "on") + if (enable_5V == "True") m_sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltage13) ); else m_sec_sequence.push_back( eSecCommand(eSecCommand::SET_VOLTAGE, iDVBFrontend::voltageOff) ); diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index d95f683..b074342 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -221,7 +221,7 @@ void eDVBCIInterfaces::ciRemoved(eDVBCISlot *slot) static bool canDescrambleMultipleServices(int slotid) { char configStr[255]; - snprintf(configStr, 255, "config.ci%d.canDescrambleMultipleServices", slotid); + snprintf(configStr, 255, "config.ci.%d.canDescrambleMultipleServices", slotid); std::string str; ePythonConfigQuery::getConfigValue(configStr, str); if ( str == "auto" ) diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index b7b3baa..0fd6e73 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -832,8 +832,23 @@ class ConfigFile: config.save() config.saveToFile(self.CONFIG_FILE) + def __resolveValue(self, pickles, cmap): + if cmap.has_key(pickles[0]): + if len(pickles) > 1: + return self.__resolveValue(pickles[1:], cmap[pickles[0]].content.items) + else: + return str(cmap[pickles[0]].value) + return None + def getResolvedKey(self, key): - return None # FIXME + names = key.split('.') + if len(names) > 1: + if names[0] == "config": + ret=self.__resolveValue(names[1:], config.content.items) + if ret and len(ret): + return ret + print "getResolvedKey", key, "failed !! (Typo??)" + return "" def NoSave(element): element.disableSave()