Merge branch 'master' of /home/tmbinc/enigma2-git
authorFelix Domke <tmbinc@elitedvb.net>
Wed, 11 Mar 2009 07:06:28 +0000 (08:06 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Wed, 11 Mar 2009 07:06:28 +0000 (08:06 +0100)
data/encoding.conf
lib/dvb/dvbtime.cpp
lib/dvb_ci/dvbci.cpp
lib/python/Components/TimerList.py
lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
lib/python/Tools/DreamboxHardware.py
mytest.py

index 07c6b8a174e5e3d293a70b86481ed462bb8b7131..fe95fafe73b54b5e9b6c5f5b563cb93dd87e54ba 100644 (file)
@@ -13,6 +13,8 @@ bul ISO8859-5
 0x4ff 0x1
 0x407 0x1
 0xbc6 0x3 #ASTRA 23.5° Cslink, Skylink
+0xc85 0x3
+0xc89 0x3
 0xc8f 0x3
 0xbc7 0x3
 0x436 0x1 #ASTRA 19.2° MTV Euro - MTV Networks
index 03847ecb88b7bfb245f298b1bd0d85a0be184fbb..a6830dc06aea6f37ee5e4c1d9cb23e1df9645f67 100644 (file)
@@ -20,7 +20,7 @@ void setRTC(time_t time)
        FILE *f = fopen("/proc/stb/fp/rtc", "w");
        if (f)
        {
-               if (fprintf(f, "%u", time))
+               if (fprintf(f, "%u", (unsigned int)time))
                        prev_time = time;
                else
                        eDebug("write /proc/stb/fp/rtc failed (%m)");
@@ -47,8 +47,11 @@ time_t getRTC()
        if (f)
        {
                // sanity check to detect corrupt atmel firmware
-               if (fscanf(f, "%u", &rtc_time) != 1)
+               unsigned int tmp;
+               if (fscanf(f, "%u", &tmp) != 1)
                        eDebug("read /proc/stb/fp/rtc failed (%m)");
+               else
+                       rtc_time=tmp;
                fclose(f);
        }
        else
index a68edea83e52357177aa23dd8bda0ef6303f7f6f..83bbed75c04ce8e7108c5835ea87347240cb552c 100644 (file)
@@ -921,13 +921,21 @@ PyObject *eDVBCIInterfaces::readCICaIds(int slotid)
                char tmp[255];
                snprintf(tmp, 255, "eDVBCIInterfaces::readCICaIds try to get CAIds for CI Slot %d... but just %d slots are available", slotid, m_slots.size());
                PyErr_SetString(PyExc_StandardError, tmp);
-               return 0;
        }
-       int idx=0;
-       ePyObject list = PyList_New(slot->possible_caids.size());
-       for (caidSet::iterator it = slot->possible_caids.begin(); it != slot->possible_caids.end(); ++it)
-               PyList_SET_ITEM(list, idx++, PyLong_FromLong(*it));
-       return list;
+       else
+       {
+               int idx=0;
+               eDVBCICAManagerSession *ca_manager = slot->getCAManager();
+               const std::vector<uint16_t> *ci_caids = ca_manager ? &ca_manager->getCAIDs() : 0;
+               ePyObject list = PyList_New(ci_caids ? ci_caids->size() : 0);
+               if (ci_caids)
+               {
+                       for (std::vector<uint16_t>::const_iterator it = ci_caids->begin(); it != ci_caids->end(); ++it)
+                               PyList_SET_ITEM(list, idx++, PyLong_FromLong(*it));
+               }
+               return list;
+       }
+       return 0;
 }
 
 int eDVBCISlot::send(const unsigned char *data, size_t len)
index 1109860a04d067905337d9843a4baf40ca8e3148..44a7eb4f4cc91fad95b508ec3cb5840a200b4b32 100644 (file)
@@ -93,7 +93,7 @@ class TimerList(HTMLComponent, GUIComponent, object):
        def getCurrentIndex(self):
                return self.instance.getCurrentIndex()
 
-       currentIndex = property(moveToIndex, getCurrentIndex)
+       currentIndex = property(getCurrentIndex, moveToIndex)
        currentSelection = property(getCurrent)
 
        def moveDown(self):
index c2590af56cccc46ec8fb34ab27d49a5f1f04094c..e35f2807bdd6369e8d595b547d78b9e6c45beabb 100644 (file)
@@ -103,7 +103,10 @@ eServiceDVD::eServiceDVD(const char *filename):
        // create handle
        ddvd_set_dvd_path(m_ddvdconfig, filename);
        ddvd_set_ac3thru(m_ddvdconfig, 0);
-       ddvd_set_language(m_ddvdconfig, "de");
+
+       std::string ddvd_language;
+       if (!ePythonConfigQuery::getConfigValue("config.osd.language", ddvd_language))
+               ddvd_set_language(m_ddvdconfig, (ddvd_language.substr(0,2)).c_str());
 
        int fd = open("/proc/stb/video/aspect", O_RDONLY);
        if (fd > -1)
index 5461f7b05828adad2d3b12c943bd63eff49fd692..9e81bb476a564e9a72cef9ab8e31eb450da723df 100644 (file)
@@ -23,6 +23,16 @@ def setFPWakeuptime(wutime):
                except IOError:
                        print "setFPWakeupTime failed!"
 
+def setRTCtime(wutime):
+       try:
+               open("/proc/stb/fp/rtc", "w").write(str(wutime))
+       except IOError:
+               try:
+                       fp = open("/dev/dbox/fp0")
+                       ioctl(fp.fileno(), 0x101, pack('L', wutime)) # set wake up
+               except IOError:
+                       print "setRTCtime failed!"
+
 def getFPWakeuptime():
        ret = 0
        try:
index 261ff2a6f1d63fcfe38262847093097ac573d2d2..b58ec2df62d46a4ec8c9543bd656c5377b6a1024 100755 (executable)
--- a/mytest.py
+++ b/mytest.py
@@ -466,8 +466,8 @@ def runScreenTest():
        runReactor()
 
        profile("wakeup")
-       from time import time
-       from Tools.DreamboxHardware import setFPWakeuptime, getFPWakeuptime
+       from time import time, strftime, localtime
+       from Tools.DreamboxHardware import setFPWakeuptime, getFPWakeuptime, setRTCtime
        #get currentTime
        nowTime = time()
        wakeupList = [
@@ -479,11 +479,16 @@ def runScreenTest():
        wakeupList.sort()
        recordTimerWakeupAuto = False
        if wakeupList:
+               from time import strftime
                startTime = wakeupList[0]
                if (startTime[0] - nowTime) < 330: # no time to switch box back on
                        wptime = nowTime + 30  # so switch back on in 30 seconds
                else:
                        wptime = startTime[0] - 300
+               if not config.misc.useTransponderTime.value:
+                       print "dvb time sync disabled... so set RTC now to current linux time!", strftime("%Y/%m/%d %H:%M", localtime(nowTime))
+                       setRTCtime(nowTime)
+               print "set wakeup time to", strftime("%Y/%m/%d %H:%M", localtime(wptime))
                setFPWakeuptime(wptime)
                recordTimerWakeupAuto = startTime[1] == 0 and startTime[2]
        config.misc.isNextRecordTimerAfterEventActionAuto.value = recordTimerWakeupAuto