2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

Auto-Loading the SVG module if plotmode is SVG

git-svn-id: https://svn.fhem.de/fhem/trunk@214 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2008-07-25 14:20:52 +00:00
parent 46507567ce
commit 7b5564a91d

View File

@ -81,6 +81,7 @@ FHEMWEB_Initialize($)
$hash->{DefFn} = "FHEMWEB_Define";
$hash->{UndefFn} = "FHEMWEB_Undef";
$hash->{AttrFn} = "FHEMWEB_Attr";
$hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 webname plotmode:gnuplot,gnuplot-scroll,SVG plotsize";
}
@ -126,6 +127,18 @@ FHEMWEB_Undef($$)
return undef;
}
#####################################
sub
FHEMWEB_Attr(@)
{
my @a = @_;
if($a[0] eq "set" && $a[2] eq "plotmode" && $a[3] eq "SVG" &&
!$modules{SVG}{LOADED}) {
CommandReload(undef, "98_SVG");
}
}
#####################################
sub
FHEMWEB_Read($)