Merge commit 'dm/experimental' into test branch
authorschon <schon@dev03-server>
Wed, 25 May 2011 07:26:17 +0000 (16:26 +0900)
committerschon <schon@dev03-server>
Wed, 25 May 2011 07:26:17 +0000 (16:26 +0900)
Conflicts:
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Screens/NetworkSetup.py

92 files changed:
RecordTimer.py
SleepTimer.py [changed mode: 0644->0755]
configure.ac
data/defaults/Dream/settings.8000 [changed mode: 0644->0755]
data/keymap.xml
data/keymaps/dream-de.info
data/menu.xml
data/prev.png
data/rcpositions.xml [changed mode: 0644->0755]
data/setup.xml
data/skin.xml
data/skin_default/icons/dmm_logo.png
data/skin_default/icons/input_rcnew-configured.png
data/skin_default/icons/input_rcnew.png
data/skin_default/icons/input_rcold-configured.png
data/skin_default/icons/input_rcold.png
data/skin_default/picon_default.png
data/skin_default/rc.png
data/skin_default/rcold.png
data/skin_default/spinner/wait1.png
data/skin_default/spinner/wait2.png
data/skin_default/spinner/wait3.png
data/skin_default/spinner/wait4.png
data/startwizard.xml [changed mode: 0644->0755]
data/tutorialwizard.xml [changed mode: 0644->0755]
lib/driver/Makefile.am [changed mode: 0644->0755]
lib/driver/memtest.cpp [new file with mode: 0755]
lib/driver/memtest.h [new file with mode: 0755]
lib/driver/sc_test.cpp [new file with mode: 0755]
lib/driver/sc_test.h [new file with mode: 0755]
lib/dvb/dvb.cpp [changed mode: 0644->0755]
lib/dvb/frontend.cpp [changed mode: 0644->0755]
lib/gdi/glcddc.cpp [changed mode: 0644->0755]
lib/gdi/lcd.cpp [changed mode: 0644->0755]
lib/python/Components/AVSwitch.py [changed mode: 0644->0755]
lib/python/Components/Converter/ServiceInfo.py
lib/python/Components/Harddisk.py
lib/python/Components/Scanner.py
lib/python/Components/TunerInfo.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/DVDBurn/DVDProject.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/DVDBurn/Process.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/DVDBurn/TitleList.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py
lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py
lib/python/Plugins/SystemPlugins/FPGAUpgrade/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/__init__.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/_fpga.so [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.conf [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/plugin_fpgaupgrade.xml [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/plugin.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FactoryTest/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FactoryTest/__init__.py [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FactoryTest/testdb [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/Fancontrol/Makefile.am [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Fancontrol/__init__.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Fancontrol/meta/Makefile.am [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Fancontrol/meta/plugin_fancontrol.xml [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Fancontrol/plugin.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Makefile.am
lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
lib/python/Plugins/SystemPlugins/SoftwareManager/imagewizard.xml
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Plugins/SystemPlugins/Videomode/plugin.py
lib/python/Screens/About.py
lib/python/Screens/AudioSelection.py
lib/python/Screens/ChannelSelection.py [changed mode: 0644->0755]
lib/python/Screens/DefaultWizard.py [changed mode: 0644->0755]
lib/python/Screens/InfoBar.py [changed mode: 0644->0755]
lib/python/Screens/InfoBarGenerics.py [changed mode: 0644->0755]
lib/python/Screens/InputDeviceSetup.py
lib/python/Screens/LanguageSelection.py
lib/python/Screens/Makefile.am
lib/python/Screens/NetworkSetup.py
lib/python/Screens/PluginBrowser.py
lib/python/Screens/ServiceScan.py
lib/python/Screens/SleepTimerEdit.py [changed mode: 0644->0755]
lib/python/Screens/Subtitles.py [new file with mode: 0755]
lib/python/Screens/TaskView.py [changed mode: 0644->0755]
lib/python/Screens/Wizard.py
lib/python/Tools/KeyBindings.py [changed mode: 0644->0755]
lib/python/enigma_python.i [changed mode: 0644->0755]
lib/service/servicedvb.cpp
main/bsod.cpp

index d8bed8f..d3ccd75 100755 (executable)
@@ -297,13 +297,13 @@ class RecordTimerEntry(timer.TimerEntry, object):
                                self.record_service = None
                        if self.afterEvent == AFTEREVENT.STANDBY:
                                if not Screens.Standby.inStandby: # not already in standby
-                                       Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished record timer wants to set your\nDreambox to standby. Do that now?"), timeout = 20)
+                                       Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished record timer wants to set your\nSTB to standby. Do that now?"), timeout = 20)
                        elif self.afterEvent == AFTEREVENT.DEEPSTANDBY:
                                if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
                                        if Screens.Standby.inStandby: # in standby
                                                RecordTimerEntry.TryQuitMainloop() # start shutdown handling without screen
                                        else:
-                                               Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished record timer wants to shut down\nyour Dreambox. Shutdown now?"), timeout = 20)
+                                               Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished record timer wants to shut down\nyour STB. Shutdown now?"), timeout = 20)
                        return True
 
        def setAutoincreaseEnd(self, entry = None):
old mode 100644 (file)
new mode 100755 (executable)
index 221e8f0..a6f39ef
@@ -26,12 +26,12 @@ class SleepTimerEntry(timer.TimerEntry):
                if self.state == self.StateRunning:
                        if config.SleepTimer.action.value == "shutdown":
                                if config.SleepTimer.ask.value and not Screens.Standby.inTryQuitMainloop:
-                                       Notifications.AddNotificationWithCallback(self.shutdown, MessageBox, _("A sleep timer wants to shut down\nyour Dreambox. Shutdown now?"), timeout = 20)
+                                       Notifications.AddNotificationWithCallback(self.shutdown, MessageBox, _("A sleep timer wants to shut down\nyour STB. Shutdown now?"), timeout = 20)
                                else:
                                        self.shutdown(True)
                        elif config.SleepTimer.action.value == "standby":
                                if config.SleepTimer.ask.value and not Screens.Standby.inStandby:
-                                       Notifications.AddNotificationWithCallback(self.standby, MessageBox, _("A sleep timer wants to set your\nDreambox to standby. Do that now?"), timeout = 20)
+                                       Notifications.AddNotificationWithCallback(self.standby, MessageBox, _("A sleep timer wants to set your\nSTB to standby. Do that now?"), timeout = 20)
                                else:
                                        self.standby(True)
 
index 0c54f5b..38b66d3 100644 (file)
@@ -200,6 +200,11 @@ lib/python/Plugins/SystemPlugins/Videomode/Makefile
 lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile
 lib/python/Plugins/SystemPlugins/WirelessLan/Makefile
 lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile
+lib/python/Plugins/SystemPlugins/FactoryTest/Makefile
+lib/python/Plugins/SystemPlugins/Fancontrol/Makefile
+lib/python/Plugins/SystemPlugins/Fancontrol/meta/Makefile
+lib/python/Plugins/SystemPlugins/FPGAUpgrade/Makefile
+lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/Makefile
 lib/python/Tools/Makefile
 lib/service/Makefile
 lib/components/Makefile
@@ -209,4 +214,5 @@ tools/Makefile
 tools/enigma2.sh
 enigma2.pc
 ])
+AC_DEFINE(BUILD_VUPLUS,1,[Define to 1 for vuplus])
 AC_OUTPUT
old mode 100644 (file)
new mode 100755 (executable)
index 1fe4a4c..2787d5d
@@ -1 +1 @@
-config.misc.rcused=0
\ No newline at end of file
+config.misc.rcused=0
index f167024..11fa9c6 100755 (executable)
@@ -90,6 +90,8 @@
                        <key id="KEY_RECORD" mapto="instantRecord" flags="m" />
                </device>
                <device name="dreambox remote control (native)">
+<!--   ikseong insert KEY_RECORD action        -->
+                       <key id="KEY_RECORD" mapto="instantRecord" flags="m" />
                        <key id="KEY_RED" mapto="instantRecord" flags="b" />
                </device>
        </map>
                <key id="KEY_ENTER" mapto="ok" flags="m" />
                <key id="KEY_EXIT" mapto="back" flags="m" />
                <key id="KEY_ESC" mapto="back" flags="m" />
+<!--   ikseong for factory test        -->
+               <key id="KEY_SUBTITLE" mapto="test" flags="m" />
+               <key id="KEY_RADIO" mapto="testexit" flags="m" />
+               <key id="KEY_PAUSE" mapto="agingend" flags="m" />
+               <key id="KEY_STOP" mapto="agingfinish" flags="m" />             
+               <key id="KEY_GREEN" mapto="agingstart" flags="m" />
        </map>
        
        <map context="InfobarMenuActions">
                <key id="KEY_VIDEO" mapto="showMovies" flags="m" />
                <key id="KEY_RADIO" mapto="showRadio" flags="m" />
                <key id="KEY_TV" mapto="showTv" flags="m" />
+<!--   ikseong insert KEY_SUBTITLE action for subtitle hotkey  -->
+               <key id="KEY_SUBTITLE" mapto="showSubtitle" flags="m" />
        </map>
 
        <map context="InfobarAudioSelectionActions">
                        <key id="KEY_BLUE" mapto="seekFwd" flags="b" />
                        <key id="KEY_RED" mapto="seekBackManual" flags="l" />
                        <key id="KEY_BLUE" mapto="seekFwdManual" flags="l" />
+<!--   ikseong insert KEY_PAUSE, KEY_PLAY, KEY_REWIND, KEY_FASTFORWARD -->
+                       <key id="KEY_PAUSE" mapto="pauseService" flags="m" />
+                       <key id="KEY_PLAY" mapto="playpauseService" flags="m" />
+                       <key id="KEY_REWIND" mapto="seekBack" flags="b" />
+                       <key id="KEY_FASTFORWARD" mapto="seekFwd" flags="b" />
+                       <key id="KEY_REWIND" mapto="seekBackManual" flags="l" />
+                       <key id="KEY_FASTFORWARD" mapto="seekFwdManual" flags="l" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PLAY" mapto="playpauseService" flags="m" />
                        <key id="KEY_BLUE" mapto="seekFwd" flags="b" />
                        <key id="KEY_RED" mapto="seekBackManual" flags="l" />
                        <key id="KEY_BLUE" mapto="seekFwdManual" flags="l" />
+<!--   ikseong insert KEY_REWIND, KEY_FASTFORWARD      -->
+                       <key id="KEY_REWIND" mapto="seekBack" flags="b" />
+                       <key id="KEY_FASTFORWARD" mapto="seekFwd" flags="b" />
+                       <key id="KEY_REWIND" mapto="seekBackManual" flags="l" />
+                       <key id="KEY_FASTFORWARD" mapto="seekFwdManual" flags="l" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PREVIOUSSONG" mapto="seekBack" flags="b" />
                <device name="dreambox remote control (native)">
                        <key id="KEY_YELLOW" mapto="timeshiftStart" flags="b" />
                        <key id="KEY_TV" mapto="timeshiftStop" flags="m" />
+<!--   ikseong insert KEY_PAUSE, KEY_PLAY, KEY_STOP    -->
+                       <key id="KEY_PLAY" mapto="timeshiftStart" flags="m" />
+                       <key id="KEY_PAUSE" mapto="timeshiftStart" flags="m" />
+                       <key id="KEY_STOP" mapto="timeshiftStop" flags="m" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PLAY" mapto="timeshiftStart" flags="m" />
                <device name="dreambox remote control (native)">
                        <key id="KEY_RED" mapto="timeshiftActivateEnd" flags="b" />
                        <key id="KEY_YELLOW" mapto="timeshiftActivateEndAndPause" flags="b" />
+<!--   ikseong insert KEY_PAUSE, KEY_PLAY, KEY_REWIND  -->
+                       <key id="KEY_PLAY" mapto="timeshiftActivateEndAndPause" flags="m" />
+                       <key id="KEY_REWIND" mapto="timeshiftActivateEnd" flags="m" />
+                       <key id="KEY_PAUSE" mapto="timeshiftActivateEndAndPause" flags="m" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PREVIOUSSONG" mapto="timeshiftActivateEnd" flags="m" />
        <map context="MoviePlayerActions">
                <device name="dreambox remote control (native)">
                        <key id="KEY_TV" mapto="leavePlayer" flags="m" />
+                       <key id="KEY_STOP" mapto="leavePlayer" flags="m" />
+<!--   ikseong insert KEY_SUBTITLE action for subtitle hotkey  -->
+                       <key id="KEY_SUBTITLE" mapto="showSubtitle" flags="m" />                
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_TV" mapto="leavePlayer" flags="m" />
                        <key id="KEY_RADIO" mapto="shift_record" flags="l" />
                        <key id="KEY_PREVIOUS" mapto="previous" flags="m" />
                        <key id="KEY_NEXT" mapto="next" flags="m" />
+<!--   ikseong insert KEY_PAUSE, KEY_PLAY, KEY_STOP, KEY_RECORD, KEY_REWIND, KEY_FASTFORWARD   -->
+                       <key id="KEY_PAUSE" mapto="pause" flags="m" />
+                       <key id="KEY_PLAY" mapto="play" flags="m" />
+                       <key id="KEY_STOP" mapto="stop" flags="b" />
+                       <key id="KEY_STOP" mapto="shift_stop" flags="l" />
+                       <key id="KEY_RECORD" mapto="shift_record" flags="l" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PLAYPAUSE" mapto="pause" flags="m" />
index d7f5b07..1156ab3 100644 (file)
@@ -1,2 +1,2 @@
 kmap=dream-de.kmap
-name=Dreambox Keyboard Deutsch
+name=Keyboard Deutsch
index 6e10354..03e582c 100755 (executable)
@@ -62,7 +62,7 @@
                                <!--<item text="Remote Control"><setup id="rc" /></item>-->
                                <!--<item text="OSD"><setup id="osd" /></item>-->
                                <item level="0" text="Network" entryID="network_setup"><screen module="NetworkSetup" screen="NetworkAdapterSelection" /></item>
-                               <item level="1" text="Input devices" entryID="input_device_setup"><screen module="InputDeviceSetup" screen="InputDeviceSelection" /></item>
+                               <!--<item level="1" text="Input devices" entryID="input_device_setup"><screen module="InputDeviceSetup" screen="InputDeviceSelection" /></item>-->
                                <item requires="Display"><setup level="1" id="lcd" /></item>
                                <item text="Keyboard"><setup id="keyboard" /></item>
                                <!--<menu level="1" text="Network..." entryID="network_setup">
@@ -83,6 +83,7 @@ def msgClosed(ret):
                from os import system, _exit
                system("rm -R /etc/enigma2")
                system("cp -R /usr/share/enigma2/defaults /etc/enigma2")
+               system("/usr/bin/showiframe /boot/backdrop.mvi")
                _exit(0)
 self.session.openWithCallback(msgClosed, FactoryReset)
 </code>
index 8c14a9f..895c6e8 100644 (file)
Binary files a/data/prev.png and b/data/prev.png differ
old mode 100644 (file)
new mode 100755 (executable)
index 373ed73..3508025
@@ -1,88 +1,92 @@
+<!--   ikseong modify position as 750S RCU     -->
 <rcs>
        <rc id="0">
                <button name="SHIFT" pos="58,21" />
-               <button name="POWER" pos="90,21" />
+               <button name="POWER" pos="110,50" />
                <button name="DREAMSELECT" pos="54,53" />
                <button name="TVSELECT" pos="98,53" />
-               <button name="1" pos="37,83" />
-               <button name="2" pos="76,83" />
-               <button name="3" pos="115,83" />
-               <button name="4" pos="37,105" />
-               <button name="5" pos="76,105" />
-               <button name="6" pos="115,105" />
-               <button name="7" pos="37,126" />
-               <button name="8" pos="76,126" />
-               <button name="9" pos="115,126" />
-               <button name="ARROWLEFT" pos="37,148" />
-               <button name="0" pos="76,148" />
-               <button name="ARROWRIGHT" pos="115,148" />
-               <button name="VOL+" pos="30,184" />
-               <button name="VOL-" pos="39,208" />
-               <button name="MUTE" pos="76,179" />
-               <button name="EXIT" pos="76,201" />
-               <button name="BOUQUET+" pos="122,184" />
-               <button name="BOUQUET-" pos="113,208" />
-               <button name="INFO" pos="28,238" />
-               <button name="MENU" pos="124,238" />
-               <button name="OK" pos="77,266" />
-               <button name="UP" pos="77,241" />
-               <button name="DOWN" pos="77,291" />
-               <button name="LEFT" pos="48,266" />
-               <button name="RIGHT" pos="106,266" />
-               <button name="HELP" pos="32,298" />
-               <button name="PVR" pos="121,298" />
-               <button name="RED" pos="34,333" />
-               <button name="GREEN" pos="61,335" />
-               <button name="YELLOW" pos="90,335" />
-               <button name="BLUE" pos="118,333" />
-               <button name="REWIND" pos="37,365" />
-               <button name="PLAYPAUSE" pos="64,366" />
-               <button name="STOP" pos="90,366" />
-               <button name="FORWARD" pos="117,365" />
-               <button name="TV" pos="40,397" />
-               <button name="RADIO" pos="65,399" />
-               <button name="TEXT" pos="89,399" />
-               <button name="RECORD" pos="113,397" />
+               <button name="SUBTITLE" pos="60,70" />
+               <button name="1" pos="43,98" />
+               <button name="2" pos="74,98" />
+               <button name="3" pos="106,98" />
+               <button name="4" pos="43,126" />
+               <button name="5" pos="74,126" />
+               <button name="6" pos="106,126" />
+               <button name="7" pos="43,152" />
+               <button name="8" pos="74,152" />
+               <button name="9" pos="106,152" />
+               <button name="ARROWLEFT" pos="43,180" />
+               <button name="0" pos="74,180" />
+               <button name="ARROWRIGHT" pos="106,180" />
+               <button name="VOL+" pos="41,310" />
+               <button name="VOL-" pos="42,341" />
+               <button name="MUTE" pos="35,29" />
+               <button name="EXIT" pos="75,320" />
+               <button name="BOUQUET+" pos="105,317" />
+               <button name="BOUQUET-" pos="105,347" />
+               <button name="INFO" pos="75,340" />
+               <button name="MENU" pos="41,370" />
+               <button name="OK" pos="75,257" />
+               <button name="UP" pos="75,240" />
+               <button name="DOWN" pos="75,288" />
+               <button name="LEFT" pos="45,257" />
+               <button name="RIGHT" pos="105,257" />
+               <button name="HELP" pos="105,370" />
+               <button name="PVR" pos="64,370" />
+               <button name="RED" pos="39,206" />
+               <button name="GREEN" pos="63,206" />
+               <button name="YELLOW" pos="87,206" />
+               <button name="BLUE" pos="110,206" />
+               <button name="REWIND" pos="41,392" />
+               <button name="PLAYPAUSE" pos="86,392" />
+               <button name="STOP" pos="86,412" />
+               <button name="FORWARD" pos="109,392" />
+               <button name="TV" pos="41,412" />
+               <button name="RADIO" pos="109,412" />
+               <button name="TEXT" pos="38,72" />
+               <button name="RECORD" pos="64,412" />
        </rc>
        <rc id="1">
                <button name="SHIFT" pos="59,23" />
-               <button name="POWER" pos="93,23" />
+               <button name="POWER" pos="107,29" />
                <button name="DREAMSELECT" pos="51,55" />
                <button name="TVSELECT" pos="97,55" />
-               <button name="1" pos="38,81" />
-               <button name="2" pos="77,81" />
-               <button name="3" pos="113,81" />
-               <button name="4" pos="38,102" />
-               <button name="5" pos="77,102" />
-               <button name="6" pos="113,102" />
-               <button name="7" pos="38,122" />
-               <button name="8" pos="77,122" />
-               <button name="9" pos="113,122" />
-               <button name="ARROWLEFT" pos="38,143" />
-               <button name="0" pos="77,143" />
-               <button name="ARROWRIGHT" pos="113,143" />
-               <button name="VOL+" pos="31,181" />
-               <button name="VOL-" pos="42,206" />
-               <button name="MUTE" pos="76,172" />
-               <button name="EXIT" pos="76,194" />
-               <button name="BOUQUET+" pos="119,181" />
-               <button name="BOUQUET-" pos="111,206" />
-               <button name="INFO" pos="27,233" />
-               <button name="MENU" pos="125,233" />
-               <button name="OK" pos="77,262" />
-               <button name="UP" pos="76,235" />
-               <button name="DOWN" pos="76,289" />
-               <button name="LEFT" pos="45,262" />
-               <button name="RIGHT" pos="108,262" />
-               <button name="AUDIO" pos="31,295" />
-               <button name="VIDEO" pos="121,295" />
-               <button name="RED" pos="34,329" />
-               <button name="GREEN" pos="62,330" />
-               <button name="YELLOW" pos="89,330" />
-               <button name="BLUE" pos="118,329" />
-               <button name="TV" pos="37,362" />
-               <button name="RADIO" pos="62,363" />
-               <button name="TEXT" pos="89,363" />
-               <button name="HELP" pos="114,362" />
+               <button name="SUBTITLE" pos="64,73" />
+               <button name="1" pos="40,100" />
+               <button name="2" pos="76,100" />
+               <button name="3" pos="102,100" />
+               <button name="4" pos="40,108" />
+               <button name="5" pos="76,108" />
+               <button name="6" pos="102,108" />
+               <button name="7" pos="40,152" />
+               <button name="8" pos="76,152" />
+               <button name="9" pos="102,152" />
+               <button name="ARROWLEFT" pos="43,180" />
+               <button name="0" pos="76,180" />
+               <button name="ARROWRIGHT" pos="108,180" />
+               <button name="VOL+" pos="41,316" />
+               <button name="VOL-" pos="42,350" />
+               <button name="MUTE" pos="35,29" />
+               <button name="EXIT" pos="75,320" />
+               <button name="BOUQUET+" pos="106,316" />
+               <button name="BOUQUET-" pos="105,350" />
+               <button name="INFO" pos="76,342" />
+               <button name="MENU" pos="42,370" />
+               <button name="OK" pos="76,255" />
+               <button name="UP" pos="76,240" />
+               <button name="DOWN" pos="76,288" />
+               <button name="LEFT" pos="43,255" />
+               <button name="RIGHT" pos="106,255" />
+               <button name="RECORD" pos="65,414" />
+               <button name="AUDIO" pos="87,370" />
+               <button name="VIDEO" pos="64,370" />
+               <button name="RED" pos="40,204" />
+               <button name="GREEN" pos="64,204" />
+               <button name="YELLOW" pos="88,204" />
+               <button name="BLUE" pos="112,204" />
+               <button name="TV" pos="42,414" />
+               <button name="RADIO" pos="110,414" />
+               <button name="TEXT" pos="40,72" />
+               <button name="HELP" pos="108,370" />
        </rc>
-</rcs>
\ No newline at end of file
+</rcs>
index 8620709..ef0f1bc 100755 (executable)
                        <item level="0" text="Aspect Ratio">config.av.aspectratio</item>
                        <item level="0" text="TV System">config.av.tvsystem</item>
                        <item level="1" text="WSS on 4:3">config.av.wss</item>
-                       <item level="1" text="AC3 default">config.av.defaultac3</item>
-                       <item level="1" text="General AC3 delay (ms)">config.av.generalAC3delay</item>
+                       <item level="1" text="Dolby Digital default">config.av.defaultac3</item>
+                       <item level="1" text="General Dolby Digital delay (ms)">config.av.generalAC3delay</item>
                        <item level="1" text="General PCM delay (ms)">config.av.generalPCMdelay</item>
-                       <item level="1" text="AC3 downmix" requires="CanDownmixAC3">config.av.downmix_ac3</item>
+                       <item level="1" text="Dolby Digital downmix" requires="CanDownmixAC3">config.av.downmix_ac3</item>
                        <item level="1" text="Auto scart switching" requires="ScartSwitch">config.av.vcrswitch</item>
                </setup>
                <setup key="usage" title="Customize">
index b4b6cbc..ccd8eb7 100755 (executable)
                        <convert type="ConditionalShowHide" />
                </widget>
                <!-- Crypt icon (encrypted service?) -->
-               <ePixmap position="563,48" zPosition="0" size="107,15" pixmap="skin_default/icons/icons_off.png" />
+               <!-- ikseong
+               <ePixmap position="563,48" zPosition="0" size="107,15" pixmap="skin_default/icons/icons_off.png" />     -->
+               <ePixmap position="563,48" zPosition="0" size="80,15" pixmap="skin_default/icons/icons_off.png" />              
                <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_crypt.png" position="563,48" zPosition="1" size="12,16" alphatest="on">
                        <convert type="ServiceInfo">IsCrypted</convert>
                        <convert type="ConditionalShowHide" />
                        <convert type="ConditionalShowHide" />
                </widget>
                <!-- Audio icon (is there multichannel audio?) -->
+<!--   ikseong         
                <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_dolby.png" position="645,48" zPosition="1" size="26,16" alphatest="on">
                        <convert type="ServiceInfo">IsMultichannel</convert>
                        <convert type="ConditionalShowHide" />
-               </widget>
+               </widget>       -->
                <!-- Progressbar (current event duration)-->
                <ePixmap pixmap="skin_default/progress_bg.png" position="48,77" size="84,7" transparent="1" alphatest="on" />
                <widget source="session.Event_Now" render="Progress" pixmap="skin_default/progress_small.png" position="50,78" zPosition="1" size="80,5" transparent="1">
index 56f2965..71e9cb0 100644 (file)
Binary files a/data/skin_default/icons/dmm_logo.png and b/data/skin_default/icons/dmm_logo.png differ
index 6b16d39..c3cd6eb 100644 (file)
Binary files a/data/skin_default/icons/input_rcnew-configured.png and b/data/skin_default/icons/input_rcnew-configured.png differ
index 19cdeea..690c54c 100644 (file)
Binary files a/data/skin_default/icons/input_rcnew.png and b/data/skin_default/icons/input_rcnew.png differ
index 8d62685..c3cd6eb 100644 (file)
Binary files a/data/skin_default/icons/input_rcold-configured.png and b/data/skin_default/icons/input_rcold-configured.png differ
index ef8680b..690c54c 100644 (file)
Binary files a/data/skin_default/icons/input_rcold.png and b/data/skin_default/icons/input_rcold.png differ
index 61ec818..028f3d3 100644 (file)
Binary files a/data/skin_default/picon_default.png and b/data/skin_default/picon_default.png differ
index 9f5457d..2ea45e7 100644 (file)
Binary files a/data/skin_default/rc.png and b/data/skin_default/rc.png differ
index 030046a..8f28e12 100644 (file)
Binary files a/data/skin_default/rcold.png and b/data/skin_default/rcold.png differ
index 940e91a..49ffcc2 100644 (file)
Binary files a/data/skin_default/spinner/wait1.png and b/data/skin_default/spinner/wait1.png differ
index d534276..d19f3d3 100644 (file)
Binary files a/data/skin_default/spinner/wait2.png and b/data/skin_default/spinner/wait2.png differ
index 5534e35..229a91c 100644 (file)
Binary files a/data/skin_default/spinner/wait3.png and b/data/skin_default/spinner/wait3.png differ
index a052264..b96ad21 100644 (file)
Binary files a/data/skin_default/spinner/wait4.png and b/data/skin_default/spinner/wait4.png differ
old mode 100644 (file)
new mode 100755 (executable)
index a6b773e..c13a502
@@ -1,6 +1,7 @@
 <wizard>
                <step id="start" nextstep="introduction">
-                       <text value="Welcome.\n\nThis start wizard will guide you through the basic setup of your Dreambox.\nPress the OK button on your remote control to move to the next step." />
+                       <text value="Welcome.\n\nThis start wizard will guide you through the basic setup of your STB.\nPress the OK button on your remote control to move to the next step." />                        
+
                        <code>
 self.clearSelectedKeys()
 self.selectKey("OK")
@@ -128,7 +129,8 @@ self.condition = config.misc.startwizard.doservicescan.value and nimmanager.some
                        </list>
                </step>
                <step id="finisheddefaultsatlists">
-                       <text value="Do you want to enable the parental control feature on your dreambox?" />
+                       <text value="Do you want to enable the parental control feature on your STB?" />                        
+
                        <list>
                                <listentry caption="Yes" step="parentalsetup" />
                                <listentry caption="No" step="end" />
@@ -169,12 +171,14 @@ config.ParentalControl.setuppin.value = config.ParentalControl.servicepin[0].val
 config.ParentalControl.setuppin.save()
                        </code>
 
-                       <text value="After the start wizard is completed, you need to protect single services. Refer to your dreambox's manual on how to do that." />
+                       <text value="After the start wizard is completed, you need to protect single services. Refer to your STB's manual on how to do that." />
+
                </step>
                <step id="end" laststep="true">
                        <condition>
 self.condition = self.isLastWizard
                        </condition>
-                       <text value="Thank you for using the wizard. Your box is now ready to use.\nPlease press OK to start using your Dreambox." />
+                       <text value="Thank you for using the wizard. Your box is now ready to use.\nPlease press OK to start using your STB." />
+
                </step>
 </wizard>
old mode 100644 (file)
new mode 100755 (executable)
index bd2486b..2a8fffa
@@ -3,7 +3,7 @@
                        <text value="Do you want to view a tutorial?" />
                        <list>
                                <listentry caption="Yes, view the tutorial" step="next" />
-                               <listentry caption="No, just start my dreambox" step="end" />
+                               <listentry caption="No, just start my STB" step="end" />
                        </list>
                </step>
 
old mode 100644 (file)
new mode 100755 (executable)
index b498a6c..3412288
@@ -16,7 +16,9 @@ libenigma_driver_a_SOURCES = \
        rc.cpp \
        rcconsole.cpp \
        rcinput.cpp \
-       rfmod.cpp
+       rfmod.cpp \
+       memtest.cpp \
+       sc_test.cpp
 
 driverincludedir = $(pkgincludedir)/lib/driver
 driverinclude_HEADERS = \
diff --git a/lib/driver/memtest.cpp b/lib/driver/memtest.cpp
new file mode 100755 (executable)
index 0000000..94bc6aa
--- /dev/null
@@ -0,0 +1,55 @@
+#include <lib/driver/memtest.h>\r
+#include <errno.h>\r
+#include <lib/base/eerror.h>\r
+#include <lib/base/estring.h>\r
+\r
+#define TESTSIZE 32*1024\r
+\r
+eMemtest *eMemtest::instance;\r
+\r
+eMemtest::eMemtest()\r
+{\r
+       instance = this;\r
+\r
+}\r
+\r
+eMemtest::~eMemtest()\r
+{\r
+       instance=NULL;\r
+\r
+}\r
+/*\r
+*      return value\r
+*      0 - ok\r
+*      1 - fail\r
+*/\r
+int eMemtest::dramtest()\r
+{\r
+       int result=0;\r
+       int i;\r
+       char memt[TESTSIZE];\r
+       eDebug("dramtest start");\r
+\r
+       \r
+       for(i=0;i<TESTSIZE;i++)\r
+               memt[i]=0x13;\r
+       \r
+       for(i=0;i<TESTSIZE;i++)\r
+       {\r
+               if(memt[i]!=0x13)\r
+               {\r
+                       result=1;\r
+                       break;\r
+               }\r
+       }\r
+       \r
+       return result;\r
+               \r
+}\r
+\r
+int eMemtest::flashtest()\r
+{\r
+       int result=0;\r
+       \r
+       return result;\r
+}\r
diff --git a/lib/driver/memtest.h b/lib/driver/memtest.h
new file mode 100755 (executable)
index 0000000..a054eef
--- /dev/null
@@ -0,0 +1,21 @@
+#ifdef BUILD_VUPLUS /* ikseong  */\r
+#ifndef __memtest_h\r
+#define __memtest_h\r
+\r
+#include <lib/base/object.h>\r
+#include <lib/python/connections.h>\r
+\r
+class eMemtest\r
+{\r
+       static eMemtest *instance;\r
+public:\r
+       eMemtest();\r
+       ~eMemtest();\r
+       int dramtest();\r
+       int flashtest();\r
+       static eMemtest *getInstance() { return instance; }\r
+\r
+};\r
+#endif\r
+#endif\r
+\r
diff --git a/lib/driver/sc_test.cpp b/lib/driver/sc_test.cpp
new file mode 100755 (executable)
index 0000000..cfb1fcd
--- /dev/null
@@ -0,0 +1,325 @@
+#include <lib/dvb/dvb.h>\r
+#include <lib/dvb/frontendparms.h>\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <limits.h>\r
+#include <string.h>\r
+#include <errno.h>\r
+#include <sys/ioctl.h>\r
+#include <sys/types.h>\r
+#include <sys/stat.h>\r
+#include <sys/poll.h>\r
+#include <fcntl.h>\r
+#include <time.h>\r
+#include <unistd.h>\r
+#include <termios.h>\r
+#include <lib/driver/sc_test.h>\r
+#include <errno.h>\r
+#include <lib/base/eerror.h>\r
+#include <lib/base/estring.h>\r
+\r
+#include <stdint.h>\r
+#include <sys/time.h>\r
+#include <poll.h>\r
+\r
+\r
+#define SC_CHECK_TIMEOUT       5\r
+#define SC_REMOVE_TIMEOUT      10\r
+\r
+\r
+#define SMART_CARD0    "/dev/sci0"                     /* upper smart card */\r
+#define SMART_CARD1    "/dev/sci1"                     /* lower smart card */\r
+\r
+#define SC_SUCCESS                     0\r
+#define NO_DEV_FOUND           -1\r
+#define SC_NOT_INSERTED        -2\r
+#define SC_NOT_VALID_ATR       -3\r
+#define SC_NOT_REMOVED         -4\r
+#define SC_READ_TIMEOUT        -5\r
+\r
+\r
+#define SCI_IOW_MAGIC                  's'\r
+\r
+/* ioctl cmd table */\r
+//#include "sci_global.h"\r
+#define IOCTL_SET_RESET                        _IOW(SCI_IOW_MAGIC, 1,  unsigned long)\r
+#define IOCTL_SET_MODES                        _IOW(SCI_IOW_MAGIC, 2,  SCI_MODES)\r
+#define IOCTL_GET_MODES                        _IOW(SCI_IOW_MAGIC, 3,  SCI_MODES)\r
+#define IOCTL_SET_PARAMETERS           _IOW(SCI_IOW_MAGIC, 4,  SCI_PARAMETERS)\r
+#define IOCTL_GET_PARAMETERS           _IOW(SCI_IOW_MAGIC, 5,  SCI_PARAMETERS)\r
+#define IOCTL_SET_CLOCK_START          _IOW(SCI_IOW_MAGIC, 6,  unsigned long)\r
+#define IOCTL_SET_CLOCK_STOP           _IOW(SCI_IOW_MAGIC, 7,  unsigned long)\r
+#define IOCTL_GET_IS_CARD_PRESENT      _IOW(SCI_IOW_MAGIC, 8,  unsigned long)\r
+#define IOCTL_GET_IS_CARD_ACTIVATED    _IOW(SCI_IOW_MAGIC, 9,  unsigned long)\r
+#define IOCTL_SET_DEACTIVATE           _IOW(SCI_IOW_MAGIC, 10, unsigned long)\r
+#define IOCTL_SET_ATR_READY            _IOW(SCI_IOW_MAGIC, 11, unsigned long)\r
+#define IOCTL_GET_ATR_STATUS           _IOW(SCI_IOW_MAGIC, 12, unsigned long)\r
+#define IOCTL_DUMP_REGS                        _IOW(SCI_IOW_MAGIC, 20, unsigned long)\r
+\r
+eSctest *eSctest::instance;\r
+\r
+eSctest::eSctest()\r
+{\r
+       instance = this;\r
+\r
+}\r
+\r
+eSctest::~eSctest()\r
+{\r
+       instance=NULL;\r
+\r
+}\r
+\r
+int eSctest::n_check_smart_card(char *dev_name)\r
+{\r
+       int fd;\r
+       struct pollfd pollfd;\r
+       unsigned char buf[64];\r
+       int cnt = 0;\r
+       int modem_status;\r
+       int count = SC_CHECK_TIMEOUT;\r
+       int readok=0;\r
+       \r
+       fd = ::open(dev_name, O_RDWR);\r
+       \r
+       if(fd < 0){\r
+               eDebug("sci0 open error\n");\r
+               return NO_DEV_FOUND;\r
+       }\r
+       else\r
+               eDebug("sci0 is opened fd : %d\n", fd);\r
+\r
+\r
+       ::ioctl(fd, IOCTL_GET_IS_CARD_PRESENT, &modem_status);\r
+\r
+       if( modem_status )\r
+               eDebug("card is now inserted\n");\r
+       else\r
+       {\r
+               eDebug("card is NOT inserted\n");\r
+               ::close(fd);\r
+               return SC_NOT_INSERTED;\r
+       }\r
+\r
+       /* now smart card is inserted, let's do reset */\r
+\r
+       ::ioctl(fd, IOCTL_SET_RESET, &modem_status);\r
+\r
+       /* now we can get the ATR */\r
+\r
+       pollfd.fd = fd;\r
+       pollfd.events = POLLIN|POLLOUT|POLLERR|POLLPRI;\r
+\r
+\r
+       while(poll(&pollfd, 1, 1000)>=0 && count--){\r
+\r
+               eDebug("pollfd.revents : 0x%x\n", pollfd.revents);\r
+               if(pollfd.revents & POLLIN){\r
+                       eDebug(">>read \n");\r
+                       cnt = read(fd, buf, 64);\r
+                       eDebug("<<read cnt:%d\n", cnt);                 \r
+                       if(cnt) \r
+                       {\r
+                               if(buf[0]==0x3b||buf[0]==0x3f)\r
+                               {\r
+                                       eDebug("read -%d : 0x%x",cnt, buf[0]);\r
+                                       readok = 1;\r
+                               }\r
+                               break;\r
+                       }\r
+                       else\r
+                               eDebug("no data\n");\r
+               }\r
+       }\r
+\r
+       ::close(fd);\r
+       \r
+       if (readok == 0) return SC_NOT_VALID_ATR;\r
+       if(!count) return SC_READ_TIMEOUT;\r
+       return SC_SUCCESS;\r
+}\r
+\r
+int eSctest::check_smart_card(char *dev_name)\r
+{\r
+       int fd;\r
+       struct pollfd pollfd;\r
+       unsigned char buf[64];\r
+       int cnt = 0;\r
+       int modem_status;\r
+       int count = SC_CHECK_TIMEOUT;\r
+       int readok=0;\r
+       fd = ::open(dev_name, O_RDWR);\r
+       \r
+       if(fd < 0){\r
+               eDebug("sci0 open error");\r
+               return NO_DEV_FOUND;\r
+       }\r
+       else\r
+               eDebug("sci0 is opened fd : %d", fd);\r
+\r
+       ::tcflush(fd, TCIFLUSH);\r
+\r
+       ::ioctl(fd, TIOCMGET, &modem_status);\r
+\r
+       if( modem_status & TIOCM_CAR)\r
+               eDebug("card is now inserted");\r
+       else\r
+       {\r
+               eDebug("card is NOT inserted");\r
+               close(fd);\r
+               return SC_NOT_INSERTED;\r
+       }\r
+\r
+       /* now smart card is inserted, let's do reset */\r
+\r
+       modem_status |= TIOCM_RTS;\r
+       ::ioctl(fd, TIOCMSET, &modem_status);\r
+\r
+       modem_status &= ~TIOCM_RTS;\r
+       ::ioctl(fd, TIOCMSET, &modem_status);\r
+\r
+\r
+       /* now we can get the ATR */\r
+\r
+       pollfd.fd = fd;\r
+       pollfd.events = POLLIN|POLLOUT|POLLERR|POLLPRI;\r
+\r
+\r
+       while(poll(&pollfd, 1, 1000)>=0 && count--){\r
+\r
+               eDebug("pollfd.revents : 0x%x %d", pollfd.revents,count);\r
+               if(pollfd.revents & POLLIN){\r
+                       eDebug(">>read ");\r
+                       cnt = ::read(fd, buf, 64);\r
+                       eDebug("<<read cnt:%d", cnt);\r
+                       if(cnt) \r
+                       {\r
+                               int i;\r
+                               for( i = 0 ; i < cnt ; i ++)\r
+                               {\r
+                                       if(buf[i]!=0x0)\r
+                                               readok = 1;\r
+                                       eDebug("read : 0x%x", buf[i]);\r
+                               }\r
+                               break;\r
+                       }\r
+                       else\r
+                               eDebug("no data");\r
+               }\r
+       }\r
+       \r
+       ::close(fd);\r
+       eDebug("readok = %d",readok);\r
+       if (readok == 0) return SC_NOT_VALID_ATR;\r
+       if(count<=0 ) return SC_READ_TIMEOUT;\r
+       return SC_SUCCESS;\r
+}\r
+int eSctest::eject_smart_card(char *dev_name)\r
+{\r
+       int fd;\r
+       struct pollfd pollfd;\r
+       unsigned char buf[64];\r
+       int cnt = 0;\r
+       int modem_status;\r
+       int count = SC_CHECK_TIMEOUT;\r
+       \r
+       fd = ::open(dev_name, O_RDWR);\r
+       \r
+       if(fd < 0){\r
+               eDebug("sci0 open error");\r
+               return NO_DEV_FOUND;\r
+       }\r
+       else\r
+               eDebug("sci0 is opened fd : %d", fd);\r
+\r
+       ::tcflush(fd, TCIFLUSH);\r
+\r
+       ::ioctl(fd, TIOCMGET, &modem_status);\r
+\r
+       if( modem_status & TIOCM_CAR)\r
+               eDebug("card is now inserted");\r
+       else\r
+       {\r
+               eDebug("card is NOT inserted");\r
+               close(fd);\r
+               return SC_NOT_INSERTED;\r
+       }\r
+       /* now we can get the ATR */\r
+\r
+       pollfd.fd = fd;\r
+       pollfd.events = POLLIN|POLLOUT|POLLERR|POLLPRI;\r
+\r
+       /* let's wait until card is removed for count secs.*/\r
+       count = SC_REMOVE_TIMEOUT;      \r
+       do{\r
+               ::ioctl(fd, TIOCMGET, &modem_status);\r
+               eDebug("modem_status : 0x%x %d", modem_status,count);\r
+               sleep(1);       \r
+\r
+       }\r
+       while((modem_status&TIOCM_CAR) && count--);\r
+\r
+       if(count<=0 ) return SC_NOT_REMOVED;\r
+       \r
+       ::close(fd);            \r
+       return SC_SUCCESS;\r
+}\r
+\r
+\r
+int eSctest::VFD_Open()\r
+{\r
+       VFD_fd = open("/dev/dbox/lcd0", O_RDWR);\r
+       return VFD_fd;\r
+}\r
+\r
+int eSctest::turnon_VFD()\r
+{ \r
+       ioctl(VFD_fd, 0xa0a0a0a0, 0);\r
+}\r
+\r
+int eSctest::turnoff_VFD()\r
+{\r
+       ioctl(VFD_fd, 0x01010101, 0);   \r
+}\r
+\r
+void eSctest::VFD_Close()\r
+{\r
+       close(VFD_fd);\r
+}\r
+\r
+extern int frontend0_fd;\r
+extern int frontend1_fd;\r
+\r
+int eSctest::getFrontendstatus(int fe)\r
+{\r
+       fe_status_t status;\r
+\r
+       int m_fd;\r
+       int res;\r
+\r
+       if (fe == 0)\r
+               m_fd = frontend0_fd;\r
+       else if (fe==1)\r
+               m_fd = frontend1_fd;\r
+       else \r
+               return -1;\r
+\r
+       if (m_fd < 0)\r
+       {\r
+               eDebug("%d open error ",fe);\r
+               return -1;\r
+       }\r
+       else\r
+               eDebug("%d open ok!!!! ",m_fd);\r
+       \r
+       if ( ioctl(m_fd, FE_READ_STATUS, &status) < 0)\r
+               eDebug("%d read error ",fe);            \r
+\r
+       if (status&FE_HAS_LOCK)\r
+               return 1;\r
+       else\r
+               return 0;\r
+\r
+}\r
+\r
diff --git a/lib/driver/sc_test.h b/lib/driver/sc_test.h
new file mode 100755 (executable)
index 0000000..8529120
--- /dev/null
@@ -0,0 +1,139 @@
+#ifdef BUILD_VUPLUS /* ikseong  */
+#ifndef __sc_test_h
+#define __sc_test_h
+
+#include <lib/base/object.h>
+#include <lib/python/connections.h>
+
+class eSctest
+{
+       static eSctest *instance;
+protected:
+       int VFD_fd;
+       
+public:
+       eSctest();
+       ~eSctest();
+       int n_check_smart_card(char *dev_name);
+       int check_smart_card(char *dev_name);
+       int eject_smart_card(char *dev_name);
+       int VFD_Open();
+       void VFD_Close();
+       int turnon_VFD();
+       int turnoff_VFD();
+       int getFrontendstatus(int fe);
+       
+       static eSctest *getInstance() { return instance; }
+};
+
+#if !defined(_sci_global_h_)
+#define _sci_global_h_
+
+#define INT int
+#define UCHAR unsigned char
+#define ULONG unsigned long
+
+#define SCI_CLASS_A                 1   /* only 5V Vcc to Smart Card */
+#define SCI_CLASS_B                 2   /* only 3V Vcc to Smart Card */
+#define SCI_CLASS_AB                3   /* 5V or 3V Vcc to Smart Card */
+#define SCI_NUMBER_OF_CONTROLLERS   2   /* number of SCI controllers */
+
+#define SCI_BUFFER_SIZE             512
+
+#define SCI_CLOCK_STOP_DISABLED     0
+#define SCI_CLOCK_STOP_LOW          1
+#define SCI_CLOCK_STOP_HIGH         2
+
+#define SCI_MAX_ATR_SIZE            33
+
+#define SCI_MAX_F                   80000000
+#define SCI_MAX_ETU                 0xFFF
+#define SCI_MAX_WWT                 0xFFFFFFFF
+#define SCI_MAX_CWT                 0xFFFF
+#define SCI_MAX_BWT                 0xFFFFFFFF
+#define SCI_MAX_EGT                 0xFF
+
+#define SCI_MIN_F                   1000000
+#define SCI_MIN_ETU                 8
+#define SCI_MIN_WWT                 12
+#define SCI_MIN_CWT                 12
+#define SCI_MIN_BWT                 971
+#define SCI_MIN_EGT                 0
+
+#define SCI_SYNC                    0x00000001
+#define SCI_DATA_ANY                0x00000002
+
+/* Reserved for Future Use defined as 0 */
+#define RFU                         0
+
+/* error codes */
+typedef enum
+{
+    SCI_ERROR_OK = 0,
+    SCI_ERROR_DRIVER_NOT_INITIALIZED = -1691,
+    SCI_ERROR_FAIL,
+    SCI_ERROR_KERNEL_FAIL,
+    SCI_ERROR_NO_ATR,
+    SCI_ERROR_TS_CHARACTER_INVALID,
+    SCI_ERROR_LRC_FAIL,
+    SCI_ERROR_CRC_FAIL,
+    SCI_ERROR_LENGTH_FAIL,
+    SCI_ERROR_PARITY_FAIL,
+    SCI_ERROR_RX_OVERFLOW_FAIL,
+    SCI_ERROR_TX_OVERFLOW_FAIL,
+    SCI_ERROR_TX_UNDERRUN_FAIL,
+    SCI_ERROR_CARD_NOT_PRESENT,
+    SCI_ERROR_CARD_NOT_ACTIVATED,
+    SCI_ERROR_AWT_TIMEOUT,
+    SCI_ERROR_WWT_TIMEOUT,
+    SCI_ERROR_CWT_TIMEOUT,
+    SCI_ERROR_BWT_TIMEOUT,
+    SCI_ERROR_PARAMETER_OUT_OF_RANGE,
+    SCI_ERROR_TRANSACTION_ABORTED,
+    SCI_ERROR_CLOCK_STOP_DISABLED,
+    SCI_ERROR_TX_PENDING,
+    SCI_ERROR_ATR_PENDING
+}
+SCI_ERROR;
+
+/* SCI driver modes */
+typedef struct sci_modes
+{
+    INT emv2000;
+    INT dma;
+    INT man_act;
+    INT rw_mode;
+}
+SCI_MODES;
+
+/* SCI communication parameters */
+typedef struct sci_parameters
+{
+    UCHAR T;
+    ULONG FI;                          // Contains the clock rate conversion. This factor is used as an index into a table of maximum operating frequencies. When the smart card is reset, the smart card driver library uses this value to calculate a new clock frequency. 
+    ULONG ETU;                 //elementary time unit 
+    ULONG WWT;
+    ULONG CWT;
+    ULONG BWT;
+    ULONG EGT;                 //Extra Guard Time 
+    ULONG clock_stop_polarity;
+    UCHAR check;
+    UCHAR P;
+    UCHAR I;
+    UCHAR U;
+}
+SCI_PARAMETERS;
+
+/* SCI ATR status */
+typedef enum
+{
+    SCI_WITHOUT_ATR = 0,
+    SCI_ATR_READY
+}
+SCI_ATR_STATUS;
+
+#endif /* _sci_global_h_ */
+
+#endif
+#endif
+
old mode 100644 (file)
new mode 100755 (executable)
index 0b1bdc2..af46823
@@ -1187,8 +1187,22 @@ void eDVBChannel::frontendStateChanged(iDVBFrontend*fe)
                }
        } else if (state == iDVBFrontend::stateFailed)
        {
+#ifdef BUILD_VUPLUS /* ikseong  */
+               if (m_current_frontend_parameters)
+               {
+                       eDebug("OURSTATE: lost lock, trying to retune");
+                       ourstate = state_tuning;
+                       m_frontend->get().tune(*m_current_frontend_parameters);
+               } 
+               else
+               {
+                       eDebug("OURSTATE: failed");
+                       ourstate = state_failed;
+               }
+#else
                eDebug("OURSTATE: failed");
                ourstate = state_failed;
+#endif         
        } else
                eFatal("state unknown");
 
old mode 100644 (file)
new mode 100755 (executable)
index 5718896..7777bf6
@@ -490,6 +490,11 @@ void eDVBFrontend::reopenFrontend()
        openFrontend();
 }
 
+#ifdef BUILD_VUPLUS /* ikseong */
+int frontend0_fd;
+int frontend1_fd;
+#endif
+
 int eDVBFrontend::openFrontend()
 {
        if (m_state != stateClosed)
@@ -514,6 +519,15 @@ int eDVBFrontend::openFrontend()
                                eWarning("failed! (%s) %m", m_filename);
                                return -1;
                        }
+#ifdef BUILD_VUPLUS /* ikseong */
+                       else
+                       {                               
+                               if (m_dvbid==0)
+                                       frontend0_fd = m_fd;
+                               else if (m_dvbid==1)
+                                       frontend1_fd = m_fd;
+                       }
+#endif
                }
                else
                        eWarning("frontend %d already opened", m_dvbid);
@@ -738,6 +752,10 @@ void eDVBFrontend::timeout()
        m_tuning = 0;
        if (m_state == stateTuning)
        {
+#ifdef BUILD_VUPLUS /* ikseong  */
+               eDVBFrontend *sec_fe = this;
+               sec_fe->m_data[CSW] = sec_fe->m_data[UCSW] = sec_fe->m_data[TONEBURST] = -1; // reset diseqc
+#endif
                m_state = stateFailed;
                m_stateChanged(this);
        }
old mode 100644 (file)
new mode 100755 (executable)
index bade53b..8ac8cd3
@@ -36,7 +36,11 @@ void gLCDDC::exec(const gOpcode *o)
        {
        case gOpcode::flush:
 //             if (update)
+#ifndef BUILD_VUPLUS /* ikseong  */
                        lcd->update();
+#else
+                       ;
+#endif
        default:
                gDC::exec(o);
                break;
old mode 100644 (file)
new mode 100755 (executable)
index 518ee1b..a5ac351
@@ -183,6 +183,9 @@ eDBoxLCD *eDBoxLCD::getInstance()
 
 void eDBoxLCD::update()
 {
+#ifdef BUILD_VUPLUS /* ikseong  */
+       return ;
+#endif
        if (lcdfd >= 0)
        {
                if (!is_oled || is_oled == 2)
old mode 100644 (file)
new mode 100755 (executable)
index 2658f9b..37d47f3
@@ -73,8 +73,8 @@ def InitAVSwitch():
        # when YUV is not enabled, don't let the user select it
        if config.av.yuvenabled.value:
                colorformat_choices["yuv"] = _("YPbPr")
-
-       config.av.colorformat = ConfigSelection(choices=colorformat_choices, default="rgb")
+#      ikseong
+       config.av.colorformat = ConfigSelection(choices=colorformat_choices, default="cvbs")
        config.av.aspectratio = ConfigSelection(choices={
                        "4_3_letterbox": _("4:3 Letterbox"),
                        "4_3_panscan": _("4:3 PanScan"), 
index fa3518c..e2fa12c 100644 (file)
@@ -71,7 +71,7 @@ class ServiceInfo(Converter, object):
                                while idx < n:
                                        i = audio.getTrackInfo(idx)
                                        description = i.getDescription();
-                                       if "AC3" in description or "DTS" in description:
+                                       if "AC3" in description or "DTS" in description or "Dolby Digital" in description:
                                                return True
                                        idx += 1
                        return False
index 30a7b60..b13639e 100644 (file)
@@ -1,5 +1,7 @@
 from os import system, listdir, statvfs, popen, makedirs, stat, major, minor, path, access
-from Tools.Directories import SCOPE_HDD, resolveFilename
+#      ikseong
+from Tools.Directories import SCOPE_HDD, resolveFilename, fileExists
+
 from Tools.CList import CList
 from SystemInfo import SystemInfo
 import time
@@ -95,7 +97,13 @@ class Harddisk:
                return ret
 
        def diskSize(self):
-               line = readFile(self.sysfsPath('size'))
+               #       ikseong
+               try:
+                       line = readFile(self.sysfsPath('size'))
+               except:
+                       harddiskmanager.removeHotplugPartition(self.device)
+                       print "error remove",self.device
+                       return -1
                try:
                        cap = int(line)
                except:
@@ -109,14 +117,20 @@ class Harddisk:
                return "%d.%03d GB" % (cap/1000, cap%1000)
 
        def model(self):
-               if self.device[:2] == "hd":
-                       return readFile('/proc/ide/' + self.device + '/model')
-               elif self.device[:2] == "sd":
-                       vendor = readFile(self.sysfsPath('device/vendor'))
-                       model = readFile(self.sysfsPath('device/model'))
-                       return vendor + '(' + model + ')'
-               else:
-                       assert False, "no hdX or sdX"
+               #       ikseong
+               try:
+                       if self.device[:2] == "hd":
+                               return readFile('/proc/ide/' + self.device + '/model')
+                       elif self.device[:2] == "sd":
+                               vendor = readFile(self.sysfsPath('device/vendor'))
+                               model = readFile(self.sysfsPath('device/model'))
+                               return vendor + '(' + model + ')'
+                       else:
+                               assert False, "no hdX or sdX"
+               except:
+                       harddiskmanager.removeHotplugPartition(self.device)
+                       print "error remove",self.device
+                       return -1
 
        def free(self):
                try:
@@ -228,7 +242,12 @@ class Harddisk:
                return (res >> 8)
 
        def createMovieFolder(self):
+#      ikseong
                try:
+                       if not fileExists("/hdd", 0):
+                               print "not found /hdd"
+                               system("ln -s /media/hdd /hdd")
+#                              
                        makedirs(resolveFilename(SCOPE_HDD))
                except OSError:
                        return -1
@@ -337,6 +356,10 @@ class Harddisk:
                idle_time = t - self.last_access
 
                stats = self.readStats()
+               #       ikseong
+               if stats == -1:
+                       self.setIdleTime(0)
+                       return
                print "nr_read", stats[0], "nr_write", stats[1]
                l = sum(stats)
                print "sum", l, "prev_sum", self.last_stat
@@ -533,6 +556,7 @@ class HarddiskManager:
        def getAutofsMountpoint(self, device):
                return "/autofs/%s/" % (device)
 
+
        def is_hard_mounted(self, device):
                mounts = file('/proc/mounts').read().split('\n')
                for x in mounts:
@@ -601,6 +625,9 @@ class HarddiskManager:
        def HDDList(self):
                list = [ ]
                for hd in self.hdd:
+                       #       ikseong
+                       if hd.model() == -1:
+                               continue
                        hdd = hd.model() + " - " + hd.bus()
                        cap = hd.capacity()
                        if cap != "":
index e01c61f..a004204 100644 (file)
@@ -1,7 +1,7 @@
 from Plugins.Plugin import PluginDescriptor
 from Components.PluginComponent import plugins
 
-from os import path as os_path, walk as os_walk
+from os import path as os_path, walk as os_walk, system
 from mimetypes import guess_type, add_type
 
 add_type("application/x-debian-package", ".ipk")
@@ -128,6 +128,8 @@ def scanDevice(mountpoint):
        for p in paths_to_scan:
                path = os_path.join(mountpoint, p.path)
 
+                cmd = "ls " + path
+                system(cmd)
                for root, dirs, files in os_walk(path):
                        for f in files:
                                path = os_path.join(root, f)
old mode 100644 (file)
new mode 100755 (executable)
index 39f54c0..68d5464
@@ -60,7 +60,9 @@ class TunerInfo(GUIComponent):
                        value = self.getValue(self.LOCK)
 
                if self.type == self.SNR_DB:
-                       if value != 0x12345678:
+#      ikseong         
+#                      if value != 0x12345678:
+                       if value is not None and value != 0x12345678:
                                self.setText("%3.02f dB" % (value / 100.0))
                        else:
                                self.setText("")
old mode 100644 (file)
new mode 100755 (executable)
index 6dbcd49..51e0352
@@ -31,7 +31,7 @@ class DVDProject:
                self.target = None
                self.settings = ConfigSubsection()
                self.settings.name = ConfigText(fixed_size = False, visible_width = 40)
-               self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("Dreambox format data DVD (HDTV compatible)"))])
+               self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("STB format data DVD (HDTV compatible)"))])
                self.settings.titlesetmode = ConfigSelection(choices = [("single", _("Simple titleset (compatibility for legacy players)")), ("multi", _("Complex (allows mixing audio tracks and aspects)"))], default="multi")
                self.settings.output = ConfigSelection(choices = [("iso", _("Create DVD-ISO")), ("dvd", _("Burn DVD"))])
                self.settings.isopath = ConfigText(fixed_size = False, visible_width = 40)
old mode 100644 (file)
new mode 100755 (executable)
index a928ae2..816551c
@@ -902,7 +902,7 @@ class DVDJob(Job):
                                tool = "genisoimage"
                                isopathfile = getISOfilename(self.project.settings.isopath.getValue(), volName)
                                burnargs = [ "-o", isopathfile ]
-                       burnargs += [ "-dvd-video", "-publisher", "Dreambox", "-V", volName, self.workspace + "/dvd" ]
+                       burnargs += [ "-dvd-video", "-publisher", "STB", "-V", volName, self.workspace + "/dvd" ]
                        BurnTask(self, burnargs, tool)
                RemoveDVDFolder(self)
 
@@ -948,7 +948,7 @@ class DVDdataJob(Job):
                        burnargs += ["-iso-level", "4", "-allow-limited-size" ]
                elif self.project.settings.dataformat.getValue() == "udf":
                        burnargs += ["-udf", "-allow-limited-size" ]
-               burnargs += [ "-publisher", "Dreambox", "-V", volName, "-follow-links", self.workspace ]
+               burnargs += [ "-publisher", "STB", "-V", volName, "-follow-links", self.workspace ]
                BurnTask(self, burnargs, tool)
                RemoveDVDFolder(self)
 
@@ -969,6 +969,6 @@ class DVDisoJob(Job):
                        burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
                        if getSize(imagepath)/(1024*1024) > self.project.MAX_SL:
                                burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
-                       burnargs += [ "-dvd-video", "-publisher", "Dreambox", "-V", volName, imagepath ]
+                       burnargs += [ "-dvd-video", "-publisher", "STB", "-V", volName, imagepath ]
                tool = "growisofs"
                BurnTask(self, burnargs, tool)
index 2cbeb63..e2a8675 100755 (executable)
@@ -212,7 +212,7 @@ class TitleList(Screen, HelpableScreen):
                if source is None:
                        return None
                if not source.getPath().endswith(".ts"):
-                       self.session.open(MessageBox,text = _("You can only burn Dreambox recordings!"), type = MessageBox.TYPE_ERROR)
+                       self.session.open(MessageBox,text = _("You can only burn STB recordings!"), type = MessageBox.TYPE_ERROR)
                        return None
                t = self.project.addService(source)
                try:
@@ -350,7 +350,7 @@ class TitleList(Screen, HelpableScreen):
                t = self.current_edit_title
                t.titleEditDone(cutlist)
                if t.VideoType != 0:
-                       self.session.openWithCallback(self.DVDformatCB,MessageBox,text = _("The DVD standard doesn't support H.264 (HDTV) video streams. Do you want to create a Dreambox format data DVD (which will not play in stand-alone DVD players) instead?"), type = MessageBox.TYPE_YESNO)
+                       self.session.openWithCallback(self.DVDformatCB,MessageBox,text = _("The DVD standard doesn't support H.264 (HDTV) video streams. Do you want to create a STB format data DVD (which will not play in stand-alone DVD players) instead?"), type = MessageBox.TYPE_YESNO)
                else:
                        self.updateTitleList()
 
index 6ff1c5a..75fba2d 100644 (file)
@@ -137,8 +137,9 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
 
                self.seek_target = None
 
-               from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
-               hotplugNotifier.append(self.hotplugCB)
+#      ikseong
+#              from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
+#              hotplugNotifier.append(self.hotplugCB)
 
                class MoviePlayerActionMap(NumberActionMap):
                        def __init__(self, player, contexts = [ ], actions = { }, prio=0):
@@ -168,8 +169,11 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                                "prevBouquet": (self.switchToPlayList, _("switch to playlist")),
                                "nextBouquet": (self.switchToFileList, _("switch to filelist")),
                                "delete": (self.deletePlaylistEntry, _("delete playlist entry")),
-                               "shift_stop": (self.clear_playlist, _("clear playlist")),
-                               "shift_record": (self.playlist.PlayListShuffle, _("shuffle playlist")),
+#ikseong                               
+#                              "shift_stop": (self.clear_playlist, _("clear playlist")),
+#                              "shift_record": (self.playlist.PlayListShuffle, _("shuffle playlist")),
+                               "shift_stop": self.clear_playlist,
+                               "shift_record": self.playlist.PlayListShuffle,
                                "subtitles": (self.subtitleSelection, _("Subtitle selection")),
                        }, -2)
 
@@ -248,8 +252,9 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                if config.mediaplayer.saveDirOnExit.getValue():
                        config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory())
                        config.mediaplayer.defaultDir.save()
-               from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
-               hotplugNotifier.remove(self.hotplugCB)
+#      ikseong                 
+#      from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
+#      hotplugNotifier.remove(self.hotplugCB)
                del self["coverArt"].picload
                self.close()
 
@@ -277,13 +282,13 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                currPlay = self.session.nav.getCurrentService()
                sTagAudioCodec = currPlay.info().getInfoString(iServiceInformation.sTagAudioCodec)
                print "[__evAudioDecodeError] audio-codec %s can't be decoded by hardware" % (sTagAudioCodec)
-               self.session.open(MessageBox, _("This Dreambox can't decode %s streams!") % sTagAudioCodec, type = MessageBox.TYPE_INFO,timeout = 20 )
+               self.session.open(MessageBox, _("This STB can't decode %s streams!") % sTagAudioCodec, type = MessageBox.TYPE_INFO,timeout = 20 )
 
        def __evVideoDecodeError(self):
                currPlay = self.session.nav.getCurrentService()
                sTagVideoCodec = currPlay.info().getInfoString(iServiceInformation.sTagVideoCodec)
                print "[__evVideoDecodeError] video-codec %s can't be decoded by hardware" % (sTagVideoCodec)
-               self.session.open(MessageBox, _("This Dreambox can't decode %s streams!") % sTagVideoCodec, type = MessageBox.TYPE_INFO,timeout = 20 )
+               self.session.open(MessageBox, _("This STB can't decode %s streams!") % sTagVideoCodec, type = MessageBox.TYPE_INFO,timeout = 20 )
 
        def __evPluginError(self):
                currPlay = self.session.nav.getCurrentService()
index f34f0a3..93ee28e 100755 (executable)
@@ -1,6 +1,7 @@
 <default>
          <prerequisites>
                     <hardware type="dm8000" />
+                    <hardware type="dm500hd" />
                     <tag type="CI" />
                     <tag type="System" />
          </prerequisites>
index b345428..5f2f82a 100644 (file)
@@ -57,6 +57,10 @@ class CIselectMainMenu(Screen):
                                        appname = _("Slot %d") %(slot+1) + " - " + _("init modules")
                                elif state == 2:
                                        appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
+                               #       ikseong                                 
+                               else :
+                                       appname = _("Slot %d") %(slot+1) + " - " + _("no module found")
+                               #
                                self.list.append( (appname, ConfigNothing(), 0, slot) )
                else:
                        self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )
index ab74de4..25a06eb 100644 (file)
@@ -176,7 +176,7 @@ class CrashlogAutoSubmitConfiguration(Screen, ConfigListScreen):
                        self.enableVKeyIcon()
                        self.showKeypad()
                elif current == self.AnonCrashlogEntry:
-                       self["status"].setText(_("Adds enigma2 settings and dreambox model informations like SN, rev... if enabled."))
+                       self["status"].setText(_("Adds enigma2 settings and STB model informations like SN, rev... if enabled."))
                        self.disableVKeyIcon()
                elif current == self.NetworkEntry:
                        self["status"].setText(_("Adds network configuration if enabled."))
@@ -333,15 +333,16 @@ def mxServerFound(mxServer,session):
                if crashlog.startswith("enigma2_crash_") and crashlog.endswith(".log"):
                        print "[CrashlogAutoSubmit] - found crashlog: ",os.path.basename(crashlog)
                        crashLogFilelist.append('/media/hdd/' + crashlog)
-
-       if len(crashLogFilelist):
-               if config.plugins.crashlogautosubmit.sendmail.value == "send":
-                       Notifications.AddNotificationWithCallback(handleAnswer, ChoiceBox, title=_("Crashlogs found!\nSend them to Dream Multimedia?"), list = list)
-               elif config.plugins.crashlogautosubmit.sendmail.value == "send_always":
-                       send_mail()
-       else:
-               print "[CrashlogAutoSubmit] - no crashlogs found."
-
+#      ikseong
+#      if len(crashLogFilelist):
+#              if config.plugins.crashlogautosubmit.sendmail.value == "send":
+#                      session.openWithCallback(handleAnswer, ChoiceBox, title=_("Crashlogs found!\nSend them to Dream Multimedia ?"), list = list)
+#              elif config.plugins.crashlogautosubmit.sendmail.value == "send_always":
+#                      send_mail()
+#      else:   
+#              print "[CrashlogAutoSubmit] - no crashlogs found."
+#
+       print "block to handle Crashlogs "
 
 def getMailExchange(host):
        print "[CrashlogAutoSubmit] - getMailExchange"
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/Makefile.am b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/Makefile.am
new file mode 100755 (executable)
index 0000000..36e60c8
--- /dev/null
@@ -0,0 +1,10 @@
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/FPGAUpgrade
+
+SUBDIRS = meta
+
+install_PYTHON =        \
+       __init__.py \
+       plugin.py \
+       fpga.py \
+       fpga.conf \
+       _fpga.so
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/__init__.py b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/_fpga.so b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/_fpga.so
new file mode 100644 (file)
index 0000000..79edeb3
Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/_fpga.so differ
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.conf b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.conf
new file mode 100644 (file)
index 0000000..2482692
--- /dev/null
@@ -0,0 +1 @@
+http://archive.vuplus.com/download/fpga/
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.py b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.py
new file mode 100644 (file)
index 0000000..61e1209
--- /dev/null
@@ -0,0 +1,87 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.39
+#
+# Do not make changes to this file unless you know what you are doing--modify
+# the SWIG interface file instead.
+# This file is compatible with both classic and new-style classes.
+
+from sys import version_info
+if version_info >= (2,6,0):
+    def swig_import_helper():
+        from os.path import dirname
+        import imp
+        fp = None
+        try:
+            fp, pathname, description = imp.find_module('_fpga', [dirname(__file__)])
+        except ImportError:
+            import _fpga
+            return _fpga
+        if fp is not None:
+            try:
+                _mod = imp.load_module('_fpga', fp, pathname, description)
+            finally:
+                fp.close()
+                return _mod
+    _fpga = swig_import_helper()
+    del swig_import_helper
+else:
+    import _fpga
+del version_info
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'SwigPyObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static) or hasattr(self,name):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError(name)
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+try:
+    _object = object
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+
+
+class Fpga(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, Fpga, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, Fpga, name)
+    __repr__ = _swig_repr
+    def __init__(self): 
+        this = _fpga.new_Fpga()
+        try: self.this.append(this)
+        except: self.this = this
+    __swig_destroy__ = _fpga.delete_Fpga
+    __del__ = lambda self : None;
+    def get_error_msg(self, *args): return _fpga.Fpga_get_error_msg(self, *args)
+    def fpga_upgrade(self, *args): return _fpga.Fpga_fpga_upgrade(self, *args)
+Fpga_swigregister = _fpga.Fpga_swigregister
+Fpga_swigregister(Fpga)
+
+
+
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/Makefile.am
new file mode 100755 (executable)
index 0000000..31e3c0b
--- /dev/null
@@ -0,0 +1,3 @@
+installdir = $(datadir)/meta
+
+dist_install_DATA = plugin_fpgaupgrade.xml
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/plugin_fpgaupgrade.xml b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/plugin_fpgaupgrade.xml
new file mode 100755 (executable)
index 0000000..d7c500a
--- /dev/null
@@ -0,0 +1,16 @@
+<default>
+         <prerequisites>
+                    <tag type="System" />
+         </prerequisites>
+          <info>
+                    <author>oskwon</author>
+                    <name>FPGAUpgrade</name>
+                    <packagename>enigma2-plugin-systemplugins-fpgaupgrade</packagename>
+                    <shortdescription>Upgrade your system FPGA</shortdescription>
+                    <description>Upgrade your internal system FPGA.</description>
+          </info>
+
+         <files type="package"> <!-- without version, without .ipk -->
+               <file type="package" name="enigma2-plugin-systemplugins-fpgaupgrade" />
+       </files>
+</default>
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/plugin.py b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/plugin.py
new file mode 100644 (file)
index 0000000..2066706
--- /dev/null
@@ -0,0 +1,189 @@
+import os
+
+from urllib import urlretrieve
+import urllib
+
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+
+from Plugins.Plugin import PluginDescriptor
+
+from Components.PluginComponent import plugins
+from Components.Pixmap import Pixmap
+from Components.ActionMap import ActionMap
+from Components.Sources.StaticText import StaticText
+from Components.FileList import FileList 
+from Tools.Directories import fileExists
+
+class FPGAUpgrade(Screen):
+       skin = """
+               <screen position="center,center" size="560,440" title="FPGA Upgrade" >
+                       <ePixmap pixmap="Vu_HD/buttons/red.png" position="0,7" size="140,40" alphatest="blend" />
+                       <ePixmap pixmap="Vu_HD/buttons/green.png" position="140,7" size="140,40" alphatest="blend" />
+                       <ePixmap pixmap="Vu_HD/buttons/yellow.png" position="280,7" size="140,40" alphatest="blend" />
+                       <ePixmap pixmap="Vu_HD/buttons/blue.png" position="420,7" size="140,40" alphatest="blend" />
+
+                       <widget source="key_red" render="Label" position="20,0" zPosition="1" size="115,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+                       <widget source="key_green" render="Label" position="160,0" zPosition="1" size="115,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+                       <widget source="key_yellow" render="Label" position="300,0" zPosition="1" size="115,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+                       <widget source="key_blue" render="Label" position="440,0" zPosition="1" size="115,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+
+                       <widget source="status" render="Label" position="15,45" zPosition="1" size="540,40" font="Regular;18" halign="left" valign="center" backgroundColor="#a08500" transparent="1" />
+                       <widget name="file_list" position="0,100" size="555,325" scrollbarMode="showOnDemand" />
+                </screen>"""
+
+       def __init__(self, session): 
+               Screen.__init__(self, session)
+                self.session = session 
+
+               self["key_red"] = StaticText(_("Close"))
+               self["key_green"] = StaticText(_("Ugrade"))
+               self["key_yellow"] = StaticText(_(" "))
+               self["key_blue"] = StaticText(_("Download"))
+               #self["key_blue"] = StaticText(_(" "))
+               self["status"] = StaticText(_(" "))
+               self["file_list"] = FileList("/", matchingPattern = "^.*")
+
+               self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", ],
+                {
+                        "red": self.onClickRed,
+                       "green": self.onClickGreen,
+                       "blue": self.onClickBlue,
+                       "back": self.onClickRed,
+                       "ok": self.onClickOk,
+                       "up": self.onClickUp,
+                       "down": self.onClickDown,
+                       "left": self.onClickLeft,
+                       "right": self.onClickRight,
+                }, -1) 
+               self.onLayoutFinish.append(self.doLayoutFinish)
+       
+                self.ERROR_MSG = ''                                                                                          
+                self.ERROR_CODE = 0                                                                                          
+                self.SOURCELIST = self["file_list"]                                                                          
+                self.STATUS_BAR = self["status"]                                                                             
+                self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+               self.DEVICE_PATH = '/dev/misc/dp'                                                                                       
+               self.DOWNLOAD_TAR_PATH = '/tmp/'                                                                             
+               self.DOWNLOAD_FILE_NAME = 'TS_PRO.dat'                                                                       
+               self.DOWNLOAD_URL = ''
+               self.doLoadConf()
+
+               print self.DEVICE_PATH
+               print self.DOWNLOAD_TAR_PATH
+               print self.DOWNLOAD_FILE_NAME
+               print self.DOWNLOAD_URL
+
+       def doLayoutFinish(self):
+               return  
+
+       def doExit(self):
+               if fileExists(self.DOWNLOAD_TAR_PATH + self.DOWNLOAD_FILE_NAME):
+                       os.remove(self.DOWNLOAD_TAR_PATH + self.DOWNLOAD_FILE_NAME)
+               self.close()
+
+       def doLoadConf(self):
+               if fileExists("/proc/stb/info/vumodel"):
+                        model = open("/proc/stb/info/vumodel").read().strip()
+                       download_uri_header = open('/usr/lib/enigma2/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.conf').readline().strip()
+                       self.DOWNLOAD_URL = str(download_uri_header) + "vu" + str(model) + "/" + self.DOWNLOAD_FILE_NAME
+
+       def doHook(self, blockNumber, blockSize, totalSize) :
+               if blockNumber*blockSize > totalSize :
+                       self.STATUS_BAR.setText(_("Downloaded " + self.DOWNLOAD_TAR_PATH + self.DOWNLOAD_FILE_NAME))
+               else :
+                       self.STATUS_BAR.setText(_("Downloading..."))
+               
+       def onCallbackHandler(self, confirmed):                                                                                                                
+               if confirmed:                                                                                                                    
+                       self.doExit()   
+
+       def doUpgradeHandler(self, confirmed):
+               if confirmed == False:
+                       return
+
+               import fpga
+               FPGA = fpga.Fpga()
+               path = ''
+               try:
+                       path = self.SOURCELIST.getCurrentDirectory() + self.SOURCELIST.getFilename() 
+               except:
+                       #self.session.open(MessageBox, _("Can't select directory."), MessageBox.TYPE_INFO, timeout = 5)
+                       return
+
+               self.ERROR_CODE = FPGA.fpga_upgrade(path, self.DEVICE_PATH)
+               if self.ERROR_CODE > 0:
+                       self.ERROR_MSG = FPGA.get_error_msg(self.ERROR_CODE, self.ERROR_MSG)
+                       self.session.openWithCallback(self.onCallbackHandler, MessageBox, _("Fail to upgrade.\nCause : " + self.ERROR_MSG + "\nDo you want to exit?"), MessageBox.TYPE_YESNO, timeout = 10, default = True)
+
+                       print "DEVICE_PATH : ", self.DEVICE_PATH
+                       print "FILE_PATH : ", path
+               else:
+                       self.session.open(MessageBox, _("Success!!"), MessageBox.TYPE_INFO, timeout = 5)
+
+       def onClickRed(self):
+               self.doExit()
+
+       # run upgrade!!
+       def onClickGreen(self):
+               #self.session.open(MessageBox, _("Upgrade will take about 5 minutes to finish."), MessageBox.TYPE_INFO, timeout = 10)
+               self.session.openWithCallback(self.doUpgradeHandler, MessageBox, _("Upgrade will take about 5 minutes to finish.\nDo you want to upgrade?"), MessageBox.TYPE_YESNO, timeout = 10, default = True)
+
+       def onClickBlue(self):
+               fname = ''
+               header = ''
+               test_opener = urllib.URLopener()
+               try:
+                       test_opener.open(self.DOWNLOAD_URL)
+               except:
+                       self.session.open(MessageBox, _('File not found'), MessageBox.TYPE_INFO, timeout = 5)
+                       del test_opener
+                       return
+               try :
+                       fname, header = urlretrieve(self.DOWNLOAD_URL, self.DOWNLOAD_TAR_PATH + self.DOWNLOAD_FILE_NAME, self.doHook)
+               except IOError, msg:
+                       self.session.open(MessageBox, _(str(msg)), MessageBox.TYPE_INFO, timeout = 5)
+                       del test_opener
+                       return
+               del test_opener
+
+               before_name = ''
+               self.SOURCELIST.changeDir(self.DOWNLOAD_TAR_PATH)
+               self.SOURCELIST.moveToIndex(0)
+               while cmp(self.SOURCELIST.getFilename(), self.DOWNLOAD_FILE_NAME) != 0 :
+                       self.SOURCELIST.down()
+                       if cmp(before_name, self.SOURCELIST.getFilename()) == 0:
+                               break
+                       before_name = self.SOURCELIST.getFilename()
+
+       def onClickOk(self):
+               if self.SOURCELIST.canDescent() : # isDir                                                                   
+                       self.SOURCELIST.descent()                                                                              
+                       if self.SOURCELIST.getCurrentDirectory():
+                               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+               else:                                                                                                      
+                       self.onClickGreen()
+
+       def onClickUp(self):
+               self.SOURCELIST.up()
+               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+       def onClickDown(self):
+               self.SOURCELIST.down()
+               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+       def onClickLeft(self):
+               self.SOURCELIST.pageUp()
+               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+       def onClickRight(self):
+               self.SOURCELIST.pageDown()
+               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+def main(session, **kwargs):
+        session.open(FPGAUpgrade)
+                                                           
+def Plugins(**kwargs):            
+       return PluginDescriptor(name=_("FPGA Upgrade"), description="Upgrade FPGA..", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
+
diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/Makefile.am b/lib/python/Plugins/SystemPlugins/FactoryTest/Makefile.am
new file mode 100755 (executable)
index 0000000..9660052
--- /dev/null
@@ -0,0 +1,6 @@
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/FactoryTest
+
+install_PYTHON =       \
+       __init__.py \
+       plugin.py \
+       testdb
diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/__init__.py b/lib/python/Plugins/SystemPlugins/FactoryTest/__init__.py
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py b/lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py
new file mode 100755 (executable)
index 0000000..484749f
--- /dev/null
@@ -0,0 +1,1870 @@
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Plugins.Plugin import PluginDescriptor
+from Components.MenuList import MenuList
+from Tools.Directories import fileExists
+from Components.ServiceList import ServiceList
+from Components.ActionMap import ActionMap,NumberActionMap
+from Components.config import config
+from os import system,access,F_OK,R_OK,W_OK
+from Components.Label import Label
+from Components.AVSwitch import AVSwitch
+from time import sleep
+from Components.Console import Console
+from enigma import eTimer
+from Components.HTMLComponent import HTMLComponent
+from Components.GUIComponent import GUIComponent
+from enigma import eListboxPythonStringContent, eListbox, gFont, eServiceCenter, eDVBResourceManager
+from enigma import eServiceReference
+from enigma import eMemtest
+from enigma import eSctest
+from enigma import eDVBDB
+from Components.NimManager import nimmanager
+from enigma import eDVBCI_UI,eDVBCIInterfaces
+
+class TestResultList(HTMLComponent, GUIComponent):
+       def __init__(self, list, enableWrapAround=False, content=eListboxPythonStringContent):
+               GUIComponent.__init__(self)
+               self.list = list
+               self.l = content()
+               self.l.setList(self.list)
+               self.onSelectionChanged = [ ]
+               self.enableWrapAround = enableWrapAround
+
+       def getCurrent(self):
+               return self.l.getCurrentSelection()
+
+       GUI_WIDGET = eListbox
+
+       def postWidgetCreate(self, instance):
+               self.instance.setSelectionEnable(0)
+               instance.setContent(self.l)
+               instance.selectionChanged.get().append(self.selectionChanged)
+               if self.enableWrapAround:
+                       self.instance.setWrapAround(True)
+
+       def preWidgetRemove(self, instance):
+               instance.setContent(None)
+               instance.selectionChanged.get().remove(self.selectionChanged)
+
+       def selectionChanged(self):
+               for f in self.onSelectionChanged:
+                       f()
+
+       def getSelectionIndex(self):
+               return self.l.getCurrentSelectionIndex()
+
+       def getSelectedIndex(self):
+               return self.l.getCurrentSelectionIndex()
+
+       def setList(self, list):
+               self.list = list
+               self.l.setList(self.list)
+
+       def updateList(self, list):
+               self.list = list
+               self.l.setList(self.list)
+
+       def moveToIndex(self, idx):
+               if self.instance is not None:
+                       self.instance.moveSelectionTo(idx)
+
+       def pageUp(self):
+               if self.instance is not None:
+                       self.instance.moveSelection(self.instance.pageUp)
+
+       def pageDown(self):
+               if self.instance is not None:
+                       self.instance.moveSelection(self.instance.pageDown)
+
+       def up(self):
+               if self.instance is not None:
+                       self.instance.moveSelection(self.instance.moveUp)
+
+       def down(self):
+               if self.instance is not None:
+                       self.instance.moveSelection(self.instance.moveDown)
+
+       def selectionEnabled(self, enabled):
+               if self.instance is not None:
+                       self.instance.setSelectionEnable(enabled)
+
+class FactoryTest(Screen):
+       skin = """
+               <screen position="120,125" size="440,400" title="Test Menu" >
+                       <widget name="testlist" position="10,0" size="340,350" />
+                       <widget name="resultlist" position="370,0" size="60,350" />
+                       <widget name="testdate" position="20,350" size="150,25" font="Regular;22" />
+                       <widget name="testversion" position="20,375" size="150,25" font="Regular;22" />
+                       <widget name="mactext" position="180,350" size="230,25" font="Regular;22" />                    
+               </screen>"""
+       def __init__(self, session):
+
+               self["actions"] = NumberActionMap(["OkCancelActions","WizardActions","NumberActions","ColorActions",],
+               {
+                       "left": self.nothing,
+                       "right":self.nothing,
+                       "ok": self.TestAction,
+                       "testexit": self.keyCancel,
+                       "agingstart": self.Agingmode,
+                       "up": self.keyup,
+                       "down": self.keydown,
+                       "0": self.numberaction,
+                       "1": self.numberaction, 
+                       "2": self.numberaction,                 
+                       "3": self.numberaction,                 
+                       "4": self.numberaction,                 
+                       "5": self.numberaction,                 
+                       "6": self.numberaction,                 
+                       "7": self.numberaction,                 
+                       "8": self.numberaction,                 
+                       "9": self.numberaction,                 
+                       "red": self.shutdownaction,
+               }, -2)
+
+               Screen.__init__(self, session)
+               TESTPROGRAM_DATE = "2011-05-16"
+               TESTPROGRAM_VERSION = "Version 01.10"
+
+               self.model = 0
+               self.getModelInfo()
+               
+               self["testdate"]=Label((TESTPROGRAM_DATE))
+               self["testversion"]=Label(("Loading version..."))
+               self["mactext"]=Label(("Loading mac address..."))
+               if self.model == 0 or self.model == 1:
+                       nimConfig = nimmanager.getNimConfig(0)
+                       nimConfig.configMode.slot_id=0
+                       nimConfig.configMode.value= "simple"
+                       nimConfig.diseqcMode.value="diseqc_a_b"
+                       nimConfig.diseqcA.value="160"
+                       nimConfig.diseqcB.value="100"
+               if self.model == 0:
+                       nimConfig = nimmanager.getNimConfig(1)
+                       nimConfig.configMode.slot_id=1          
+                       nimConfig.configMode.value= "simple"
+                       nimConfig.diseqcMode.value="diseqc_a_b"
+                       nimConfig.diseqcA.value="130"
+                       nimConfig.diseqcB.value="192"
+               if self.model == 2:
+                       pass
+               if self.model == 3 or self.model == 4:
+                       self.NimType = {}
+                       sat_list = ["160","100","130","192","620","642"]
+                       try:
+                               nimfile = open("/proc/bus/nim_sockets")
+                       except IOError:
+                               nimfile = None
+                       if nimfile is None:
+                               self.session.openWithCallback(self.close, MessageBox, _("File not Found!\n/proc/bus/nim_sockets"), MessageBox.TYPE_ERROR)
+                       for line in nimfile.readlines():
+                               print line
+                               if line == "":
+                                       break
+                               if line.strip().startswith("NIM Socket"):
+                                       parts = line.strip().split(" ")
+                                       current_slot = int(parts[2][:-1])
+                                       self.NimType[current_slot]={}
+                                       self.NimType[current_slot]["slot"] = current_slot
+                               elif line.strip().startswith("Type:"):
+                                       print str(line.strip())
+                                       self.NimType[current_slot]["type"] = str(line.strip()[6:])
+                                       if self.NimType[current_slot]["type"].startswith("DVB-S"):
+                                               self.NimType[current_slot]["sat1"] = sat_list.pop(0)
+                                               self.NimType[current_slot]["sat2"] = sat_list.pop(0)
+                                       else:
+                                               self.NimType[current_slot]["sat1"] = None
+                                               self.NimType[current_slot]["sat2"] = None
+                               elif line.strip().startswith("empty"):
+                                       self.NimType.pop(current_slot)  
+                       nimfile.close()
+                       if True:
+                               for (key, val) in self.NimType.items():
+                                       print key
+                                       print val
+                                       if val["type"].startswith("DVB-S"):
+                                               print "nimConfig (dvb-s): ",key
+                                               nimConfig = nimmanager.getNimConfig(key)
+                                               nimConfig.configMode.slot_id=key
+                                               nimConfig.configMode.value= "simple"
+                                               nimConfig.diseqcMode.value="diseqc_a_b"
+                                               nimConfig.diseqcA.value = val["sat1"]
+                                               nimConfig.diseqcB.value = val["sat2"]
+                                       else :
+                                               nimConfig = nimmanager.getNimConfig(key)
+                                               print "configMode check : ",nimConfig.configMode.value
+                       
+               nimmanager.sec.update()
+               
+               system("cp /usr/lib/enigma2/python/Plugins/SystemPlugins/FactoryTest/testdb /etc/enigma2/lamedb")
+               db = eDVBDB.getInstance()
+               db.reloadServicelist()
+               self.createConfig()
+               
+               self.rlist = []
+               for x in range(self.menulength):
+                       self.rlist.append((".."))
+               self["resultlist"] = TestResultList(self.rlist)
+
+               self.avswitch = AVSwitch()
+               self.scTest= eSctest()
+               
+               self.testing = 0
+
+               self.servicelist = ServiceList()
+               self.oldref = session.nav.getCurrentlyPlayingServiceReference()
+               print "oldref",self.oldref
+               session.nav.stopService() # try to disable foreground service
+               
+               self.tunemsgtimer = eTimer()
+               self.tunemsgtimer.callback.append(self.tunemsg)
+
+               self.camstep = 1
+               self.camtimer = eTimer()
+               self.camtimer.callback.append(self.cam_state)
+               self.mactry = 1
+               self.getmacaddr()
+               self.getversion()
+               
+               self.tunerlock = 0
+               self.tuningtimer = eTimer()
+               self.tuningtimer.callback.append(self.updateStatus)
+
+               self.satatry = 8
+               self.satatimer = eTimer()
+               self.satatimer.callback.append(self.sataCheck)
+
+               self.usbtimer = eTimer()
+               self.usbtimer.callback.append(self.usbCheck)
+
+               self.agingtimer = eTimer()
+               self.agingtimer.callback.append(self.agingCheck)
+               self.setSourceVar()
+
+       def createConfig(self):
+               tlist = []
+               self.satetestIndex = -1
+               self.scarttestIndex = -1
+               if self.model == 0:
+                       self.satetestIndex=0
+                       tlist.append((" 0. Sata & extend hdd test",self.satetestIndex))
+                       self.usbtestIndex=1
+                       tlist.append((" 1. USB test",self.usbtestIndex))
+                       self.fronttestIndex=2
+                       tlist.append((" 2. Front test",self.fronttestIndex))
+                       self.smarttestIndex=3
+                       tlist.append((" 3. Smartcard test",self.smarttestIndex))
+                       self.tuner1_1testIndex=4
+                       tlist.append((" 4. T1 H 22K x 4:3 CVBS",self.tuner1_1testIndex))
+                       self.tuner1_2testIndex=5
+                       tlist.append((" 5. T1 V 22k o 16:9 RGB",self.tuner1_2testIndex))
+                       self.tuner2_1testIndex=6
+                       tlist.append((" 6. T2 H 22k x 4:3 YC",self.tuner2_1testIndex))
+                       self.tuner2_2testIndex=7
+                       tlist.append((" 7. T2 V 22k o 16:9 CVBS CAM",self.tuner2_2testIndex))
+                       self.scarttestIndex=8
+                       tlist.append((" 8. VCR Scart loop",self.scarttestIndex))
+                       self.rs232testIndex=9
+                       tlist.append((" 9. RS232 test",self.rs232testIndex))
+                       self.ethernettestIndex=10
+                       tlist.append(("10. Ethernet & mac test",self.ethernettestIndex))
+                       self.fdefaultIndex=11
+                       tlist.append(("11. Factory default",self.fdefaultIndex))
+                       self.shutdownIndex=12
+                       tlist.append(("12. Shutdown",self.shutdownIndex))
+                       self.tuner_test_first_index = 4
+                       self.tuner_test_last_index = 7
+                       
+               elif self.model == 1:
+                       self.usbtestIndex=0
+                       tlist.append((" 0. USB test",self.usbtestIndex))
+                       self.fronttestIndex=1
+                       tlist.append((" 1. Front test",self.fronttestIndex))
+                       self.smarttestIndex=2
+                       tlist.append((" 2. Smartcard test",self.smarttestIndex))
+                       self.tuner1_1testIndex=3
+                       tlist.append((" 3. T1 H 22K x 4:3 CVBS",self.tuner1_1testIndex))
+                       self.tuner2_2testIndex = self.tuner1_2testIndex=4
+                       tlist.append((" 4. T1 V 22k o 16:9 RGB CAM",self.tuner1_2testIndex))
+                       self.rs232testIndex=5
+                       tlist.append((" 5. RS232 test",self.rs232testIndex))
+                       self.ethernettestIndex=6
+                       tlist.append((" 6. Ethernet & mac test",self.ethernettestIndex))
+                       self.fdefaultIndex=7
+                       tlist.append((" 7. Factory default",self.fdefaultIndex))
+                       self.shutdownIndex=8
+                       tlist.append((" 8. Shutdown",self.shutdownIndex))
+                       self.tuner_test_first_index = 3
+                       self.tuner_test_last_index = 4
+
+               elif self.model == 2:
+                       self.satetestIndex=0
+                       tlist.append((" 0. Sata & extend hdd test",self.satetestIndex))
+                       self.usbtestIndex=1
+                       tlist.append((" 1. USB test",self.usbtestIndex))
+                       self.fronttestIndex=2
+                       tlist.append((" 2. Front test",self.fronttestIndex))
+                       self.smarttestIndex=3
+                       tlist.append((" 3. Smartcard test",self.smarttestIndex))
+                       self.tuner1_1testIndex=4
+                       tlist.append((" 4. T1 H 22K x 4:3 CVBS",self.tuner1_1testIndex))
+                       self.tuner1_2testIndex=5
+                       tlist.append((" 5. T1 V 22k o 16:9 RGB",self.tuner1_2testIndex))
+                       self.tuner2_1testIndex = -1
+                       self.tuner2_2testIndex=6
+                       tlist.append((" 6. T2 DVB-C 4:3 YC CAM",self.tuner2_2testIndex))
+                       self.rs232testIndex=7
+                       tlist.append((" 7. RS232 test",self.rs232testIndex))
+                       self.ethernettestIndex=8
+                       tlist.append(("8. Ethernet & mac test",self.ethernettestIndex))
+                       self.fdefaultIndex=9
+                       tlist.append(("9. Factory default",self.fdefaultIndex))
+                       self.shutdownIndex=10
+                       tlist.append(("10. Shutdown",self.shutdownIndex))
+                       self.tuner_test_first_index = 4
+                       self.tuner_test_last_index = 6
+
+               elif self.model == 3 or self.model == 4:
+                       self.satetestIndex=0
+                       tlist.append((" 0. Sata & extend hdd test",self.satetestIndex))
+                       self.usbtestIndex=1
+                       tlist.append((" 1. USB test",self.usbtestIndex))
+                       self.fronttestIndex=2
+                       tlist.append((" 2. Front test",self.fronttestIndex))
+                       self.smarttestIndex=3
+                       tlist.append((" 3. Smartcard test",self.smarttestIndex))
+                       self.tuner_test_first_index = current_index = 4
+                       AspectRatio=["4:3", "16:9"]
+                       ColorFormat=["CVBS","RGB","YC","CVBS","CVBS","CVBS","CVBS","CVBS"]      
+                       self.tuneInfo={}
+                       for (key, val) in self.NimType.items():
+                               if val["type"].startswith("DVB-S"):
+# Chang : DVB -S setting diseqc A
+                                       getRatio = AspectRatio.pop(0) # ratio
+                                       AspectRatio.append(getRatio)
+                                       getColorFormat=ColorFormat.pop(0) # colorFormat
+                                       menuname=" %d. T%d %s H 22k 0 %s %s" % (current_index, key+1, val["type"], getRatio, getColorFormat)    #menuname
+                                       print current_index
+#                                              current_index=4
+                                       self.setTuneInfo(index=current_index, slot=key, type=val["type"], sat=val["sat1"], pol="H", tone=True, ratio=getRatio, color=getColorFormat, cam=False) # setTuneInfo
+#                                              self.setTuneInfo(current_index, key, val["type"], val["sat1"], "H", True, getRatio, getColorFormat, False) # setTuneInfo
+                                       tlist.append((menuname,current_index))
+                                       current_index+=1
+# Chang : DVB -S setting diseqc B
+                                       getRatio = AspectRatio.pop(0)
+                                       AspectRatio.append(getRatio)
+                                       getColorFormat=ColorFormat.pop(0)
+                                       menuname=" %d. T%d %s V 22k x %s %s" % (current_index, key+1, val["type"], getRatio, getColorFormat)
+                                       if len(self.NimType) == key+1: # CAM test on/off
+                                               menuname+=" CAM"
+                                               camtest = True
+                                       else:
+                                               camtest = False
+                                       self.setTuneInfo( index=current_index, slot=key, type=val["type"], sat=val["sat2"], pol="V", tone=False, ratio=getRatio, color=getColorFormat, cam=camtest)
+                                       tlist.append((menuname,current_index))
+                                       current_index+=1
+# Chang : DVB -T or DVB-C
+                               elif val["type"].startswith("DVB-T") or val["type"].startswith("DVB-C"):
+                                       additionalMenu = None
+                                       menulen = 1
+                                       if len(self.NimType) == 1:
+                                               additionalMenu = True
+                                               menulen +=1
+                                       for x in range(menulen):
+                                               getRatio = AspectRatio.pop(0)
+                                               AspectRatio.append(getRatio)
+                                               getColorFormat=ColorFormat.pop(0)
+                                               menuname=" %d. T%d %s %s %s" % (current_index, key+1, val["type"], getRatio, getColorFormat)
+                                               if len(self.NimType) == key+1 and (additionalMenu is None or x != 0): # CAM test on/off
+                                                       menuname+=" CAM"
+                                                       camtest = True
+                                               else:
+                                                       camtest = False
+                                               self.setTuneInfo( index=current_index, slot=key, type=val["type"], sat=None, pol=None, tone=None, ratio=getRatio, color=getColorFormat, cam=camtest)
+                                               tlist.append((menuname,current_index))
+                                               current_index+=1
+                       self.tuner_test_last_index = current_index-1
+                       self.rs232testIndex=current_index
+                       tlist.append((" %d. RS232 test" % current_index,self.rs232testIndex))
+                       current_index+=1
+                       self.ethernettestIndex=current_index
+                       tlist.append((" %d. Ethernet & mac test" % current_index,self.ethernettestIndex))
+                       current_index+=1
+                       self.fdefaultIndex=current_index
+                       tlist.append((" %d. Factory default" % current_index,self.fdefaultIndex))
+                       current_index+=1
+                       self.shutdownIndex=current_index
+                       tlist.append((" %d. Shutdown" % current_index,self.shutdownIndex))
+                       
+               self.menulength= len(tlist)
+               self["testlist"] = MenuList(tlist)
+       
+       def setTuneInfo(self,index=0,slot=0,type="DVB-S2",sat="160",pol="H",tone=True,ratio="4:3",color="CVBS",cam=False):
+               self.tuneInfo[index]={}
+               self.tuneInfo[index]["slot"]=slot
+               self.tuneInfo[index]["type"]=type
+               self.tuneInfo[index]["sat"]=sat
+               self.tuneInfo[index]["pol"]=pol
+               self.tuneInfo[index]["22k"]=tone
+               self.tuneInfo[index]["ratio"]=ratio
+               self.tuneInfo[index]["color"]=color
+               self.tuneInfo[index]["cam"]=cam
+
+       def getModelInfo(self):
+               getmodel = 0
+               if fileExists("/proc/stb/info/vumodel"):
+                       info = open("/proc/stb/info/vumodel").read().strip()
+                       if info == "duo":
+                               self.model = 0
+                               getmodel = 1
+                               print "getModelInfo : duo"
+                       if info == "solo":
+                               self.model = 1
+                               getmodel = 1
+                               print "getModelInfo : solo"
+                       if info == "combo":
+                               self.model = 2
+                               getmodel = 1
+                               print "getModelInfo : combo"
+                       if info == "uno":
+                               self.model = 3
+                               getmodel = 1
+                               print "getModelInfo : uno"
+                       if info == "ultimo":
+                               self.model = 4
+                               getmodel = 1
+                               print "getModelInfo : ultimo"
+               if getmodel == 0 and fileExists("/proc/stb/info/version"):
+                       info = open("/proc/stb/info/version").read()
+                       if info[:2] == "14":
+                               self.model = 1
+                               print "getModelInfo : solo_"
+                       elif info[:2] == "12":
+                               self.model = 0
+                               print "getModelInfo : duo_"
+
+       def nothing(self):
+               print "nothing"
+
+       def keyup(self):
+               print "self.menulength = ",self.menulength
+               print "self[\"testlist\"].getCurrent()[1] = ",self["testlist"].getCurrent()[1]
+               if self.testing==1:
+                       return
+               if self["testlist"].getCurrent()[1]==0:
+                       self["testlist"].moveToIndex(self.menulength-1)
+                       self["resultlist"].moveToIndex(self.menulength-1)
+               else:
+                       self["testlist"].up()
+                       self["resultlist"].up()
+
+
+       def keydown(self):
+               print "self.menulength = ",self.menulength
+               print "self[\"testlist\"].getCurrent()[1] = ",self["testlist"].getCurrent()[1]
+               if self.testing==1:
+                       return
+               if self["testlist"].getCurrent()[1]==(self.menulength-1):
+                       self["testlist"].moveToIndex(0)
+                       self["resultlist"].moveToIndex(0)
+               else:
+                       self["testlist"].down()
+                       self["resultlist"].down()
+
+       def numberaction(self, number):
+               if self.testing==1:
+                       return
+               if number >= self.menulength:
+                       return
+               index = int(number)
+               self["testlist"].moveToIndex(index)
+               self["resultlist"].moveToIndex(index)
+
+       def getversion(self):
+               try:
+                       fd = open("/proc/stb/info/version","r")
+                       version = fd.read()
+                       self["testversion"].setText(("Version %s"%version))
+               except:
+                       self["testversion"].setText(("Version no load"))
+                       
+
+       def getmacaddr(self):
+               try:
+                       if self.model == 2 or self.model == 3 or self.model == 4:
+                               cmd = "nanddump -s 0x" + str((self.mactry-1)*2) + "0000 -b -o -l 64 -p /dev/mtd5"
+                       elif self.model == 0 or self.model == 1:
+                               cmd = "nanddump -s 0x" + str((self.mactry-1)*2) + "0000 -b -o -l 64 -p /dev/mtd4"
+                       self.macConsole = Console()     
+                       self.macConsole.ePopen(cmd, self.readmac,self.checkReadmac)     
+               except:
+                       return
+
+       def readmac(self, result, retval,extra_args=None):
+               (callback) = extra_args
+               if self.macConsole is not None:
+                       if retval == 0:
+                               self.macConsole = None
+                               macline = None
+                               content =result.splitlines()
+                               for x in content:
+                                       if x.startswith('0x000'+str((self.mactry-1)*2)+'0010:'):
+                                               macline = x.split()
+                               if macline == None:
+                                       callback(0)
+                               elif len(macline) < 10: 
+                                       callback(1)
+                               else:   
+                                       mac = macline[5]+":"+macline[6]+":"+macline[7]+":"+macline[8]+":"+macline[9]+":"+macline[10]
+                                       self["mactext"].setText(("MAC : "+mac))
+                                       callback(2)
+
+       def checkReadmac(self,data):
+               if data == 0:
+                       print "block %d is bad block" % self.mactry
+                       self.mactry = self.mactry + 1
+                       if self.mactry > 4:
+                               self.session.open(MessageBox, _("FLASH IS BROKEN"), type = MessageBox.TYPE_INFO, enable_input = False)
+                               return
+                       else:
+                               self.getmacaddr()
+               elif data == 1:
+                       print 'mac dump read error'
+                       return
+               elif data == 2:
+                       print 'mac address read ok'
+                       return
+               
+       def TestAction(self):
+               if self.testing==1:
+                       return
+               print "line - ",self["testlist"].getCurrent()[1]
+               self.currentindex = index = self["testlist"].getCurrent()[1]
+               result = 0
+               if index==self.satetestIndex:
+                       self.Test0()
+               elif index==self.fronttestIndex:
+                       self.Test1()
+               elif index>=self.tuner_test_first_index and index<=self.tuner_test_last_index:
+                       self.TestTune(index)
+               elif index==self.scarttestIndex:
+                       self.Test6()
+               elif index==self.rs232testIndex:
+                       self.Test7()
+               elif index==self.usbtestIndex:
+                       self.Test8()
+               elif index==self.ethernettestIndex:
+                       self.Test9()
+               elif index == self.smarttestIndex:
+                       self.Test10()
+#              elif index == 11:
+#                      self.Test11()
+#              elif index ==12:
+#                      self.Test12()
+#              elif index==13:
+#                      self.Test13()
+               elif index==self.fdefaultIndex:
+                       self.Test14()
+#              elif index==self.shutdownIndex:
+#                      self.Test15()
+               else:
+                       pass
+
+       def shutdownaction(self):
+               if self["testlist"].getCurrent()[1] == self.shutdownIndex:
+                       self.Test15()
+
+
+       def Test0(self):
+               self.satatry = 8
+               self.satatimer.start(100,True)
+
+       def sataCheck(self):
+#              print "try", self.satatry
+               if self.satatry == 0:
+                       displayerror = 1
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="try %d"%self.satatry
+                       self["resultlist"].updateList(self.rlist)
+                       self.satatry -= 1
+                       displayerror = 0
+               result =0
+               try:
+                       if fileExists("/autofs/sdb1"):
+                               if access("/autofs/sdb1",F_OK|R_OK|W_OK):
+                                       dummy=open("/autofs/sdb1/dummy03","w")
+                                       dummy.write("complete")
+                                       dummy.close()
+                                       dummy=open("/autofs/sdb1/dummy03","r")
+                                       if dummy.readline()=="complete":
+                                               print "/autofs/sdb1 - complete"
+                                       else:
+                                               print "/autofs/sdb1 - readline error"
+                                               result = 1
+                                               displayerror = 1
+                                       dummy.close()
+                                       system("rm /autofs/sdb1/dummy03")
+                               else:
+                                       print "/autofs/sdb1 - rw access error"
+                                       result = 1
+                                       displayerror = 1
+                       else:
+                               print "/autofs/sdb1 - file not exist"
+                               result = 1
+               except:
+                       print "/autofs/sdb1 - exceptional error"
+                       result = 1
+                       displayerror = 1
+               try:
+                       if fileExists("/media/hdd"):
+                               if access("/media/hdd",F_OK|R_OK|W_OK):
+                                       dummy=open("/media/hdd/dummy03","w")
+                                       dummy.write("complete")
+                                       dummy.close()
+                                       dummy=open("/media/hdd/dummy03","r")
+                                       if dummy.readline()=="complete":
+                                               print "/media/hdd - complete"
+                                       else:
+                                               print "/media/hdd - readline error"
+                                               result += 1
+                                               displayerror = 1
+                                       dummy.close()
+                                       system("rm /media/hdd/dummy03")
+                               else:
+                                       print "/media/hdd - rw access error"
+                                       result += 1
+                                       displayerror = 1
+                       else:
+                               print "/media/hdd - file not exist"
+                               result += 1
+               except:
+                       print "/media/hdd - exceptional error"
+                       result += 1
+                       displayerror = 1
+               
+               if result == 0:
+                       self.session.open( MessageBox, _("Sata & extend hdd test pass"), MessageBox.TYPE_INFO)
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               elif result == 1:
+                       if displayerror==1:
+                               self.session.open( MessageBox, _("One hdd test error"), MessageBox.TYPE_ERROR)
+                               self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       else:
+                               self.satatimer.start(1100,True)
+               else:
+                       if displayerror==1:
+                               self.session.open( MessageBox, _("Sata & extend hdd test error"), MessageBox.TYPE_ERROR)
+                               self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       else:
+                               self.satatimer.start(1100,True)
+
+       def Test1(self):
+               if self.model== 0:
+                       self.session.openWithCallback(self.displayresult ,FrontTest)
+               elif self.model == 1:
+                       self.session.openWithCallback(self.displayresult ,FrontTest_solo)
+               elif self.model == 2 or self.model == 3 or self.model == 4:
+                       self.session.openWithCallback(self.displayresult ,FrontTest_solo)
+
+       def displayresult(self):
+               global fronttest
+               if fronttest == 1:
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+
+       def TestTune(self,index):       
+               if self.oldref is None:
+                       eref = eServiceReference("1:0:19:1324:3EF:1:C00000:0:0:0")
+                       serviceHandler = eServiceCenter.getInstance()
+                       servicelist = serviceHandler.list(eref)
+                       if not servicelist is None:
+                               ref = servicelist.getNext()
+                       else:
+                               ref = self.getCurrentSelection() # raise error
+                               print "servicelist none"
+               else:
+                       ref = self.oldref
+               self.session.nav.stopService() # try to disable foreground service
+               if self.model == 0 or self.model == 1:
+                       if index==self.tuner1_1testIndex:
+                               ref.setData(0,1)
+                               ref.setData(1,0x6D3)
+                               ref.setData(2,0x3)
+                               ref.setData(3,0xA4)
+                               ref.setData(4,0xA00000)
+                               self.session.nav.playService(ref)
+                               self.avswitch.setColorFormat(0)
+                               self.avswitch.setAspectRatio(0)
+                       elif index==self.tuner1_2testIndex:
+                               if self.model == 1:
+                                       self.camstep = 1
+                                       self.camtimer.start(100,True)
+                               ref.setData(0,0x19)
+                               ref.setData(1,0x1325)
+                               ref.setData(2,0x3ef)
+                               ref.setData(3,0x1)
+                               ref.setData(4,0x64af79)
+                               self.session.nav.playService(ref)
+                               self.avswitch.setColorFormat(1)
+                               self.avswitch.setAspectRatio(6)                 
+                       elif index==self.tuner2_1testIndex:
+                               ref.setData(0,1)
+                               ref.setData(1,0x6D3)
+                               ref.setData(2,0x3)
+                               ref.setData(3,0xA4)
+                               ref.setData(4,0x820000)
+                               self.session.nav.playService(ref)
+                               self.avswitch.setColorFormat(2)                 
+                               self.avswitch.setAspectRatio(0)                 
+                       elif index==self.tuner2_2testIndex:
+                               self.camstep = 1
+                               self.camtimer.start(100,True)
+                               ref.setData(0,0x19)
+                               ref.setData(1,0x1325)
+                               ref.setData(2,0x3ef)
+                               ref.setData(3,0x1)
+                               ref.setData(4,0xC00000)
+                               self.session.nav.playService(ref)
+                               self.avswitch.setColorFormat(0)                 
+                               self.avswitch.setAspectRatio(6)
+                       self.tuningtimer.start(2000,True)
+                       self.tunemsgtimer.start(3000, True)
+               elif self.model == 3 or self.model == 4:
+                       getTuneInfo=self.tuneInfo[index]
+                       if getTuneInfo["cam"] is True:
+                               self.camstep = 1
+                               self.camtimer.start(100,True)
+                       if getTuneInfo["type"].startswith("DVB-S"):
+                               if getTuneInfo["pol"] == "H":
+                                       ref.setData(0,1)
+                                       ref.setData(1,0x6D3)
+                                       ref.setData(2,0x3)
+                                       ref.setData(3,0xA4)
+                               else:
+                                       ref.setData(0,0x19)
+                                       ref.setData(1,0x1325)
+                                       ref.setData(2,0x3ef)
+                                       ref.setData(3,0x1)
+                               if getTuneInfo["sat"] == "160": # Eutelsat W2
+                                       ref.setData(4,0xA00000)
+                               elif getTuneInfo["sat"] == "100": # Eutelsat
+                                       ref.setData(4,0x64af79)
+                               elif getTuneInfo["sat"] == "130": # Hotbird
+                                       ref.setData(4,0x820000)
+                               elif getTuneInfo["sat"] == "192": # Astra
+                                       ref.setData(4,0xC00000)
+                               elif getTuneInfo["sat"] == "620": # Intelsat 902
+                                       ref.setData(4,0x26c0000) # need to fix later
+                               elif getTuneInfo["sat"] == "642": # Intelsat 906
+                                       ref.setData(4,0x282AF79) # need to fix later
+                       elif getTuneInfo["type"].startswith("DVB-C"):
+                               ref.setData(0,0x19)
+                               ref.setData(1,0x1325)
+                               ref.setData(2,0x3ef)
+                               ref.setData(3,0x1)
+                               ref.setData(4,-64870) # ffff029a
+                       elif getTuneInfo["type"].startswith("DVB-T"):
+                               ref.setData(0,0x19)
+                               ref.setData(1,0x1325)
+                               ref.setData(2,0x3ef)
+                               ref.setData(3,0x1)
+                               ref.setData(4,-286391716) # eeee025c
+                       self.session.nav.playService(ref)
+                       if getTuneInfo["color"]=="CVBS":
+                               self.avswitch.setColorFormat(0)
+                       elif getTuneInfo["color"]=="RGB":
+                               self.avswitch.setColorFormat(1)
+                       elif getTuneInfo["color"]=="YC":
+                               self.avswitch.setColorFormat(2)
+                       if getTuneInfo["ratio"] == "4:3":
+                               self.avswitch.setAspectRatio(0)
+                       elif getTuneInfo["ratio"] == "16:9":
+                               self.avswitch.setAspectRatio(6)
+                       self.tuningtimer.start(2000,True)
+                       self.tunemsgtimer.start(3000, True) 
+               
+       def cam_state(self):
+               current_index = self.currentindex
+               if self.camstep == 1:
+                       slot = 0
+                       state = eDVBCI_UI.getInstance().getState(slot)
+                       print '-1-stat',state
+                       if state > 0:
+                               self.camstep=2
+                               self.camtimer.start(100,True)
+                       else:
+                               self.session.nav.stopService()
+                               self.session.open( MessageBox, _("CAM1_NOT_INSERTED\nPress exit!"), MessageBox.TYPE_ERROR)
+                               self.rlist[current_index]="fail"
+                               self.tunemsgtimer.stop()
+               elif self.camstep == 2:
+                       slot = 0
+                       appname = eDVBCI_UI.getInstance().getAppName(slot)
+                       print 'appname',appname
+                       if appname is None:
+                               self.session.nav.stopService()
+                               self.session.open( MessageBox, _("NO_GET_APPNAME\nPress exit!"), MessageBox.TYPE_ERROR)
+                               self.rlist[current_index]="fail"
+                               self.tunemsgtimer.stop()                                
+                       else:
+                               self.camstep=3
+                               self.camtimer.start(100,True)           
+               elif self.camstep==3:
+                       slot = 1
+                       state = eDVBCI_UI.getInstance().getState(slot)
+                       print '-2-stat',state
+                       if state > 0:
+                               self.camstep=4
+                               self.camtimer.start(100,True)
+                       else:
+                               self.session.nav.stopService()
+                               self.session.open( MessageBox, _("CAM2_NOT_INSERTED\nPress exit!"), MessageBox.TYPE_ERROR)
+                               self.rlist[current_index]="fail"
+                               self.tunemsgtimer.stop()                                
+               elif self.camstep == 4:
+                       slot = 1
+                       appname = eDVBCI_UI.getInstance().getAppName(slot)
+                       print 'appname',appname
+                       if appname is None:
+                               self.session.nav.stopService()
+                               self.session.open( MessageBox, _("NO_GET_APPNAME\nPress exit!"), MessageBox.TYPE_ERROR)
+                               self.rlist[current_index]="fail"
+                               self.tunemsgtimer.stop()                                
+                       else:
+                               self.setSource()
+                               self.camstep = 5
+
+       def updateStatus(self):
+               current_index = self.currentindex
+               if self.model == 0 or self.model == 1:
+                       if current_index ==self.tuner1_1testIndex or current_index==self.tuner1_2testIndex:
+                               tunno = 1
+                               result = eSctest.getInstance().getFrontendstatus(0)
+                       else:
+                               tunno = 2
+                               result = eSctest.getInstance().getFrontendstatus(1)
+                       if current_index == self.tuner1_2testIndex or current_index==self.tuner2_2testIndex:
+                               hv = "Ver"
+                       else:
+                               hv = "Hor"
+
+               elif self.model == 3 or self.model == 4:
+                       getTuneInfo=self.tuneInfo[current_index]
+                       result = eSctest.getInstance().getFrontendstatus(getTuneInfo["slot"])
+                       tunno = getTuneInfo["slot"]+1
+                       hv = getTuneInfo["pol"]
+                       if hv == "H":
+                               hv = "Hor"
+                       elif hv == "V":
+                               hv = "Ver"
+                       else :
+                               hv == ""
+                               
+               print "eSctest.getInstance().getFrontendstatus - %d"%result
+               if result == 0:
+                       self.tunerlock = 0
+                       self.tunemsgtimer.stop()
+                       self.session.nav.stopService()
+                       self.avswitch.setColorFormat(0)
+                       self.session.open( MessageBox, _("Tune%d %s Locking Fail..."%(tunno,hv)), MessageBox.TYPE_ERROR)
+                       self.rlist[current_index]="fail"
+               else : 
+                       self.tunerlock = 1
+
+       def tuneback(self,yesno):
+               current_index=self.currentindex
+               self.session.nav.stopService() # try to disable foreground service
+               if yesno and self.tunerlock == 1:
+                       if current_index == self.tuner_test_last_index and self.camstep < 5: # need fix to depending about CAM exist
+                               self.rlist[current_index]="fail"
+                       else :
+                               self.rlist[current_index]="pass"
+               else:
+                       self.rlist[current_index]="fail"
+               if self.model == 0 and current_index == 6: # YC
+                       self.avswitch.setColorFormat(0)
+               elif ( self.model == 3 or self.model == 4 ) and self.tuneInfo[current_index]["color"] == "YC":
+                       self.avswitch.setColorFormat(0)
+               self.resetSource()
+               self["resultlist"].updateList(self.rlist)
+
+       def tunemsg(self):
+               self.tuningtimer.stop()
+               self.session.openWithCallback(self.tuneback, MessageBox, _("%s ok?" %(self["testlist"].getCurrent()[0])), MessageBox.TYPE_YESNO)
+
+       def setSourceVar(self):
+               if self.model == 0:
+                       self.input_pad_num=1
+                       self.setTuner = 'B'
+               elif self.model == 1:
+                       self.input_pad_num=0
+                       self.setTuner = 'A'
+               else:
+                       self.input_pad_num=len(self.NimType)-1
+                       if self.input_pad_num == 0:
+                               self.setTuner = 'A'
+                       elif self.input_pad_num == 1:
+                               self.setTuner = 'B'
+                       elif self.input_pad_num == 2:
+                               self.setTuner = 'C'
+
+#      ikseong - for 22000 tp
+       def setSource(self):
+# fix input source
+               inputname = ("/proc/stb/tsmux/input%d" % self.input_pad_num)
+               print "<setsource> inputname : ",inputname
+               fd=open(inputname,"w")
+               fd.write("CI0")
+               fd.close()
+# fix ci_input Tuner
+               filename = ("/proc/stb/tsmux/ci0_input")
+               fd = open(filename,'w')
+               fd.write(self.setTuner)
+               print "setTuner(CI0) : ",self.setTuner
+               fd.close()
+               print "CI loop test!!!!!!!!!!!!!!"
+                       
+       def resetSource(self):
+               inputname = ("/proc/stb/tsmux/input%d" % self.input_pad_num)
+               print "<resetsource> inputname : ",inputname
+               fd=open(inputname,"w")
+               fd.write(self.setTuner)
+               fd.close()
+               print "CI loop test end!!!!!!!!!!!!!!"
+                               
+       def Test6(self):
+               self.avswitch.setInput("SCART")
+               sleep(2)
+               self.session.openWithCallback(self.check6, MessageBox, _("Scart loop ok?"), MessageBox.TYPE_YESNO)
+
+       def check6(self,yesno):
+               if yesno:
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+               self.avswitch.setInput("ENCODER")
+
+       def check7(self):
+               global rstest
+               if rstest == 1:
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+
+       def Test7(self):
+               self.session.openWithCallback(self.check7,RS232Test)
+
+       def Agingmode(self):
+               if self.testing==1:
+                       return
+               if self.oldref is None:
+                       eref = eServiceReference("1:0:19:1324:3EF:1:C00000:0:0:0")
+                       serviceHandler = eServiceCenter.getInstance()
+                       servicelist = serviceHandler.list(eref)
+                       if not servicelist is None:
+                               ref = servicelist.getNext()
+                       else:
+                               ref = self.getCurrentSelection()
+                               print "servicelist none"
+               else:
+                       ref = self.oldref
+               self.session.nav.stopService() # try to disable foreground service
+               if self.model == 0 or self.model == 1 or self.NimType[0]["type"].startswith("DVB-S"):
+                       ref.setData(0,0x19)
+                       ref.setData(1,0x1325)
+                       ref.setData(2,0x3ef)
+                       ref.setData(3,0x1)
+                       ref.setData(4,0x64af79)
+               elif self.NimType[0]["type"].startswith("DVB-C"):
+                       ref.setData(0,0x19)
+                       ref.setData(1,0x1325)
+                       ref.setData(2,0x3ef)
+                       ref.setData(3,0x1)
+                       ref.setData(4,-64870) # ffff029a
+               elif self.NimType[0]["type"].startswith("DVB-T"):
+                       ref.setData(0,0x19)
+                       ref.setData(1,0x1325)
+                       ref.setData(2,0x3ef)
+                       ref.setData(3,0x1)
+                       ref.setData(4,-286391716) # eeee025c
+               self.session.nav.playService(ref)
+               self.avswitch.setColorFormat(0)
+               self.avswitch.setAspectRatio(0)
+               self.agingtimer.start(2000,True)
+
+       def agingCheck(self):
+               result = eSctest.getInstance().getFrontendstatus(0)             
+               hv = "Ver"      
+               print "eSctest.getInstance().getFrontendstatus - %d"%result
+               if result == 0:
+                       self.session.nav.stopService()
+                       self.session.open( MessageBox, _("Tune 1 Ver Locking Fail..."), MessageBox.TYPE_ERROR)
+               elif result == 1 :
+                       self.session.openWithCallback(self.agingResult,AgingTest)
+               else:
+                       self.session.nav.stopService()
+                       self.session.open( MessageBox, _("Tune 1 Ver Error %d..."%result), MessageBox.TYPE_ERROR)
+
+       def agingResult(self):
+               global Agingresult
+               if(Agingresult ==1):
+                       self["testlist"].moveToIndex(self.fdefaultIndex)
+                       self.Test14()
+                       self["testlist"].moveToIndex(self.shutdownIndex)        
+       
+       def Test8(self):
+               self.usbtry = 9
+               self.usbtimer.start(100,True)
+
+       def usbCheck(self):
+               if self.usbtry == 0:
+                       displayerror = 1
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="try %d"%self.usbtry
+                       self["resultlist"].updateList(self.rlist)
+                       self.usbtry -= 1
+                       displayerror = 0
+
+               if self.model==0 or self.model==3 or self.model==4:
+                       devices = [ "/autofs/sdc1", "/autofs/sdd1", "/autofs/sde1" ]
+               elif self.model==1:
+                       devices = [ "/autofs/sda1", "/autofs/sdb1" ]
+               elif self.model==2:
+                       devices = [ "/autofs/sdc1", "/autofs/sdd1" ]
+               else :
+                       self.session.open( MessageBox, _("invalid model"), MessageBox.TYPE_ERROR)                       
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       return
+
+               result=len(devices)
+               
+               for dev in devices:
+                       try:
+                               if fileExists(dev):
+                                       if access(dev,F_OK|R_OK|W_OK):
+                                               dummy=open(dev+"/dummy03","w")
+                                               dummy.write("complete")
+                                               dummy.close()
+                                               dummy=open(dev+"/dummy03","r")
+                                               if dummy.readline()=="complete":
+                                                       print dev," - complete"
+                                               else:
+                                                       print dev," - readline error"
+                                                       result=result -1
+                                                       displayerror = 1
+                                               dummy.close()
+                                               system("rm "+dev+"/dummy03")
+                                       else:
+                                               print dev," - rw access error"
+                                               result=result -1
+                                               displayerror = 1
+                               else:
+                                       print dev," - file not exist"
+                                       result=result-1
+                       except:
+                               print dev," - exceptional error"
+                               result=result -1
+                               displayerror = 1
+       
+               if result < 0 :
+                       result = 0
+               elif result == len(devices):
+                       self.session.open( MessageBox, _("USB test pass %d devices\nPress OK!"%result), MessageBox.TYPE_INFO)                   
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       if displayerror == 1:
+                               self.session.open( MessageBox, _("USB test error : Success-%d"%result+" Fail-%d\nPress EXIT!"%(len(devices)-result)), MessageBox.TYPE_ERROR)
+                               self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       else:
+                               self.usbtimer.start(1100,True)
+
+       def pingtest(self):
+               self.testing = 1
+#              system("/etc/init.d/networking stop")
+               system("ifconfig eth0 192.168.0.10")
+#              system("/etc/init.d/networking start")
+               cmd1 = "ping -c 1 192.168.0.100"
+               self.PingConsole = Console()
+               self.PingConsole.ePopen(cmd1, self.checkNetworkStateFinished,self.NetworkStatedataAvail)
+               
+       def checkNetworkStateFinished(self, result, retval,extra_args):
+               (statecallback) = extra_args
+               if self.PingConsole is not None:
+                       if retval == 0:
+                               self.PingConsole = None
+                               content = result.splitlines()
+#                              print 'content',content
+                               x = content[4].split()
+#                              print 'x',x
+                               if x[0]==x[3]:
+                                       statecallback(1)
+                               else:
+                                       statecallback(0)                                        
+                       else:
+                               statecallback(0)
+
+
+       def NetworkStatedataAvail(self,data):
+               global ethtest
+               if data == 1:
+                       ethtest = 1
+                       print "success"
+                       self.session.openWithCallback(self.openMacConfig ,MessageBox, _("Ping test pass"), MessageBox.TYPE_INFO,2)
+               
+               else:
+                       ethtest = 0
+                       print "fail"
+                       self.session.open( MessageBox, _("Ping test fail\nPress exit"), MessageBox.TYPE_ERROR)
+                       self.macresult()
+
+       def Test9(self):
+               self.pingtest()
+
+       def openMacConfig(self, ret=False):
+               self.session.openWithCallback(self.macresult ,MacConfig,mactry=self.mactry)     
+                       
+       def macresult(self):
+               global ethtest
+               if ethtest == 1:
+                       self.rlist[self.ethernettestIndex]="pass"               
+               else:
+                       self.rlist[self.ethernettestIndex]="fail"               
+               self.getmacaddr()
+               self.testing = 0                        
+       
+       def MemTest(self, which):
+               index = which
+               result = 0
+               if index==0:
+                       result = eMemtest.getInstance().dramtest()
+               elif index==1:
+                       result = eMemtest.getInstance().flashtest()
+                       result = 0      #       temp
+               else:
+                       result = eMemtest.getInstance().dramtest()
+                       result = eMemtest.getInstance().flashtest()
+                       result = 0      #       temp
+                       
+               index = index+10
+               
+               if result == 0:
+                       print index,self.rlist[index]
+                       self.rlist[index]="pass"
+               else:
+                       print index,self.rlist[index]
+                       self.rlist[index]="fail"
+               self["resultlist"].updateList(self.rlist)
+                       
+       def scciresult(self):
+               global smartcardtest
+               if smartcardtest == 1:
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+
+       def Test10(self):
+               self.session.openWithCallback(self.scciresult ,SmartCardTest,stbmodel=self.model)
+
+       def Test11(self):
+               self.MemTest(1)
+               
+       def Test12(self):
+               self.MemTest(2)
+
+       def Test13(self):
+               self.MemTest(3) 
+
+
+       def Test14(self):
+               try:
+                       print "test14"
+                       system("rm -R /etc/enigma2")
+                       system("ls /")
+                       system("cp -R /usr/share/enigma2/defaults /etc/enigma2")
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+                       self["resultlist"].updateList(self.rlist)
+               except:
+                       print "test14 except"
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       self["resultlist"].updateList(self.rlist)
+                       self.session.open( MessageBox, _("Factory reset fail"), MessageBox.TYPE_ERROR)
+
+       def Test15(self):
+               self.session.openWithCallback(self.shutdown ,MessageBox, _("Do you want to shut down?"), MessageBox.TYPE_YESNO)
+
+       def shutdown(self, yesno):
+               if yesno :
+                       from os import _exit
+                       system("/usr/bin/showiframe /boot/backdrop.mvi")
+                       _exit(1)
+               else:
+                       return
+               
+       def keyCancel(self):
+               if self.testing==1:
+                       return
+               print "exit"
+               self.close()
+#              if self.oldref is not None:
+#                      self.session.nav.playService(self.oldref)
+
+ethtest = 0
+class MacConfig(Screen):
+       skin = """
+               <screen position="100,250" size="520,100" title="Mac Config" >
+                       <eLabel text="Mac Address " position="10,15" size="200,40" font="Regular;30" />         
+                       <widget name="text" position="230,15" size="230,40" font="Regular;30" />
+                       <widget name="text1" position="470,15" size="40,40" font="Regular;30" />                
+                       <eLabel text=" " position="5,55" zPosition="-1" size="510,5" backgroundColor="#02e1e8e6" />             
+                       <widget name="stattext" position="30,75" size="400,25" font="Regular;20" />
+               </screen>"""
+
+       def __init__(self, session, mactry = 1):
+               self["actions"] = ActionMap(["DirectionActions","OkCancelActions"],
+               {
+                       "ok": self.keyOk,
+                       "left": self.keyleft,
+                       "right": self.keyright,
+                       "cancel": self.keyCancel,
+               }, -2)
+
+               Screen.__init__(self, session)
+
+               self.mactry = mactry
+               self.model = 0
+               self.getModelInfo()
+               self.macfd = 0
+               self.macaddr = "000000000000"
+               self.ReadMacinfo = 0
+               self["text"]=Label((self.macaddr))
+               self["text1"]= Label(("< >"))
+               self["stattext"]= Label((""))
+               self.displaymac()
+               self.loadmacaddr()
+               self.getmacaddr()
+               global ethtest
+               ethtest = 1
+
+       def getModelInfo(self):
+               getmodel = 0
+               if fileExists("/proc/stb/info/vumodel"):
+                       info = open("/proc/stb/info/vumodel").read().strip()
+                       if info == "combo":
+                               self.model = 2
+                               getmodel = 1
+                               print "MacConfig, model : combo"
+                       elif info == "solo":
+                               self.model = 1
+                               getmodel = 1
+                               print "MacConfig, model : solo"
+                       elif info == "duo":
+                               self.model = 0
+                               getmodel = 1
+                               print "MacConfig, model : duo"
+                       elif info == "uno":
+                               self.model = 3
+                               getmodel = 1
+                               print "getModelInfo : uno"
+                       elif info == "ultimo":
+                               self.model = 4
+                               getmodel = 1
+                               print "getModelInfo : ultimo"
+
+
+               if getmodel == 0 and fileExists("/proc/stb/info/version"):
+                       info = open("/proc/stb/info/version").read()
+#                      print info,info[:2]
+                       if info[:2] == "14":
+                               self.model = 1
+                               print "MacConfig, model : solo_"
+                       elif info[:2] == "12":
+                               self.model = 0
+                               print "MacConfig, model: duo_"
+
+       def loadmacaddr(self):
+               try:
+                       self.macfd = 0
+
+                       if self.model==0 or self.model==3 or self.model==4 :
+                               devices = ["/autofs/sdb1", "/autofs/sdc1", "/autofs/sdd1", "/autofs/sde1" ]
+                       elif self.model==1:
+                               devices = [ "/autofs/sda1", "/autofs/sdb1" ]
+                       elif self.model==2:
+                               devices = [ "/autofs/sdb1", "/autofs/sdc1", "/autofs/sdd1" ]
+
+                       for dev in devices:
+                               print 'try..',dev
+                               if  fileExists(dev+"/macinfo.txt"):
+                                       print "<open>"+dev+"/macinfo.txt"
+                                       self.macfd = open(dev+"/macinfo.txt","r+")
+                                       break
+
+                       if self.macfd == 0:
+                               self["text"].setText(("cannot read usb!!"))
+                               self["text1"].setText((" "))
+                               self["stattext"].setText((" Press Exit Key."))
+                               self.ReadMacinfo=0
+                               return
+                       
+                       macaddr=self.macfd.readline().split(":")
+                       self.macaddr=macaddr[1]+macaddr[2]+macaddr[3]+macaddr[4]+macaddr[5]+macaddr[6]
+                       self.displaymac()
+                       self.ReadMacinfo = 1
+               except:
+                       self["text"].setText(("cannot read usb!!"))
+                       self["text1"].setText((" "))
+                       self["stattext"].setText((" Press Exit Key."))
+                       self.ReadMacinfo=0
+       
+       def getmacaddr(self):
+               if self.ReadMacinfo==0:
+                       return
+               try:
+                       if self.model == 2 or self.model == 3 or self.model == 4:
+                               cmd = "nanddump -s 0x" + str((self.mactry-1)*2) + "0000 -b -o -l 64 -p /dev/mtd5"
+                       elif self.model == 0 or self.model == 1:
+                               cmd = "nanddump -s 0x" + str((self.mactry-1)*2) + "0000 -b -o -l 64 -p /dev/mtd4"
+                       self.macConsole = Console()     
+                       self.macConsole.ePopen(cmd, self.readmac,self.checkReadmac)
+               except:
+                       return
+
+       def readmac(self, result, retval,extra_args=None):
+               (callback) = extra_args
+               if self.macConsole is not None:
+                       if retval == 0:
+                               self.macConsole = None
+                               macline = None
+                               content =result.splitlines()
+                               for x in content:
+                                       if x.startswith('0x000'+str((self.mactry-1)*2)+'0010:'):
+                                               macline = x.split()
+                               if macline == None:
+                                       callback(0)
+                               elif len(macline) < 10: 
+                                       callback(1)
+                               else:   
+                                       mac = macline[5]+":"+macline[6]+":"+macline[7]+":"+macline[8]+":"+macline[9]+":"+macline[10]
+                                       self["stattext"].setText(("now : "+mac))
+                                       callback(2)
+
+       def checkReadmac(self,data):
+               if data == 0:
+                       print "block %d is bad block" % self.mactry
+                       self.mactry = self.mactry + 1
+                       if self.mactry > 4:
+                               self.session.open(MessageBox, _("FLASH IS BROKEN"), type = MessageBox.TYPE_INFO, enable_input = False)
+                               return
+                       else:
+                               self.getmacaddr()
+               elif data == 1:
+                       print 'mac dump read error'
+                       return
+               elif data == 2:
+                       print 'mac address read ok'
+                       return
+
+                       
+       def keyleft(self):
+               if self.ReadMacinfo==0 :
+                       return
+               macaddress = long(self.macaddr,16)-1
+               if macaddress < 0 :
+                       macaddress = 0xffffffffffff
+               self.macaddr = "%012x"%macaddress
+               self.displaymac()
+
+       def keyright(self):
+               if self.ReadMacinfo==0 :
+                       return
+               macaddress = long(self.macaddr,16)+1
+               if macaddress > 0xffffffffffff:
+                       macaddress = 0
+               self.macaddr = "%012x"%macaddress
+               self.displaymac()
+
+       def displaymac(self):
+               macaddr= self.macaddr
+               self["text"].setText(("%02x:%02x:%02x:%02x:%02x:%02x"%(int(macaddr[0:2],16),int(macaddr[2:4],16),int(macaddr[4:6],16),int(macaddr[6:8],16),int(macaddr[8:10],16),int(macaddr[10:12],16))))
+
+       def keyOk(self):
+               if self.ReadMacinfo==0 :
+                       return
+               try:
+                       macaddr = self.macaddr
+#make_mac_sector 00-99-99-99-00-00 > /tmp/mac.sector
+#flash_eraseall /dev/mtd4
+#nandwrite /dev/mtd4 /tmp/mac.sector -p                        
+                       cmd = "make_mac_sector %02x-%02x-%02x-%02x-%02x-%02x > /tmp/mac.sector"%(int(macaddr[0:2],16),int(macaddr[2:4],16),int(macaddr[4:6],16),int(macaddr[6:8],16),int(macaddr[8:10],16),int(macaddr[10:12],16))
+                       system(cmd)
+                       if self.model == 2 or self.model == 3 or self.model == 4:
+                               system("flash_eraseall /dev/mtd5")
+                               system("nandwrite /dev/mtd5 /tmp/mac.sector -p")
+                       elif self.model == 0 or self.model ==1 :
+                               system("flash_eraseall /dev/mtd4")
+                               system("nandwrite /dev/mtd4 /tmp/mac.sector -p")
+                       macaddress = long(macaddr,16)+1
+                       if macaddress > 0xffffffffffff:
+                               macaddress = 0
+                       macaddr = "%012x"%macaddress
+                       macwritetext = "MAC:%02x:%02x:%02x:%02x:%02x:%02x"%(int(macaddr[0:2],16),int(macaddr[2:4],16),int(macaddr[4:6],16),int(macaddr[6:8],16),int(macaddr[8:10],16),int(macaddr[10:12],16))
+                       self.macfd.seek(0)
+                       self.macfd.write(macwritetext)
+                       self.macfd.close()
+                       system("sync")
+                       self.macaddr = macaddr
+                       self.close()
+               except:
+                       self.session.open( MessageBox, _("Mac address fail"), MessageBox.TYPE_ERROR)
+                       global ethtest
+                       ethtest = 0
+                       self.close()            
+
+       def keyCancel(self):
+               if self.macfd != 0:
+                       self.macfd.close()
+               global ethtest
+               ethtest = 0
+               self.close()
+
+smartcardtest = 0
+class SmartCardTest(Screen):
+       skin = """
+               <screen position="300,240" size="160,120" title="SmartCard Test" >
+                       <widget name="text" position="10,10" size="140,100" font="Regular;22" />
+               </screen>"""
+
+       def __init__(self, session, stbmodel = 0):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions"],
+               {
+                       "cancel": self.keyCancel,
+                       "ok" : self.keyCancel
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Testing Smartcard 1..."))
+               self.step = 0
+               self.smartcardtimer = eTimer()
+               self.smartcardtimer.callback.append(self.check_smart_card)
+               self.closetimer = eTimer()
+               self.closetimer.callback.append(self.close)
+               self.smartcard=0
+               global smartcardtest
+               smartcardtest = 0
+               self.model = stbmodel
+               self.Testmode = 1
+               self.smartcardtimer.start(100,True)
+
+       def check_smart_card(self):
+               global smartcardtest
+               index = self.smartcard
+               result  = 0
+               if index==0:
+                       if self.Testmode==0:
+                               result = eSctest.getInstance().check_smart_card("/dev/sci0")
+                       else:
+                               result = eSctest.getInstance().n_check_smart_card("/dev/sci0")                  
+               elif index ==1:
+                       if self.Testmode==0:
+                               result = eSctest.getInstance().check_smart_card("/dev/sci1")
+                       else:
+                               result = eSctest.getInstance().n_check_smart_card("/dev/sci1")                  
+               else:
+                       result = -1
+
+               print result                    
+               
+               if result == 0:
+                       print 'pass'
+                       if(index== 0 and ( self.model== 0 or self.model==2 or self.model == 3 or self.model == 4) ):
+                               self.smartcard = 1
+                               self["text"].setText(_("Testing Smartcard 2..."))
+                               self.smartcardtimer.start(100,True)
+                               return
+                       elif (index==1 or self.model==1):
+                               smartcardtest = 1
+                               self.step = 1
+                               self["text"].setText(_("Smart Card OK!!"))
+                               self.closetimer.start(2000,True)
+                               self.smartcardtimer.stop()
+                       else :
+                               
+                               self["text"].setText(_("Smart Card model type error"))
+                               self.closetimer.start(2000,True)
+                               self.smartcardtimer.stop()
+               else:
+#                      if result ==-1:
+#                              self.session.open( MessageBox, _("%d:NO_DEV_FOUND"%(index+1)), MessageBox.TYPE_ERROR)
+#                      elif result == -2:
+#                              self.session.open( MessageBox, _("%d:SC_NOT_INSERTED"%(index+1)), MessageBox.TYPE_ERROR)
+#                      elif result == -3:
+#                              self.session.open( MessageBox, _("%d:SC_NOT_VALID_ATR"%(index+1)), MessageBox.TYPE_ERROR)
+#                      elif result == -5:
+#                              self.session.open( MessageBox, _("%d:SC_READ_TIMEOUT"%(index+1)), MessageBox.TYPE_ERROR)
+                       if(index==0):
+                               self["text"].setText(_("Smart Card 1 Error!\nerrorcode=%d"%result))
+                       elif (index==1):
+                               self["text"].setText(_("Smart Card 2 Error!\nerrorcode=%d"%result))
+                       self.closetimer.start(2000,True)
+                       self.smartcardtimer.stop()
+
+                               
+       def keyCancel(self):
+               self.close()
+
+       
+
+fronttest = 0
+
+class FrontTest(Screen):
+       skin = """
+               <screen position="260,240" size="200,180" title="Front Test" >
+                       <widget name="text" position="10,10" size="180,160" font="Regular;22" />
+               </screen>"""
+
+       def __init__(self, session):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions"],
+               {
+                       "ok": self.keyOk,
+                       "up":self.keyUp,
+                       "down":self.keyDown,                    
+                       "cancel": self.keyCancel,
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Wheel LEFT"))
+               self.step = 1
+               
+               self.fronttimer= eTimer()
+               self.fronttimer.callback.append(self.FrontAnimate)
+               self.frontturnonoff = 0
+               eSctest.getInstance().VFD_Open()
+               self.keytimeout = eTimer()
+               self.keytimeout.callback.append(self.KeyTimeOut)
+               self.keytimeout.start(5000,True)
+
+       def KeyTimeOut(self):
+               if self.step == 1:
+                       self["text"].setText(("Wheel LEFT ERROR"))
+               elif self.step ==2 :
+                       self["text"].setText(("Wheel RIGHT ERROR"))
+               elif self.step == 3:
+                       self["text"].setText(("Wheel BUTTON ERROR"))
+               self.step = 0
+#              self.keyCancel()
+                               
+       def keyCancel(self):
+               global fronttest
+               self.fronttimer.stop()
+               eSctest.getInstance().VFD_Close()
+               if self.step==4:
+                       fronttest = 1
+               else:
+                       fronttest = 0
+               self.close()
+
+       def keyDown(self):
+               if self.step==2:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 3
+                       self["text"].setText(_("Press Front Wheel"))
+
+       def keyUp(self):
+               if self.step==1:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step=2
+                       self["text"].setText(_("Wheel RIGHT"))
+
+       def keyOk(self):
+               if self.step == 3:
+                       self.keytimeout.stop()
+                       self.step =4
+                       self.fronttimer.start(1000,True)
+                       self["text"].setText(("Front Test OK!\nPress Exit Key"))
+#              elif self.step==4:
+#                      global fronttest
+#                      self.fronttimer.stop()
+#                      eSctest.getInstance().VFD_Close()
+#                      fronttest = 1
+#                      self.close()
+
+       def FrontAnimate(self):
+               if (self.frontturnonoff==0):
+                       eSctest.getInstance().turnon_VFD()
+                       self.frontturnonoff = 1
+               else:
+                       self.frontturnonoff = 0
+                       eSctest.getInstance().turnoff_VFD()
+               self.fronttimer.start(1000,True)
+               
+
+class FrontTest_solo(Screen):
+       skin = """
+               <screen position="260,240" size="200,180" title="Front Test" >
+                       <widget name="text" position="10,10" size="180,160" font="Regular;22" />
+               </screen>"""
+
+       def __init__(self, session):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions","GlobalActions"],
+               {
+                       "ok": self.keyOk,
+                       "cancel": self.keyCancel,
+                       "left": self.keyleft,
+                       "right": self.keyright,
+                       "power_down": self.keypower,
+                       "volumeUp": self.keyvolup,
+                       "volumeDown": self.keyvoldown,
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Press Front STANDBY"))
+               self.step = 1
+               
+               self.fronttimer= eTimer()
+               self.fronttimer.callback.append(self.FrontAnimate)
+               self.frontturnonoff = 0
+               eSctest.getInstance().VFD_Open()
+               self.keytimeout = eTimer()
+               self.keytimeout.callback.append(self.KeyTimeOut)
+               self.keytimeout.start(5000,True)
+
+       def KeyTimeOut(self):
+               if self.step == 1:
+                       self["text"].setText(("Front STANDBY ERROR\nPress exit!"))
+               elif self.step == 2 :
+                       self["text"].setText(("Front CH - ERROR\nPress exit!"))
+               elif self.step == 3:
+                       self["text"].setText(("Front CH + ERROR\nPress exit!"))
+               elif self.step == 4 :
+                       self["text"].setText(("Front VOL - ERROR\nPress exit!"))
+               elif self.step == 5:
+                       self["text"].setText(("Front VOL + ERROR\nPress exit!"))
+                       
+               self.step = 0
+#              self.keyCancel()
+
+       def keypower(self):
+               if self.step== 1:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 2
+                       self["text"].setText(_("Press Front CH -"))
+                       
+       def keyright(self):
+               if self.step== 3:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 4
+                       self["text"].setText(_("Press Front VOL -"))
+                       
+       def keyleft(self):
+               if self.step== 2:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 3
+                       self["text"].setText(_("Press Front CH +"))
+
+       def keyvolup(self):
+               if self.step== 5:
+                       self.keytimeout.stop()
+                       self.step = 6
+                       self.fronttimer.start(1000,True)
+                       self["text"].setText(_("Front LED OK?\n\nyes-ok\nno-exit"))                     
+#                      self["text"].setText(("Front Test OK!\nPress Exit Key"))
+               
+       def keyvoldown(self):
+               if self.step== 4:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 5
+                       self["text"].setText(_("Press Front VOL +"))
+
+       def checkled(self, yesno):
+               if yesno :
+                       self.step=6
+               else:
+                       self.step=0
+               self.keyCancel()
+                       
+       def keyCancel(self):
+               global fronttest
+               self.fronttimer.stop()
+               eSctest.getInstance().VFD_Close()
+               fronttest = 0
+               self.close()
+
+       def keyOk(self):
+               global fronttest
+               self.fronttimer.stop()
+               eSctest.getInstance().VFD_Close()
+               if self.step == 6:
+                       fronttest = 1
+               self.close()
+
+       def FrontAnimate(self):
+               if (self.frontturnonoff==0):
+                       eSctest.getInstance().turnon_VFD()
+                       self.frontturnonoff = 1
+               else:
+                       self.frontturnonoff = 0
+                       eSctest.getInstance().turnoff_VFD()
+               self.fronttimer.start(1000,True)
+
+
+       
+
+rstest = 0
+
+import select
+
+class RS232Test(Screen):
+       skin = """
+               <screen position="300,240" size="160,100" title="RS232 Test" >
+                       <widget name="text" position="10,10" size="140,80" font="Regular;22" />
+               </screen>"""
+       step=1
+       def __init__(self, session):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions"],
+               {
+                       "cancel": self.keyCancel,
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Press \"Enter\" Key"))
+               self.timer = eTimer()
+               self.timer.callback.append(self.checkrs232)
+               self.timer.start(100, True)
+
+       def checkrs232(self):
+               global rstest
+               try:
+                       rs=open('/dev/ttyS0','r')
+                       rd = [rs]
+                       r,w,e = select.select(rd, [], [], 10)
+                       if r:
+                               input = rs.read(1)
+                               if input == "\n":
+                                       rstest = 1
+                               else:
+                                       rstest = 0 
+                       else:
+                               rstest = 0
+               except:
+                       print 'error'
+                       rstest = 0
+               self.close()
+
+       def keyCancel(self):
+               self.close()
+
+Agingresult = 0
+
+class AgingTest(Screen):
+       skin = """
+               <screen position="200,240" size="250,100" title="Aging Test" >
+                       <widget name="text1" position="10,10" size="230,40" font="Regular;22" />
+                       <widget name="text2" position="10,50" size="230,40" font="Regular;22" />
+               </screen>"""
+       step=1
+       def __init__(self, session):
+               self["actions"] = ActionMap(["MediaPlayerActions","GlobalActions"],
+               {
+                       "pause": self.keyEnd,
+                       "stop": self.keyFinish,
+                       "volumeUp": self.nothing,
+                       "volumeDown": self.nothing,
+                       "volumeMute": self.nothing,             
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text1"]=Label(("Exit - Press Pause Key"))
+               self["text2"]=Label(("Reset - Press Stop Key"))
+#              self.servicelist = ServiceList()
+#              self.oldref = session.nav.getCurrentlyPlayingServiceReference()
+#              print "oldref",self.oldref
+#              session.nav.stopService() # try to disable foreground service
+#              self.chstart()
+               self.tunerlock = 0
+               self.tuningtimer = eTimer()
+               self.tuningtimer.callback.append(self.updateStatus)
+#              self.tuningtimer.start(200,True)
+
+
+       def updateStatus(self):
+               result = eSctest.getInstance().getFrontendstatus(0)             
+               hv = "Ver"
+                       
+               print "eSctest.getInstance().getFrontendstatus - %d"%result
+               if result == 0:
+                       self.tunerlock = 0
+                       self.session.nav.stopService()
+                       self.session.open( MessageBox, _("Tune 1 Ver Locking Fail..."), MessageBox.TYPE_ERROR)
+               elif result==1 :
+                       self.tunerlock = 1
+               else:
+                       self.tunerlock = 0
+                       self.session.nav.stopService()
+                       self.session.open( MessageBox, _("Tune 1 Ver Error %d..."%result), MessageBox.TYPE_ERROR)
+
+
+       def nothing(self):
+               print "nothing"
+
+       def chstart(self):
+               if self.oldref is None:
+                       eref = eServiceReference("1:0:19:1324:3EF:1:C00000:0:0:0")
+                       serviceHandler = eServiceCenter.getInstance()
+                       servicelist = serviceHandler.list(eref)
+                       if not servicelist is None:
+                               ref = servicelist.getNext()
+                       else:
+                               ref = self.getCurrentSelection()
+                               print "servicelist none"
+               else:
+                       ref = self.oldref
+               self.session.nav.stopService() # try to disable foreground service
+               ref.setData(0,0x19)
+               ref.setData(1,0x83)
+               ref.setData(2,0x6)
+               ref.setData(3,0x85)
+               ref.setData(4,0x640000)
+               self.session.nav.playService(ref)
+
+       def keyEnd(self):
+               global Agingresult
+               Agingresult = 0
+               self.session.nav.stopService() # try to disable foreground service
+               self.close()
+
+       def keyFinish(self):
+               global Agingresult
+               Agingresult = 1
+               self.session.nav.stopService() # try to disable foreground service
+               self.close()
+               
+session = None
+
+       
+def cleanup():
+       global Session
+       Session = None
+       global Servicelist
+       Servicelist = None
+
+def main(session, servicelist, **kwargs):
+       global Session
+       Session = session
+       global Servicelist
+       Servicelist = servicelist
+       bouquets = Servicelist.getBouquetList()
+       global bouquetSel
+       bouquetSel = Session.openWithCallback(cleanup, FactoryTest)
+
+#def Plugins(**kwargs):
+#      return PluginDescriptor(name=_("Factory Test"), description="Test App for Factory", where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main)
+
+def Plugins(**kwargs):
+       return []
diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/testdb b/lib/python/Plugins/SystemPlugins/FactoryTest/testdb
new file mode 100755 (executable)
index 0000000..71dee33
--- /dev/null
@@ -0,0 +1,57 @@
+eDVB services /4/
+transponders
+0064af79:03ef:0001
+       s 12153000:22000000:1:2:100:2:0:1:2:0:2
+/
+00820000:0003:00a4
+       s 10900000:26850000:0:0:130:2:0
+/
+00a00000:0003:00a4
+       s 10900000:26850000:0:0:160:2:0
+/
+00c00000:03ef:0001
+       s 12153000:22000000:1:2:192:2:0:1:2:0:2
+/
+ffff029a:03ef:0001
+       c 666000:6900000:2:3:0:0
+/
+eeee025c:03ef:0001
+       t 604000000:1:5:5:3:2:4:4:2:0
+/
+026c0000:0003:00a4
+       s 10900000:26850000:0:0:620:2:0
+/
+0282af79:03ef:0001
+       s 12153000:22000000:1:2:642:2:0:1:2:0:2
+/
+end
+services
+06d3:00820000:0003:00a4:1:0
+747 Channel [V] China
+p:STAR,c:000203,c:01028c,c:031ffe,f:40
+06d3:00a00000:0003:00a4:1:0
+747 Channel [V] China
+p:STAR,c:000203,c:01028c,c:031ffe,f:40
+1325:00c00000:03ef:0001:25:0
+ASTRA HD
+p:BetaDigital,f:40
+1325:0064af79:03ef:0001:25:0
+ASTRA HD
+p:BetaDigital,f:40
+1325:ffff029a:03ef:0001:25:0
+ASTRA HD+
+p:BetaDigital,f:40
+06d3:026c0000:0003:00a4:1:0
+747 Channel [V] China
+p:STAR,c:000203,c:01028c,c:031ffe,f:40
+1325:0282af79:03ef:0001:25:0
+ASTRA HD
+p:BetaDigital,c:0001ff,c:0301ff,c:040203,c:050001,f:40
+1325:eeee025c:03ef:0001:25:0
+ASTRA HD+
+p:BetaDigital,f:40
+1324:eeee025c:03ef:0001:25:0
+ANIXE HD
+p:BetaDigital,f:40
+end
+Have a lot of bugs!
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/Makefile.am b/lib/python/Plugins/SystemPlugins/Fancontrol/Makefile.am
new file mode 100644 (file)
index 0000000..8d4268b
--- /dev/null
@@ -0,0 +1,7 @@
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/Fancontrol
+
+SUBDIRS = meta
+
+install_PYTHON =       \
+       __init__.py \
+       plugin.py 
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/__init__.py b/lib/python/Plugins/SystemPlugins/Fancontrol/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/Fancontrol/meta/Makefile.am
new file mode 100644 (file)
index 0000000..df0956d
--- /dev/null
@@ -0,0 +1,3 @@
+installdir = $(datadir)/meta
+
+dist_install_DATA = plugin_fancontrol.xml
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/meta/plugin_fancontrol.xml b/lib/python/Plugins/SystemPlugins/Fancontrol/meta/plugin_fancontrol.xml
new file mode 100644 (file)
index 0000000..b766e34
--- /dev/null
@@ -0,0 +1,17 @@
+<default>
+         <prerequisites>
+                    <tag type="System" />
+         </prerequisites>
+          <info language="en">
+                    <author>ikseong</author>
+                    <name>Fancontrol</name>
+                    <packagename>enigma2-plugin-systemplugins-fancontrol</packagename>
+                    <shortdescription>Fan Control setting in standbymode.</shortdescription>
+                    <description>The Fan control turn on, turn off, modify fan action time on standbymode.
+                    </description>
+          </info>
+         <files type="package"> <!-- without version, without .ipk -->
+               <file type="package" name="enigma2-plugin-systemplugins-fancontrol" />
+       </files>
+
+</default>
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/plugin.py b/lib/python/Plugins/SystemPlugins/Fancontrol/plugin.py
new file mode 100644 (file)
index 0000000..e3d3c52
--- /dev/null
@@ -0,0 +1,172 @@
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Plugins.Plugin import PluginDescriptor
+from Components.ActionMap import ActionMap,NumberActionMap
+from Components.config import config
+from Components.config import config, getConfigListEntry, ConfigInteger, ConfigSubsection, ConfigSelection
+from Components.ConfigList import ConfigListScreen
+from Components.ActionMap import ActionMap
+from Components.Sources.StaticText import StaticText
+
+
+config.plugins.fancontrols = ConfigSubsection()
+config.plugins.fancontrols.standbymode = ConfigSelection(default = "off", choices = [
+       ("off", _("off")), ("on", _("on"))])
+config.plugins.fancontrols.usetimer = ConfigSelection(default = "off", choices = [
+       ("off", _("no")), ("on", _("yes"))])
+config.plugins.fancontrols.fanontime = ConfigInteger(default = 5, limits = (1, 100))
+config.plugins.fancontrols.fanofftime = ConfigInteger(default = 60, limits = (1, 100))
+
+class FancontrolConfiguration(Screen, ConfigListScreen):
+       skin = """
+               <screen name="FancontrolConfiguration" position="center,center" size="560,300" title="Standbymode Fancontrol settings" >
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
+                       <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ececec" backgroundColor="#9f1313" transparent="1" />
+                       <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ececec" backgroundColor="#1f771f" transparent="1" />
+                       <widget name="config" zPosition="2" position="5,50" size="550,200" scrollbarMode="showOnDemand" transparent="1" />
+               </screen>"""
+       def __init__(self, session):
+               Screen.__init__(self, session)
+               self.session = session
+               self.standbyEntry = None
+               self.usetimerEntry = None
+               self.fanontimeEntry = None
+               self.fanofftimeEntry = None
+
+               self["shortcuts"] = ActionMap(["ShortcutActions", "SetupActions" ],
+               {
+                       "ok": self.keySave,
+                       "cancel": self.keyCancel,
+                       "red": self.keyCancel,
+                       "green": self.keySave,
+               }, -2)
+
+               self.list = []
+               ConfigListScreen.__init__(self, self.list,session = self.session)
+#              self.getFaninfo()
+               self.createSetup()
+
+               self["key_red"] = StaticText(_("Close"))
+               self["key_green"] = StaticText(_("Save"))
+
+       def keyLeft(self):
+               ConfigListScreen.keyLeft(self)
+               self.newConfig()
+
+       def keyRight(self):
+               ConfigListScreen.keyRight(self)
+               self.newConfig()
+
+       def getFaninfo(self):
+               try:
+                       value=int(open('/proc/stb/system/standby_fan_off','r').read())
+                       if value is 0:
+                               config.plugins.fancontrols.standbymode.value="on"
+                       else:
+                               config.plugins.fancontrols.standbymode.value="off"
+                       value=int(open('/proc/stb/system/use_fan_timer','r').read())
+                       if value is 0:
+                               config.plugins.fancontrols.usetimer.value = "off"
+                       else:
+                               config.plugins.fancontrols.usetimer.value = "on"
+                       time=int(open('/proc/stb/system/fan_on_time','r').read())
+                       if time > 0 and time < 101:
+                               config.plugins.fancontrols.fanontime.value = time
+                       else:
+                               config.plugins.fancontrols.fanontime.value = 1
+                       time=int(open('/proc/stb/system/fan_off_time','r').read())
+                       if time > 0 and time < 101:
+                               config.plugins.fancontrols.fanofftime.value = time
+                       else:
+                               config.plugins.fancontrols.fanofftime.value = 1
+               except:
+                       print 'Error read proc of fan'
+       
+
+       def createSetup(self):
+               self.list = []
+               self.standbyEntry = getConfigListEntry(_("Fan basic action"), config.plugins.fancontrols.standbymode)
+               self.usetimerEntry = getConfigListEntry(_("Use Fan timer"), config.plugins.fancontrols.usetimer)
+               self.fanontimeEntry = getConfigListEntry(_("Fan on duration time"), config.plugins.fancontrols.fanontime)
+               self.fanofftimeEntry = getConfigListEntry(_("Fan off duration time"), config.plugins.fancontrols.fanofftime)
+
+               self.list.append( self.standbyEntry )
+               if config.plugins.fancontrols.standbymode.value is "off":
+                       self.list.append( self.usetimerEntry )
+                       if config.plugins.fancontrols.usetimer.value is not "off":
+                               self.list.append( self.fanontimeEntry )
+                               self.list.append( self.fanofftimeEntry )
+               
+               self["config"].list = self.list
+               self["config"].l.setList(self.list)
+               if not self.selectionChanged in self["config"].onSelectionChanged:
+                       self["config"].onSelectionChanged.append(self.selectionChanged)
+
+       def newConfig(self):
+               if self["config"].getCurrent() == self.usetimerEntry or self["config"].getCurrent() == self.standbyEntry:
+                       self.createSetup()
+
+       def selectionChanged(self):
+               current = self["config"].getCurrent()
+               print current
+
+       def cancelConfirm(self, result):
+               if not result:
+                       return
+               for x in self["config"].list:
+                       x[1].cancel()
+               self.close()
+
+                       
+       def keyCancel(self):
+               print "cancel"
+               if self["config"].isChanged():
+                       self.session.openWithCallback(self.cancelConfirm, MessageBox, _("Really close without saving settings?"))
+               else:
+                       self.close()
+
+       def keySave(self):
+               ConfigListScreen.keySave(self)
+               try:
+                       if config.plugins.fancontrols.standbymode.value is "on":
+                               open('/proc/stb/system/standby_fan_off','w').write('0')
+                       else:
+                               open('/proc/stb/system/standby_fan_off','w').write('1')
+                               if config.plugins.fancontrols.usetimer.value is "off":
+                                       open('/proc/stb/system/use_fan_timer','w').write('0')
+                               else:
+                                       open('/proc/stb/system/use_fan_timer','w').write('1')
+                                       open('/proc/stb/system/fan_on_time','w').write('%s'%config.plugins.fancontrols.fanontime.value)
+                                       open('/proc/stb/system/fan_off_time','w').write('%s'%config.plugins.fancontrols.fanofftime.value)
+               except:
+                       print 'Error write proc of fan'
+               
+       
+def openconfig(session, **kwargs):
+       session.open(FancontrolConfiguration)
+
+def selSetup(menuid, **kwargs):
+       if menuid != "system":
+               return [ ]
+
+       return [(_("Fan Control"), openconfig, "fancontrol_config", 70)]
+
+def setfancontrol(reason, **kwargs):
+       try:
+               if config.plugins.fancontrols.standbymode.value == "on":
+                       open('/proc/stb/system/standby_fan_off','w').write('0')
+               else:
+                       open('/proc/stb/system/standby_fan_off','w').write('1')
+                       if config.plugins.fancontrols.usetimer.value is "off":
+                               open('/proc/stb/system/use_fan_timer','w').write('0')
+                       else:
+                               open('/proc/stb/system/use_fan_timer','w').write('1')
+                               open('/proc/stb/system/fan_on_time','w').write('%s'%config.plugins.fancontrols.fanontime.value)
+                               open('/proc/stb/system/fan_off_time','w').write('%s'%config.plugins.fancontrols.fanofftime.value)
+       except:
+               print 'Error to set fan control'
+
+def Plugins(**kwargs):
+       return [PluginDescriptor(name = "Fancontrols", description = "check Fan Control settings", where = PluginDescriptor.WHERE_AUTOSTART, fnc = setfancontrol),
+       PluginDescriptor(name=_("Fan control"), description="Fan Control", where = PluginDescriptor.WHERE_MENU, fnc=selSetup)]
index 9cc538f..a2aa9e2 100755 (executable)
@@ -4,7 +4,7 @@ SUBDIRS = SoftwareManager FrontprocessorUpgrade PositionerSetup Satfinder \
        SkinSelector SatelliteEquipmentControl Videomode VideoTune Hotplug \
        DefaultServicesScanner NFIFlash DiseqcTester CommonInterfaceAssignment \
        CrashlogAutoSubmit CleanupWizard VideoEnhancement WirelessLan NetworkWizard \
-       TempFanControl
+       TempFanControl FactoryTest Fancontrol FPGAUpgrade
 
 install_PYTHON =       \
        __init__.py
old mode 100644 (file)
new mode 100755 (executable)
index 22e5436..8f9757f
@@ -34,7 +34,7 @@ class Upgrade(Screen):
                
        def go(self):
                if self.update:
-                       self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your Dreambox?\nAfter pressing OK, please wait!"))            
+                       self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your STB?\nAfter pressing OK, please wait!"))         
                else:
                        self.close()
        
@@ -133,7 +133,7 @@ class Ipkg(Screen):
                
        def go(self):
                if self.update:
-                       self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your Dreambox?\nAfter pressing OK, please wait!"))            
+                       self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your STB?\nAfter pressing OK, please wait!"))         
                else:
                        self.close()
        
index 73544a5..89b0988 100755 (executable)
@@ -9,7 +9,7 @@
                     <packagename>enigma2-plugin-systemplugins-skinselector</packagename>
                     <shortdescription>SkinSelector shows a menu with selectable skins</shortdescription>
                     <description>The SkinSelector shows a menu with selectable skins.\n
-                    It's now easy to change the look and feel of your Dreambox.
+                    It's now easy to change the look and feel of your STB.
                     </description>
                     <screenshot src="http://www.dreamboxupdate.com/preview/plugin_skinselector_en.jpg" />
           </info>
index fd2b5e1..f4980cb 100644 (file)
@@ -89,7 +89,7 @@ class SkinSelector(Screen):
                                        self.skinlist.append(subdir)
                                else:
                                        subdir = "Default Skin"
-                                       self.skinlist.append(subdir)
+                                       #self.skinlist.append(subdir)
 
        def ok(self):
                if self["SkinList"].getCurrent() == "Default Skin":
index ec2f82c..13c6f90 100755 (executable)
@@ -104,7 +104,7 @@ class SoftwareTools(DreamInfoHandler):
 
        def getUpdates(self, callback = None):
                if self.lastDownloadDate is None:
-                       if  self.hardware_info.device_name != "dm7025":
+                       if 0:
                                etpm = eTPM()
                                l2cert = etpm.getCert(eTPM.TPMD_DT_LEVEL2_CERT)
                                if l2cert is None:
@@ -123,7 +123,7 @@ class SoftwareTools(DreamInfoHandler):
                                        return
                                val = etpm.challenge(rnd)
                                result = decrypt_block(val, l3key)
-                       if self.hardware_info.device_name == "dm7025" or result[80:88] == rnd:
+                       if 1:
                                if self.NetworkConnectionAvailable == True:
                                        self.lastDownloadDate = time()
                                        if self.list_updating is False and callback is None:
@@ -162,7 +162,7 @@ class SoftwareTools(DreamInfoHandler):
                                        self.NotifierCallback = callback
                        else:
                                if self.list_updating and callback is not None:
-                                       if  self.hardware_info.device_name != "dm7025":
+                                       if 0:
                                                etpm = eTPM()
                                                l2cert = etpm.getCert(eTPM.TPMD_DT_LEVEL2_CERT)
                                                if l2cert is None:
@@ -181,7 +181,7 @@ class SoftwareTools(DreamInfoHandler):
                                                        return
                                                val = etpm.challenge(rnd)
                                                result = decrypt_block(val, l3key)
-                                       if self.hardware_info.device_name == "dm7025" or result[80:88] == rnd:
+                                       if self.hardware_info.device_name == "dm500hd" or result[80:88] == rnd:
                                                self.NotifierCallback = callback
                                                self.startIpkgListAvailable()
                                else:   
index 34302ec..6d0e20e 100755 (executable)
@@ -8,7 +8,7 @@ self.condition = (self.backuppath is not None and config.misc.firstrun.value)
                <text value="Do you want to restore your settings?" />
                <list>
                        <listentry caption="Yes, restore the settings now" step="restore" />
-                       <listentry caption="No, just start my dreambox" step="end" />
+                       <listentry caption="No, just start my STB" step="end" />
                </list>
                <code>
 self.clearSelectedKeys()
@@ -17,7 +17,7 @@ self.selectKey("OK")
        </step>
 
        <step id="welcome">
-               <text value="Welcome to the Image upgrade wizard. The wizard will assist you in upgrading the firmware of your Dreambox by providing a backup facility for your current settings and a short explanation of how to upgrade your firmware." />
+               <text value="Welcome to the Image upgrade wizard. The wizard will assist you in upgrading the firmware of your STB by providing a backup facility for your current settings and a short explanation of how to upgrade your firmware." />
                <list>
                        <listentry caption="OK, guide me through the upgrade process" step="backupquestion" />
                        <listentry caption="Exit the wizard" step="end" />
@@ -78,7 +78,7 @@ self.condition = (self.backuppath is False)
        </step>
 
        <step id="upgrade">
-               <text value="You need a PC connected to your dreambox. If you need further instructions, please visit the website http://www.dm7025.de.\nYour dreambox will now be halted. After you have performed the update instructions from the website, your new firmware will ask you to restore your settings." />
+               <text value="You need a PC connected to your STB. If you need further instructions, please visit the website http://www.dm7025.de.\nYour STB will now be halted. After you have performed the update instructions from the website, your new firmware will ask you to restore your settings." />
                <list>
                        <listentry caption="Yes, perform a shutdown now." step="shutdown" />
                        <listentry caption="No, do nothing." step="end" />
@@ -90,7 +90,7 @@ self.condition = (self.backuppath is False)
 from enigma import quitMainloop
 quitMainloop(1)
                </code>
-               <text value="Your dreambox is shutting down. Please stand by..." />
+               <text value="Your STB is shutting down. Please stand by..." />
        </step>
 
        <step id="end" laststep="true">
index 12fd609..2090aee 100644 (file)
@@ -125,11 +125,11 @@ class UpdatePluginMenu(Screen):
                self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value )
                if self.menu == 0:
                        print "building menu entries"
-                       self.list.append(("install-extensions", _("Manage extensions"), _("\nManage extensions or plugins for your Dreambox" ) + self.oktext, None))
-                       self.list.append(("software-update", _("Software update"), _("\nOnline update of your Dreambox software." ) + self.oktext, None))
-                       self.list.append(("software-restore", _("Software restore"), _("\nRestore your Dreambox with a new firmware." ) + self.oktext, None))
-                       self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext + "\n\n" + self.infotext, None))
-                       self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your Dreambox settings." ) + self.oktext, None))
+                       self.list.append(("install-extensions", _("Manage extensions"), _("\nManage extensions or plugins for your STB" ) + self.oktext, None))
+                       self.list.append(("software-update", _("Software update"), _("\nOnline update of your STB software." ) + self.oktext, None))
+                       self.list.append(("software-restore", _("Software restore"), _("\nRestore your STB with a new firmware." ) + self.oktext, None))
+                       self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your STB settings." ) + self.oktext + "\n\n" + self.infotext, None))
+                       self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your STB settings." ) + self.oktext, None))
                        self.list.append(("ipkg-install", _("Install local extension"),  _("\nScan for local extensions and install them." ) + self.oktext, None))
                        for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER):
                                if p.__call__.has_key("SoftwareSupported"):
@@ -230,7 +230,7 @@ class UpdatePluginMenu(Screen):
                        currentEntry = current[0]
                        if self.menu == 0:
                                if (currentEntry == "software-update"):
-                                       self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your Dreambox?")+"\n"+_("\nAfter pressing OK, please wait!"))
+                                       self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your STB?")+"\n"+_("\nAfter pressing OK, please wait!"))
                                elif (currentEntry == "software-restore"):
                                        self.session.open(ImageWizard)
                                elif (currentEntry == "install-extensions"):
@@ -927,7 +927,7 @@ class PluginManager(Screen, DreamInfoHandler):
        def runExecuteFinished(self):
                self.reloadPluginlist()
                if plugins.restartRequired or self.restartRequired:
-                       self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+                       self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
                else:
                        self.selectedFiles = []
                        self.restartRequired = False
@@ -1014,7 +1014,7 @@ class PluginManagerInfo(Screen):
                                elif cmd == 2:
                                        info = args['package']
                                else:
-                                       info = _("Dreambox software because updates are available.")
+                                       info = _("STB software because updates are available.")
 
                                self.list.append(self.buildEntryComponent(action,info))
                        self['list'].setList(self.list)
@@ -1282,15 +1282,15 @@ class PluginDetails(Screen, DreamInfoHandler):
                        if self.packagefiles:
                                for package in self.packagefiles[:]:
                                        self.cmdList.append((IpkgComponent.CMD_REMOVE, { "package": package["name"] }))
-                                       if len(self.cmdList):
-                                               self.session.openWithCallback(self.runRemove, MessageBox, _("Do you want to remove the package:\n") + self.pluginname + "\n" + self.oktext)
+                               if len(self.cmdList):
+                                       self.session.openWithCallback(self.runRemove, MessageBox, _("Do you want to remove the package:\n") + self.pluginname + "\n" + self.oktext)
                else:
                        if iSoftwareTools.NetworkConnectionAvailable:
                                if self.packagefiles:
                                        for package in self.packagefiles[:]:
                                                self.cmdList.append((IpkgComponent.CMD_INSTALL, { "package": package["name"] }))
-                                               if len(self.cmdList):
-                                                       self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to install the package:\n") + self.pluginname + "\n" + self.oktext)
+                                       if len(self.cmdList):
+                                               self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to install the package:\n") + self.pluginname + "\n" + self.oktext)
 
        def runUpgrade(self, result):
                if result:
@@ -1299,7 +1299,7 @@ class PluginDetails(Screen, DreamInfoHandler):
        def runUpgradeFinished(self):
                self.reloadPluginlist()
                if plugins.restartRequired or self.restartRequired:
-                       self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+                       self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
                else:
                        self.close(True)
        def UpgradeReboot(self, result):
@@ -1378,7 +1378,7 @@ class UpdatePlugin(Screen):
                                self.updating = True
                                self.activityTimer.start(100, False)
                                self.package.setText(_("Package list update"))
-                               self.status.setText(_("Upgrading Dreambox... Please wait"))
+                               self.status.setText(_("Upgrading STB... Please wait"))
                                self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
                        else:
                                self.package.setText(_("Your network is not working. Please try again."))
@@ -1443,11 +1443,11 @@ class UpdatePlugin(Screen):
                        else:
                                self.activityTimer.stop()
                                self.activityslider.setValue(0)
-                               error = _("your dreambox might be unusable now. Please consult the manual for further assistance before rebooting your dreambox.")
+                               error = _("your STB might be unusable now. Please consult the manual for further assistance before rebooting your STB.")
                                if self.packages == 0:
                                        error = _("No packages were upgraded yet. So you can check your network and try again.")
                                if self.updating:
-                                       error = _("Your dreambox isn't connected to the internet properly. Please check it and try again.")
+                                       error = _("Your STB isn't connected to the internet properly. Please check it and try again.")
                                self.status.setText(_("Error") +  " - " + error)
                #print event, "-", param
                pass
@@ -1458,7 +1458,7 @@ class UpdatePlugin(Screen):
        def exit(self):
                if not self.ipkg.isRunning():
                        if self.packages != 0 and self.error == 0:
-                               self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?"))
+                               self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your STB?"))
                        else:
                                self.close()
                else:
@@ -1816,7 +1816,7 @@ class PacketManager(Screen, NumericalTextInput):
                        self.session.openWithCallback(self.runRemoveFinished, Ipkg, cmdList = self.cmdList)
 
        def runRemoveFinished(self):
-               self.session.openWithCallback(self.RemoveReboot, MessageBox, _("Remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+               self.session.openWithCallback(self.RemoveReboot, MessageBox, _("Remove finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
 
        def RemoveReboot(self, result):
                if result is None:
@@ -1838,7 +1838,7 @@ class PacketManager(Screen, NumericalTextInput):
                        self.session.openWithCallback(self.runUpgradeFinished, Ipkg, cmdList = self.cmdList)
 
        def runUpgradeFinished(self):
-               self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+               self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
                
        def UpgradeReboot(self, result):
                if result is None:
index 7396534..e7805fc 100644 (file)
@@ -95,11 +95,11 @@ class VideoSetup(Screen, ConfigListScreen):
                                        self.list.append(getConfigListEntry(_("Auto scart switching"), config.av.vcrswitch))
 
                if level >= 1:
-                       self.list.append(getConfigListEntry(_("AC3 default"), config.av.defaultac3))
+                       self.list.append(getConfigListEntry(_("Dolby Digital default"), config.av.defaultac3))
                        if SystemInfo["CanDownmixAC3"]:
-                               self.list.append(getConfigListEntry(_("AC3 downmix"), config.av.downmix_ac3))
+                               self.list.append(getConfigListEntry(_("Dolby Digital downmix"), config.av.downmix_ac3))
                        self.list.extend((
-                               getConfigListEntry(_("General AC3 Delay"), config.av.generalAC3delay),
+                               getConfigListEntry(_("General Dolby Digital Delay"), config.av.generalAC3delay),
                                getConfigListEntry(_("General PCM Delay"), config.av.generalPCMdelay)
                        ))
 
index 6cf0f7b..d0c54f6 100644 (file)
@@ -11,7 +11,7 @@ class About(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
 
-               self["EnigmaVersion"] = StaticText("Enigma: " + about.getEnigmaVersionString())
+               self["EnigmaVersion"] = StaticText("Version: " + about.getEnigmaVersionString())
                self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())
 
                self["TunerHeader"] = StaticText(_("Detected NIMs:"))
index a5e09c0..6de9fcd 100644 (file)
@@ -80,7 +80,7 @@ class AudioSelection(Screen, ConfigListScreen):
                        if SystemInfo["CanDownmixAC3"]:
                                self.settings.downmix = ConfigOnOff(default=config.av.downmix_ac3.value)
                                self.settings.downmix.addNotifier(self.changeAC3Downmix, initial_call = False)
-                               conflist.append(getConfigListEntry(_("AC3 downmix"), self.settings.downmix))
+                               conflist.append(getConfigListEntry(_("Dolby Digital downmix"), self.settings.downmix))
                                self["key_red"].setBoolean(True)
 
                        if n > 0:
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 54e241d..fd2e54f
@@ -38,7 +38,7 @@ class DefaultWizard(WizardLanguage, DreamInfoHandler):
        def statusCallback(self, status, progress):
                print "statusCallback:", status, progress
                if status == DreamInfoHandler.STATUS_DONE:
-                       self["text"].setText(_("The installation of the default settings is finished. You can now continue configuring your Dreambox by pressing the OK button on the remote control."))
+                       self["text"].setText(_("The installation of the default settings is finished. You can now continue configuring your STB by pressing the OK button on the remote control."))
                        self.markDone()
                        self.disableKeys = False
 
@@ -104,12 +104,12 @@ def filescan(**kwargs):
                                        ScanPath(path = "dmpkg", with_subdirs = True), 
                                        ScanPath(path = "", with_subdirs = False), 
                                ], 
-                       name = "Dream-Package", 
+                       name = "STB-Package", 
                        description = _("Install settings, skins, software..."), 
                        openfnc = filescan_open, )
 
 print "add dreampackage scanner plugin"
-plugins.addPlugin(PluginDescriptor(name="Dream-Package", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan, internal = True))
+plugins.addPlugin(PluginDescriptor(name="STB-Package", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan, internal = True))
 print "added"
 
 wizardManager.registerWizard(DefaultWizard, config.misc.defaultchosen.value, priority = 6)
old mode 100644 (file)
new mode 100755 (executable)
index 5506287..860022a
@@ -45,6 +45,8 @@ class InfoBar(InfoBarBase, InfoBarShowHide,
                                "showMovies": (self.showMovies, _("Play recorded movies...")),
                                "showRadio": (self.showRadio, _("Show the radio player...")),
                                "showTv": (self.showTv, _("Show the tv player...")),
+                               #       ikseong action for subtitle hotkey
+                               "showSubtitle":(self.showSubtitle, _("Show the Subtitle...")),
                        }, prio=2)
                
                self.allowPiP = True
@@ -123,6 +125,11 @@ class InfoBar(InfoBarBase, InfoBarShowHide,
                if service is not None:
                        self.session.open(MoviePlayer, service)
 
+       #       ikseong action for subtitle hotkey
+       def showSubtitle(self):
+               from Screens.Subtitles import Subtitles
+               self.session.open(Subtitles)
+
 class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                InfoBarMenu, \
                InfoBarSeek, InfoBarShowMovies, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications,
@@ -138,6 +145,8 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                
                self["actions"] = HelpableActionMap(self, "MoviePlayerActions",
                        {
+                               #       ikseong action for subtitle hotkey
+                               "showSubtitle":(self.showSubtitle, _("Show the Subtitle...")),
                                "leavePlayer": (self.leavePlayer, _("leave movie player..."))
                        })
                
@@ -242,3 +251,8 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                        self.returning = False
                elif self.returning:
                        self.close()
+                       
+       #       ikseong action for subtitle hotkey
+       def showSubtitle(self):
+               from Screens.Subtitles import Subtitles
+               self.session.open(Subtitles)
old mode 100644 (file)
new mode 100755 (executable)
index 93a4788..07fbac8
@@ -1654,6 +1654,11 @@ class InfoBarInstantRecord:
                dir = preferredInstantRecordPath()
                if not dir or not fileExists(dir, 'w'):
                        dir = defaultMoviePath()
+#      ikseong
+               if not fileExists("/hdd", 0):
+                       print "not found /hdd"
+                       system("ln -s /media/hdd /hdd")
+#
                try:
                        stat = os_stat(dir)
                except:
index bd8550b..c465f28 100755 (executable)
@@ -52,7 +52,7 @@ class InputDeviceSelection(Screen,HelpableScreen):
                self["key_blue"] = StaticText("")
                self["introduction"] = StaticText(self.edittext)
                
-               self.devices = [(iInputDevices.getDeviceName(x),x) for x in iInputDevices.getDeviceList()]
+               self.devices = [(iInputDevices.getDeviceName(x)[9:],x) for x in iInputDevices.getDeviceList()]
                print "[InputDeviceSelection] found devices :->", len(self.devices),self.devices
                        
                self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
index fce10ac..c85bf42 100755 (executable)
@@ -1,6 +1,7 @@
 from Screen import Screen
 
-from Components.ActionMap import ActionMap
+#      ikseong
+from Components.ActionMap import ActionMap,NumberActionMap
 from Components.Language import language
 from Components.config import config
 from Components.Sources.List import List
@@ -23,6 +24,8 @@ def LanguageEntryComponent(file, name, index):
                png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "countries/missing.png"))
        res = (index, name, png)
        return res
+#      ikseong
+from Plugins.SystemPlugins.FactoryTest.plugin import FactoryTest
 
 class LanguageSelection(Screen):
        def __init__(self, session):
@@ -36,12 +39,32 @@ class LanguageSelection(Screen):
 
                self.updateList()
                self.onLayoutFinish.append(self.selectActiveLanguage)
-
-               self["actions"] = ActionMap(["OkCancelActions"], 
+#      ikseong
+               self["actions"] = NumberActionMap(["OkCancelActions","NumberActions"], 
                {
                        "ok": self.save,
                        "cancel": self.cancel,
+                       "1": self.keyNumberGlobal,
+                       "2": self.keyNumberGlobal,
+                       "3": self.keyNumberGlobal,
+                       "4": self.keyNumberGlobal,
+                       "5": self.keyNumberGlobal,
+                       "6": self.keyNumberGlobal,
+                       "7": self.keyNumberGlobal,
+                       "8": self.keyNumberGlobal,
+                       "9": self.keyNumberGlobal,
+                       "0": self.keyNumberGlobal,
                }, -1)
+               self.testkey=0
+               
+#      ikseong
+       def keyNumberGlobal(self, number):
+               self.testkey = self.testkey * 10 + number
+               if self.testkey > 10000:
+                       self.testkey = self.testkey%10000
+               if self.testkey == 4599:
+                       self.session.open(FactoryTest)
+               print "testkey", self.testkey
 
        def selectActiveLanguage(self):
                activeLanguage = language.getActiveLanguage()
index 69600f0..4c4fa44 100755 (executable)
@@ -7,7 +7,7 @@ install_PYTHON = \
        Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py \
        EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \
        InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py \
-       Dish.py LanguageSelection.py StartWizard.py PiPSetup.py \
+       Dish.py LanguageSelection.py StartWizard.py PiPSetup.py Subtitles.py \
        TutorialWizard.py PluginBrowser.py MinuteInput.py Scart.py PVRState.py \
        Console.py InputBox.py ChoiceBox.py SimpleSummary.py \
        TimerSelection.py PictureInPicture.py TimeDateInput.py \
index 4b15ee0..32b9f54 100755 (executable)
@@ -667,7 +667,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
                self["statuspic"].hide()
                
                self.oktext = _("Press OK on your remote control to continue.")
-               self.reboottext = _("Your Dreambox will restart after pressing OK on your remote control.")
+               self.reboottext = _("Your STB will restart after pressing OK on your remote control.")
                self.errortext = _("No working wireless network interface found.\n Please verify that you have attached a compatible WLAN device or enable your local network interface.")
                self.missingwlanplugintxt = _("The wireless LAN plugin is not installed!\nPlease install it.")
                
@@ -796,11 +796,11 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
 
        def loadDescription(self):
                if self["menulist"].getCurrent()[1] == 'edit':
-                       self["description"].setText(_("Edit the network configuration of your Dreambox.\n" ) + self.oktext )
+                       self["description"].setText(_("Edit the network configuration of your STB.\n" ) + self.oktext )
                if self["menulist"].getCurrent()[1] == 'test':
-                       self["description"].setText(_("Test the network configuration of your Dreambox.\n" ) + self.oktext )
+                       self["description"].setText(_("Test the network configuration of your STB.\n" ) + self.oktext )
                if self["menulist"].getCurrent()[1] == 'dns':
-                       self["description"].setText(_("Edit the Nameserver configuration of your Dreambox.\n" ) + self.oktext )
+                       self["description"].setText(_("Edit the Nameserver configuration of your STB.\n" ) + self.oktext )
                if self["menulist"].getCurrent()[1] == 'scanwlan':
                        self["description"].setText(_("Scan your network for wireless access points and connect to them using your selected wireless device.\n" ) + self.oktext )
                if self["menulist"].getCurrent()[1] == 'wlanstatus':
index 359552e..d423f46 100755 (executable)
@@ -220,8 +220,8 @@ class PluginDownloadBrowser(Screen):
                        self.remainingdata = ""
 
                for x in lines:
-                       plugin = x.split(" - ", 2)
-                       if len(plugin) == 3:
+                       plugin = x.split(" - ")
+                       if len(plugin) >= 2:
                                if self.run == 1 and self.type == self.DOWNLOAD:
                                        if plugin[0] not in self.installedplugins:
                                                self.installedplugins.append(plugin[0])
@@ -239,6 +239,13 @@ class PluginDownloadBrowser(Screen):
                
                self.plugins = {}
                for x in self.pluginlist:
+                       if len(x) < 4:
+                               split = x[0].split('-',3)
+                               if not self.plugins.has_key(split[2]):
+                                       self.plugins[split[2]] = []
+                               self.plugins[split[2]].append((PluginDescriptor(name = x[2], description = " ", icon = verticallineIcon), split[3]))
+                               continue
+
                        split = x[3].split('-', 1)
                        if len(split) < 2:
                                continue
index df427f9..6be08d4 100644 (file)
@@ -66,4 +66,4 @@ class ServiceScan(Screen):
 
        def createSummary(self):
                print "ServiceScanCreateSummary"
-               return ServiceScanSummary
\ No newline at end of file
+               return ServiceScanSummary
old mode 100644 (file)
new mode 100755 (executable)
index 61440d4..1305b62
@@ -40,7 +40,7 @@ class SleepTimerEdit(Screen):
                self.status = True
                self.updateColors()
                
-               self["pretext"] = Label(_("Shutdown Dreambox after"))
+               self["pretext"] = Label(_("Shutdown STB after"))
                self["aftertext"] = Label(_("minutes"))
                
                self["actions"] = NumberActionMap(["SleepTimerEditorActions", "TextEntryActions", "KeyboardInputActions"], 
@@ -99,19 +99,30 @@ class SleepTimerEdit(Screen):
 
        def select(self):
                if self.status:
-                       time = int(self["input"].getText())
-                       config.SleepTimer.defaulttime.setValue(time)
-                       config.SleepTimer.defaulttime.save()
-                       config.SleepTimer.action.save()
-                       config.SleepTimer.ask.save()
-                       self.session.nav.SleepTimer.setSleepTime(time)
-                       self.session.openWithCallback(self.close, MessageBox, _("The sleep timer has been activated."), MessageBox.TYPE_INFO)
+#      ikseong
+                       if self["input"].getText()=='':
+                               self.session.nav.SleepTimer.clear()
+                               self.session.openWithCallback(self.close, MessageBox, _("The sleep timer is invalid."), MessageBox.TYPE_INFO)
+                       else:                           
+                               time = int(self["input"].getText())
+                               config.SleepTimer.defaulttime.setValue(time)
+                               config.SleepTimer.defaulttime.save()
+                               config.SleepTimer.action.save()
+                               config.SleepTimer.ask.save()
+                               self.session.nav.SleepTimer.setSleepTime(time)
+                               self.session.openWithCallback(self.close, MessageBox, _("The sleep timer has been activated."), MessageBox.TYPE_INFO)
                else:
                        self.session.nav.SleepTimer.clear()
                        self.session.openWithCallback(self.close, MessageBox, _("The sleep timer has been disabled."), MessageBox.TYPE_INFO)
 
        def keyNumberGlobal(self, number):
-               self["input"].number(number)
+#      ikseong
+               if self["input"].getText() == '' :
+                       inputtime=0
+               else:
+                       inputtime= int(self["input"].getText())*10 +number
+               if inputtime < 10000 :
+                       self["input"].number(number)
 
        def selectLeft(self):
                self["input"].left()
diff --git a/lib/python/Screens/Subtitles.py b/lib/python/Screens/Subtitles.py
new file mode 100755 (executable)
index 0000000..8cabac4
--- /dev/null
@@ -0,0 +1,112 @@
+from Screen import Screen
+from Components.ServiceEventTracker import ServiceEventTracker
+from Components.ActionMap import ActionMap
+from Components.ConfigList import ConfigListScreen
+from Components.config import config, getConfigListEntry, ConfigNothing
+from enigma import iPlayableService
+
+from Tools.ISO639 import LanguageCodes
+
+#      ikseong for subtitle hotkey
+from Screens.InfoBar import InfoBar
+
+class Subtitles(Screen, ConfigListScreen):
+       def __init__(self, session, infobar=None):
+               Screen.__init__(self, session)
+        
+               self["actions"] = ActionMap(["SetupActions"],
+               {
+                       "ok": self.ok,
+                       "cancel": self.cancel,
+               }, -2)
+
+               self.list = []
+               ConfigListScreen.__init__(self, self.list)
+#      ikseong for subtitle hotkey
+               if self.session.infobar is None:        
+                       if InfoBar.instance:
+                               self.infobar = InfoBar.instance
+               else:
+                       self.infobar = self.session.infobar
+#
+               self.fillList()
+
+               self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
+                       {
+                               iPlayableService.evUpdatedInfo: self.__updatedInfo
+                       })
+               self.cached_subtitle_checked = False
+               self.__selected_subtitle = None
+
+       def fillList(self):
+               list = self.list
+               del list[:]
+               print "self.list", list
+               if self.subtitlesEnabled():
+                       list.append(getConfigListEntry(_("Disable Subtitles"), ConfigNothing(), None))
+                       sel = self.infobar.selected_subtitle
+               else:
+                       sel = None
+               for x in self.getSubtitleList():
+                       if sel and sel[:4] == x[:4]: #ignore Language code in compare
+                               text = _("Running")
+                       else:
+                               text = _("Enable")
+                       if x[0] == 0:
+                               if LanguageCodes.has_key(x[4]):
+                                       list.append(getConfigListEntry(text+" DVB "+LanguageCodes[x[4]][0], ConfigNothing(), x))
+                               else:
+                                       list.append(getConfigListEntry(text+" DVB "+x[4], ConfigNothing(), x))
+                       elif x[0] == 1:
+                               if x[4] == 'und': #undefined
+                                       list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2]), ConfigNothing(), x))
+                               else:
+                                       if LanguageCodes.has_key(x[4]):
+                                               list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+LanguageCodes[x[4]][0], ConfigNothing(), x))
+                                       else:
+                                               list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+x[4], ConfigNothing(), x))
+                       elif x[0] == 2:
+                               types = (" UTF-8 text "," SSA / AAS "," .SRT file ")
+                               if x[4] == 'und': #undefined
+                                       list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d" % x[1], ConfigNothing(), x))
+                               else:
+                                       if LanguageCodes.has_key(x[4]):
+                                               list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles") + ' ' + LanguageCodes[x[4]][0], ConfigNothing(), x))
+                                       else:
+                                               list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d " % x[1] +x[4], ConfigNothing(), x))
+#              return _("Disable subtitles")
+               self["config"].list = list
+               self["config"].l.setList(list)
+
+       def __updatedInfo(self):
+               self.fillList()
+
+       def getSubtitleList(self):
+               s = self.infobar and self.infobar.getCurrentServiceSubtitle()
+               l = s and s.getSubtitleList() or [ ]
+               return l
+
+       def subtitlesEnabled(self):
+               return self.infobar.subtitles_enabled
+
+       def enableSubtitle(self, subtitles):
+               if self.infobar.selected_subtitle != subtitles:
+                       self.infobar.subtitles_enabled = False
+                       self.infobar.selected_subtitle = subtitles
+                       if subtitles:
+                               self.infobar.subtitles_enabled = True
+
+       def keyLeft(self):
+               ConfigListScreen.keyLeft(self)
+
+       def keyRight(self):
+               ConfigListScreen.keyRight(self)
+
+       def ok(self):
+               if self.list:
+                       cur = self["config"].getCurrent()
+                       self.enableSubtitle(cur[2])
+               self.close(1)
+
+       def cancel(self):
+               self.close()
old mode 100644 (file)
new mode 100755 (executable)
index 5dd744f..dafc263
@@ -126,10 +126,10 @@ class JobView(InfoBarNotifications, Screen, ConfigListScreen):
                from Screens.MessageBox import MessageBox
                if self.settings.afterEvent.getValue() == "deepstandby":
                        if not Screens.Standby.inTryQuitMainloop:
-                               Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A sleep timer wants to shut down\nyour Dreambox. Shutdown now?"), timeout = 20)
+                               Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A sleep timer wants to shut down\nyour STB. Shutdown now?"), timeout = 20)
                elif self.settings.afterEvent.getValue() == "standby":
                        if not Screens.Standby.inStandby:
-                               Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A sleep timer wants to set your\nDreambox to standby. Do that now?"), timeout = 20)
+                               Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A sleep timer wants to set your\nSTB to standby. Do that now?"), timeout = 20)
 
        def checkNotifications(self):
                InfoBarNotifications.checkNotifications(self)
index 61e1d5e..c06626e 100755 (executable)
@@ -15,6 +15,9 @@ from enigma import eTimer, eEnv
 from xml.sax import make_parser
 from xml.sax.handler import ContentHandler
 
+#      ikseong
+from Plugins.SystemPlugins.FactoryTest.plugin import FactoryTest
+
 class WizardSummary(Screen):
        skin = """
        <screen position="0,0" size="132,64">
@@ -193,6 +196,10 @@ class Wizard(Screen):
                self.timeoutTimer = eTimer()
                self.timeoutTimer.callback.append(self.timeoutCounterFired)
 
+               #       ikseong - for memory test
+               self.memorytestmode = 0
+               self.testkey = 0
+
                self["text"] = Label()
 
                if showConfig:
@@ -243,7 +250,9 @@ class Wizard(Screen):
                        "7": self.keyNumberGlobal,
                        "8": self.keyNumberGlobal,
                        "9": self.keyNumberGlobal,
-                       "0": self.keyNumberGlobal
+                       "0": self.keyNumberGlobal,
+#      ikseong
+                       "test":self.testmode
                }, -1)
 
                self["VirtualKB"] = NumberActionMap(["VirtualKeyboardActions"],
@@ -384,7 +393,23 @@ class Wizard(Screen):
                                      &nb