Turn on/off tv live modus for et8500 display
authorbetacentauri <betacentauri@arcor.de>
Mon, 12 Jan 2015 17:38:15 +0000 (18:38 +0100)
committerErik Slagter <erik@openpli.org>
Fri, 30 Jan 2015 19:06:18 +0000 (20:06 +0100)
Signed-off-by: Erik Slagter <erik@openpli.org>

data/setup.xml
lib/python/Components/SystemInfo.py
lib/python/Components/UsageConfig.py

index 5958d9e..0501292 100644 (file)
                <item text="Contrast">config.osd.contrast</item>
        </setup>
        <setup key="lcd" title="Display setup" requires="FrontpanelDisplay">
+               <item level="0" text="Clone TV screen to LCD" description="Shows live tv or informations on LCD." requires="LcdLiveTV">config.lcd.showTv</item>
                <item level="0" text="Brightness" description="Configure the brightness level of the front panel display.">config.lcd.bright</item>
                <item level="0" text="Contrast" description="Configure the contrast level of the front panel display.">config.lcd.contrast</item>
                <item level="0" text="Standby" description="Configure the brightness level of the front panel display during standby.">config.lcd.standby</item>
index 6ed04b6..4b6c709 100644 (file)
@@ -42,4 +42,5 @@ SystemInfo["hasPIPVisibleProc"] = fileCheck("/proc/stb/vmpeg/1/visible")
 SystemInfo["VFD_scroll_repeats"] = fileCheck("/proc/stb/lcd/scroll_repeats")
 SystemInfo["VFD_scroll_delay"] = fileCheck("/proc/stb/lcd/scroll_delay")
 SystemInfo["VFD_initial_scroll_delay"] = fileCheck("/proc/stb/lcd/initial_scroll_delay")
-SystemInfo["VFD_final_scroll_delay"] = fileCheck("/proc/stb/lcd/final_scroll_delay")
\ No newline at end of file
+SystemInfo["VFD_final_scroll_delay"] = fileCheck("/proc/stb/lcd/final_scroll_delay")
+SystemInfo["LcdLiveTV"] = fileCheck("/proc/stb/fb/sd_detach")
\ No newline at end of file
index 659da84..57eeab1 100644 (file)
@@ -420,6 +420,12 @@ def InitUsageConfig():
                config.usage.vfd_final_scroll_delay = ConfigSelection(default = "1000", choices = choicelist)
                config.usage.vfd_final_scroll_delay.addNotifier(final_scroll_delay, immediate_feedback = False)
 
+       if SystemInfo["LcdLiveTV"]:
+               def lcdLiveTvChanged(configElement):
+                       open(SystemInfo["LcdLiveTV"], "w").write(configElement.value and "0" or "1")
+               config.lcd.showTv = ConfigYesNo(default = True)
+               config.lcd.showTv.addNotifier(lcdLiveTvChanged)
+
        config.subtitles = ConfigSubsection()
        config.subtitles.ttx_subtitle_colors = ConfigSelection(default = "1", choices = [
                ("0", _("original")),