ich habe inzwischen mein Testplugin ein wenig verändert, aber mir ist noch keine LCD Ausgabe gelungen.
Nun weiß ich nicht mehr weiter.
Python
# cat plugin.py
import time
import os
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.ActionMap import NumberActionMap
from Components.Label import Label
from Components.Input import Input
from Components.Pixmap import Pixmap
from Components.FileList import FileEntryComponent, FileList
from Screens.ChoiceBox import ChoiceBox
from Plugins.Plugin import PluginDescriptor
from Components.Sources.CurrentService import CurrentService
class Test(Screen):
skin = """
<screen position="0,0" size="132,64">
<widget source="CurrentService" render="Label" position="6,4" size="120,42" font="Regular;18" >
<convert type="ServiceName">Name</convert>
</widget>
<widget source="StaticText" render="Label" position="56,46" size="82,18" font="Regular;16" >
<convert type="StaticText">text</convert>
</widget>
</screen>"""
def __init__(self, session, parent):
Screen.__init__(self, session)
os.system("wall init")
self["CurrentService"] = CurrentService(self.session.nav)
self["StaticText"] = "testlcd"
def main(session, **kwargs):
os.system("wall main")
Test(session, 0)
time.sleep(1)
Test(session, 1)
time.sleep(1)
Test(session, 2)
time.sleep(1)
def Plugins(**kwargs):
return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
Alles anzeigen
Gruß Ralf