2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +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) = @_; my ($hash) = @_;
$hash->{ReadFn} = "FHEMRENDERER_Read"; # $hash->{ReadFn} = "FHEMRENDERER_Read";
$hash->{DefFn} = "FHEMRENDERER_Define"; $hash->{DefFn} = "FHEMRENDERER_Define";
$hash->{UndefFn} = "FHEMRENDERER_Undef"; $hash->{UndefFn} = "FHEMRENDERER_Undef";
$hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 plotmode:gnuplot,gnuplot-scroll plotsize refresh tmpfile status"; $hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 plotmode:gnuplot,gnuplot-scroll plotsize refresh tmpfile status";
@ -143,6 +143,7 @@ FHEMRENDERER_Set($@)
my ($hash, @a) = @_; my ($hash, @a) = @_;
my $ret = undef; my $ret = undef;
my $na = int(@a); my $na = int(@a);
$__wname = $hash->{NAME};
return "no set value specified" if($na < 2 || $na > 3); return "no set value specified" if($na < 2 || $na > 3);
@ -176,6 +177,9 @@ FHEMRENDERER_Get($@)
FHEMRENDERER_parseXmlList(0); FHEMRENDERER_parseXmlList(0);
$__wname = "";
$__wname = $hash->{NAME};
$__plotmode = FHEMRENDERER_getAttr("plotmode", "gnuplot"); $__plotmode = FHEMRENDERER_getAttr("plotmode", "gnuplot");
$__plotsize = FHEMRENDERER_getAttr("plotsize", "800,200"); $__plotsize = FHEMRENDERER_getAttr("plotsize", "800,200");
$FHEMRENDERER_tmpfile = FHEMRENDERER_getAttr("tmpfile", "/tmp/"); $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! # 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: General Description:
The FHEMRENDERER module is intended to render (draw) graphics based on the FHEM Log-Files. The FHEMRENDERER module is intended to render (draw) graphics based on the FHEM Log-Files.