Hi, the old patch Gustavo Barbieri made in february to make lcd.py (freevo-1.5.4) work with LCDproc-0.5 still works for me in the last release, and wasn't applied. Please someone running Freevo-1.5.(4) confirm if it still works with the outdated LCDproc-0.4.x (they're preparing a release.). Note that my version of the patch changes the screen size from 20 to 18 chars per line to match my VFD size, you might want to revert that manually in the patch itself before applying it http://muresan.de/freevo/freevo-1.5.4_lcdproc.diff If this gets commited to the 1.5.x tree, I think it's better if both screen sizes 20x4 and 18x4 are inlcuded (they actually use identical layout, so maybe some python guru knows how to do this more elegant than copying the layout one more time.
Lucian
diff -Naur freevo-1.5.4/src/plugins/lcd.py freevo-1.5.4_mod/src/plugins/lcd.py --- freevo-1.5.4/src/plugins/lcd.py 2005-10-16 11:18:49.000000000 +0200 +++ freevo-1.5.4_mod/src/plugins/lcd.py 2005-05-12 22:55:27.000000000 +0200 @@ -2,7 +2,7 @@ # ----------------------------------------------------------------------- # lcd.py - use PyLCD to display menus and players # ----------------------------------------------------------------------- -# $Id: lcd.py 7003 2005-01-23 11:36:56Z dischi $ +# $Id: lcd.py,v 1.19.2.3 2005/01/23 11:36:56 dischi Exp $ # # Notes: # To activate, put the following line in local_conf.py: @@ -12,7 +12,7 @@ # 2) Have Movie Player, TV Player and Image viewer to use LCD # 3) Better (and more) LCD screens. # ----------------------------------------------------------------------- -# $Log$ +# $Log: lcd.py,v $ # Revision 1.19.2.3 2005/01/23 11:36:56 dischi # add small tv patch # @@ -302,7 +302,7 @@ } }, - 20 : # 20 chars per line + 18 : # 20 chars per line # Welcome screen { "welcome" : @@ -355,6 +355,8 @@ # animation at the begining of the time line "animation_v": ( "string", "1 4 '%s'", "animation_audioplayer_chars[player.elapsed % len(animation_audioplayer_chars)]") +# "animation_v": ( "hbar", +# "1 4 '%d'","(int(player.elapsed *90 / player.length))") }, "video_player" : @@ -624,8 +626,11 @@ # Structure: # # poll_widgets = { <#_OF_LINES_IN_DISPLAY> : -# { <SCREEN_NAME> : ( <WIDGET_NAME>, ... ) }, -# ... +# { <#_OF_COLUMNS_IN_DISPLAY> : +# { <SCREEN_NAME> : ( <WIDGET_NAME>, ... ) }, +# ..., +# ...} +# } # } poll_widgets = { 4 : { 40 : { "welcome" : [ "clock" ] }, @@ -673,10 +678,10 @@ """ __author__ = 'Gustavo Sverzut Barbieri' - __author_email__ = '[EMAIL PROTECTED]' + __author_email__ = '[EMAIL PROTECTED]' __maintainer__ = __author__ __maintainer_email__ = __author_email__ - __version__ = '$Revision: 7003 $' + __version__ = '$Revision: 1.19.2.3 $' def __init__( self ): """ @@ -687,13 +692,13 @@ self.lcd = pylcd.client() cm = self.lcd.connect() except: - print String(_( "ERROR" )) + ":" + String(_( "LCD plugin will not load! Maybe you don't have LCDd (lcdproc daemon) running?" )) + log.error( String(_( "LCD plugin will not load! Maybe you don't have LCDd (lcdproc daemon) running?" )) ) self.disable = 1 return if config.DEBUG > 0: print String(_( "Connecting to LCD: %s" )) % cm - print String(_( "Info as know by the LCD module:" )) + print String(_( "Info as known by the LCD module:" )) self.lcd.getinfo() print "" @@ -708,10 +713,21 @@ return else: self.event_listener = 1 + sversion = self.lcd.s_version + if sversion.startswith( "0.5" ): + self.prio_map = { "high": "foreground", + "normal": "background", + "low": "info" } + elif sversion.startswith( "0.4" ): + self.prio_map = { "high": "64", + "normal": "128", + "low": "192" } + else: + self.disable = 1 + log.warning( "Unsupported LCDd version: %s" % ( sversion, ) ) plugin.register( self, "lcd" ) - # Show welcome screen: for w in self.screens[ "welcome" ]: @@ -723,7 +739,9 @@ except UnicodeError: self.lcd.widget_set( "welcome", w, param ) - self.lcd.screen_set( "welcome", "-priority 192 -duration 2 -heartbeat off" ) + self.lcd.screen_set( "welcome", + "-priority %s -duration 2 -heartbeat off" % \ + ( self.prio_map[ "low" ] ) ) self.last_screen = "welcome" self.lsv = { } # will hold last screen value (lsv) @@ -753,7 +771,7 @@ sname = type if not self.screens.has_key( sname ): - sname = 'menu' + sname = 'menu' if sname != self.last_screen: # recreate screen @@ -853,8 +871,10 @@ if self.last_screen != sname: - self.lcd.screen_set( self.last_screen, "-priority 128" ) - self.lcd.screen_set( sname, "-priority 64" ) + self.lcd.screen_set( self.last_screen, "-priority %s" % \ + ( self.prio_map[ "normal" ] ) ) + self.lcd.screen_set( sname, "-priority %s" % \ + ( self.prio_map[ "high" ] ) ) self.last_screen = sname @@ -928,7 +948,7 @@ def generate_screen( self, s ): if not self.screens.has_key( s ): - s = 'menu' + s = 'menu' self.lcd.screen_add( s ) widgets = self.screens[ s ] self.lcd.screen_set( s, "-heartbeat off" )