added some parameters for setting VFD display on formuler1
authorims <ims21@users.sourceforge.net>
Wed, 29 Oct 2014 16:56:56 +0000 (17:56 +0100)
committerErik Slagter <erik@openpli.org>
Fri, 31 Oct 2014 08:46:23 +0000 (09:46 +0100)
Signed-off-by: Erik Slagter <erik@openpli.org>

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

index 57ed891..6894ce2 100644 (file)
                <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>
                <item level="0" text="StandbyLED" description="Turn on the power LED during standby." requires="StandbyLED">config.usage.standbyLED</item>
+               <item level="0" text="Scroll repeats" description="Number of repeating text on display." requires="VFD_scroll_repeats">config.usage.vfd_scroll_repeats</item>
+               <item level="2" text="Scroll delay" description="Delay in miliseconds between scrolling characters on display." requires="VFD_scroll_delay">config.usage.vfd_scroll_delay</item>
+               <item level="2" text="Initial scroll delay" description="Delay in miliseconds before start of scrolling text on display." requires="VFD_initial_scroll_delay">config.usage.vfd_initial_scroll_delay</item>
+               <item level="2" text="Final scroll delay" description="Delay in miliseconds after finish scrolling text on display." requires="VFD_final_scroll_delay">config.usage.vfd_final_scroll_delay</item>
        </setup>
        <setup key="satconfig" title="Satellite dish setup">
                <item text="Tuner slot" description="Choose which tuner to configure.">config.sat.tunerslot</item>
index 49cd151..6ed04b6 100644 (file)
@@ -39,3 +39,7 @@ SystemInfo["WakeOnLAN"] = fileCheck("/proc/stb/power/wol") or fileCheck("/proc/s
 SystemInfo["HasExternalPIP"] = not HardwareInfo().get_device_model().startswith("et9") and fileCheck("/proc/stb/vmpeg/1/external")
 SystemInfo["VideoDestinationConfigurable"] = fileExists("/proc/stb/vmpeg/0/dst_left")
 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
index 710b062..5ffffc6 100644 (file)
@@ -384,6 +384,42 @@ def InitUsageConfig():
                        ("mute", _("Black screen")), ("hold", _("Hold screen")), ("mutetilllock", _("Black screen till locked")), ("holdtilllock", _("Hold till locked"))])
                config.misc.zapmode.addNotifier(setZapmode, immediate_feedback = False)
 
+       if SystemInfo["VFD_scroll_repeats"]:
+               def scroll_repeats(el):
+                       open(SystemInfo["VFD_scroll_repeats"], "w").write(el.value)
+               choicelist = []
+               for i in range(1, 11, 1):
+                       choicelist.append(("%d" % i))
+               config.usage.vfd_scroll_repeats = ConfigSelection(default = "3", choices = choicelist)
+               config.usage.vfd_scroll_repeats.addNotifier(scroll_repeats, immediate_feedback = False)
+
+       if SystemInfo["VFD_scroll_delay"]:
+               def scroll_delay(el):
+                       open(SystemInfo["VFD_scroll_delay"], "w").write(el.value)
+               choicelist = []
+               for i in range(0, 1001, 50):
+                       choicelist.append(("%d" % i))
+               config.usage.vfd_scroll_delay = ConfigSelection(default = "150", choices = choicelist)
+               config.usage.vfd_scroll_delay.addNotifier(scroll_delay, immediate_feedback = False)
+
+       if SystemInfo["VFD_initial_scroll_delay"]:
+               def initial_scroll_delay(el):
+                       open(SystemInfo["VFD_initial_scroll_delay"], "w").write(el.value)
+               choicelist = []
+               for i in range(0, 20001, 500):
+                       choicelist.append(("%d" % i))
+               config.usage.vfd_initial_scroll_delay = ConfigSelection(default = "1000", choices = choicelist)
+               config.usage.vfd_initial_scroll_delay.addNotifier(initial_scroll_delay, immediate_feedback = False)
+
+       if SystemInfo["VFD_final_scroll_delay"]:
+               def final_scroll_delay(el):
+                       open(SystemInfo["VFD_final_scroll_delay"], "w").write(el.value)
+               choicelist = []
+               for i in range(0, 20001, 500):
+                       choicelist.append(("%d" % i))
+               config.usage.vfd_final_scroll_delay = ConfigSelection(default = "1000", choices = choicelist)
+               config.usage.vfd_final_scroll_delay.addNotifier(final_scroll_delay, immediate_feedback = False)
+
        config.subtitles = ConfigSubsection()
        config.subtitles.ttx_subtitle_colors = ConfigSelection(default = "1", choices = [
                ("0", _("original")),