2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 16:46:35 +00:00

Fixed Renderer, to enbale multiple renderer definitions

git-svn-id: https://svn.fhem.de/fhem/trunk@592 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
odroegehorn 2010-03-15 08:24:58 +00:00
parent 58ead2ee97
commit 3a497b4f60
2 changed files with 13 additions and 4 deletions

View File

@ -91,7 +91,7 @@ FHEMRENDERER_Initialize($)
{
my ($hash) = @_;
$hash->{ReadFn} = "FHEMRENDERER_Read";
# $hash->{ReadFn} = "FHEMRENDERER_Read";
$hash->{DefFn} = "FHEMRENDERER_Define";
$hash->{UndefFn} = "FHEMRENDERER_Undef";
$hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 plotmode:gnuplot,gnuplot-scroll plotsize refresh tmpfile status";
@ -143,9 +143,10 @@ FHEMRENDERER_Set($@)
my ($hash, @a) = @_;
my $ret = undef;
my $na = int(@a);
$__wname = $hash->{NAME};
return "no set value specified" if($na < 2 || $na > 3);
# if($__plotmode eq "SVG" && !$modules{SVG}{LOADED}) {
# my $ret = CommandReload(undef, "98_SVG");
# Log 0, $ret if($ret);
@ -173,9 +174,12 @@ FHEMRENDERER_Get($@)
my $ret = undef;
my $v;
my $t;
FHEMRENDERER_parseXmlList(0);
$__wname = "";
$__wname = $hash->{NAME};
$__plotmode = FHEMRENDERER_getAttr("plotmode", "gnuplot");
$__plotsize = FHEMRENDERER_getAttr("plotsize", "800,200");
$FHEMRENDERER_tmpfile = FHEMRENDERER_getAttr("tmpfile", "/tmp/");

View File

@ -29,6 +29,11 @@ Description of the 02_FHEMRENDERER Module:
# This copyright notice MUST APPEAR in all copies of the script!
#################################################################################
Versions:
V1.0: Initial Version
V1.1: Bugfix: Enabled multiple RENERER Instances
General Description:
The FHEMRENDERER module is intended to render (draw) graphics based on the FHEM Log-Files.