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:
@@ -81,6 +81,7 @@ FHEMWEB_Initialize($)
|
|||||||
|
|
||||||
$hash->{DefFn} = "FHEMWEB_Define";
|
$hash->{DefFn} = "FHEMWEB_Define";
|
||||||
$hash->{UndefFn} = "FHEMWEB_Undef";
|
$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";
|
$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;
|
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
|
sub
|
||||||
FHEMWEB_Read($)
|
FHEMWEB_Read($)
|
||||||
|
|||||||
Reference in New Issue
Block a user