fix little bug from change packages

This commit is contained in:
Marko Oldenburg 2020-03-25 16:49:54 +01:00
parent d1638cf310
commit dd217a5243

View File

@ -32,6 +32,7 @@ use warnings;
no if $] >= 5.017011, warnings => 'experimental::smartmatch'; no if $] >= 5.017011, warnings => 'experimental::smartmatch';
use Time::HiRes qw(gettimeofday); use Time::HiRes qw(gettimeofday);
use Time::Local 'timelocal_nocheck'; use Time::Local 'timelocal_nocheck';
use GPUtils qw(GP_Import GP_Export);
## Import der FHEM Funktionen ## Import der FHEM Funktionen
#-- Run before package compilation #-- Run before package compilation
@ -52,7 +53,13 @@ BEGIN {
readingFnAttributes readingFnAttributes
AttrVal AttrVal
ReadingsVal ReadingsVal
IsDisabled) featurelevel
Value
FmtDateTime
strftime
max
stacktrace
GetTimeSpec )
); );
} }
@ -82,7 +89,8 @@ sub Initialize {
sub Define { sub Define {
my ( $hash, $def ) = @_; my ( $hash, $def ) = @_;
RemoveInternalTimer($hash); main::RemoveInternalTimer($hash);
my ( $name, $type, $timespec_start, $device, $timespec_stop, $timeToSwitch, my ( $name, $type, $timespec_start, $device, $timespec_stop, $timeToSwitch,
$variation ) $variation )
= split( "[ \t][ \t]*", $def ); = split( "[ \t][ \t]*", $def );
@ -679,8 +687,8 @@ sub InternalTimer {
################################################################################ ################################################################################
sub RemoveInternalTimer { sub RemoveInternalTimer {
my ( $modifier, $hash ) = @_; my ( $modifier, $hash ) = @_;
my $timerName = "$hash->{NAME}_$modifier"; my $timerName = "$hash->{NAME}_$modifier";
my $myHash = $hash->{TIMER}{$timerName}; my $myHash = $hash->{TIMER}{$timerName};
if ( defined($myHash) ) { if ( defined($myHash) ) {
delete $hash->{TIMER}{$timerName}; delete $hash->{TIMER}{$timerName};