From c3dd1b687c30f1781c8e40deb2584a10ff22eb66 Mon Sep 17 00:00:00 2001 From: kaihs Date: Tue, 13 Jan 2015 20:31:31 +0000 Subject: [PATCH] FRAMEBUFFER: enable align and textwrap properties of RSS git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7559 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/02_FRAMEBUFFER.pm | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/fhem/CHANGED b/fhem/CHANGED index 2199c0a94..51e40e05b 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 02_FRAMEBUFFER: enable align and textwrap properties of RSS - changed: 73_km200.pm: New attribute DoNotPoll and German commandref. - added: 57_CALVIEW.pm (chris1284) - changed: configDB.pm use fhem function createUniqueId() diff --git a/fhem/FHEM/02_FRAMEBUFFER.pm b/fhem/FHEM/02_FRAMEBUFFER.pm index afe1165cd..7c0de68dd 100644 --- a/fhem/FHEM/02_FRAMEBUFFER.pm +++ b/fhem/FHEM/02_FRAMEBUFFER.pm @@ -116,6 +116,17 @@ sub FRAMEBUFFER_Define($$) { } $hash->{fhem}{fb_device}= $fb_device; + eval "use GD::Text::Align"; + $hash->{fhem}{useTextAlign} = ($@ ? 0 : 1 ); + if(!($hash->{fhem}{useTextAlign})) { + Log3 $hash, 2, "$name: Cannot use text alignment: $@"; + } + + eval "use GD::Text::Wrap"; + $hash->{fhem}{useTextWrap} = ($@ ? 0 : 1 ); + if(!($hash->{fhem}{useTextWrap})) { + Log3 $hash, 2, "$name: Cannot use text wrapping: $@"; + } readingsSingleUpdate($hash, 'state', 'Initialized',1); return undef;