From 6c4a56b39c97c911c8819d5640c8d5337afb323c 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: https://svn.fhem.de/fhem/trunk/fhem@7559 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- CHANGED | 1 + FHEM/02_FRAMEBUFFER.pm | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGED b/CHANGED index 2199c0a94..51e40e05b 100644 --- a/CHANGED +++ b/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/02_FRAMEBUFFER.pm b/FHEM/02_FRAMEBUFFER.pm index afe1165cd..7c0de68dd 100644 --- a/FHEM/02_FRAMEBUFFER.pm +++ b/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;