98_Heating_Control.pm - changing a Statement to get it work on older versions of Perl(Synlogy 5.8)

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2776 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dietmar63
2013-02-20 07:23:38 +00:00
parent 9bdff19013
commit 11de24b025

View File

@@ -95,13 +95,13 @@ Heating_Control_Define($$)
} }
for(my $i=0; $i<@a; $i++) { for(my $i=0; $i<@a; $i++) {
#pr<EFBFBD>fen auf Angabe eines Schaltpunktes #pruefen auf Angabe eines Schaltpunktes
my @t = split(/\|/, $a[$i]); my @t = split(/\|/, $a[$i]);
my $anzahl = @t; my $anzahl = @t;
if ( $anzahl ~~ [2,3]) { if ( $anzahl >= 2 && $anzahl <= 3) {
push(@switchingtimes, $a[$i]); push(@switchingtimes, $a[$i]);
} else { } else {
#der Rest ist das auzuf<EFBFBD>hrende Kommando/condition #der Rest ist das auzufuehrende Kommando/condition
$conditionOrCommand = trim(join(" ", @a[$i..@a-1])); $conditionOrCommand = trim(join(" ", @a[$i..@a-1]));
last; last;
} }
@@ -145,13 +145,13 @@ Heating_Control_Define($$)
$dayNumber{$day} = $idx; $idx++; $dayNumber{$day} = $idx; $idx++;
} }
#Aufz<EFBFBD>hlung 1234 ... #Aufzaehlung 1234 ...
if ( $daylist =~ m/^(\d){0,7}$/g) { if ( $daylist =~ m/^(\d){0,7}$/g) {
@days = split("", $daylist); @days = split("", $daylist);
@hdays{@days}=1; @hdays{@days}=1;
# Aufz<EFBFBD>hlung Sa,So,... | Mo-Di,Do,Fr-Mo # Aufzaehlung Sa,So,... | Mo-Di,Do,Fr-Mo
} elsif ($daylist =~ m/^($daysRegExp(,|-|$)){0,7}$/g ) { } elsif ($daylist =~ m/^($daysRegExp(,|-|$)){0,7}$/g ) {
my $oldDay, my $oldDel; my $oldDay, my $oldDel;
@@ -193,7 +193,7 @@ Heating_Control_Define($$)
} }
} }
#desired-temp des Zieldevices ausw<EFBFBD>hlen #desired-temp des Zieldevices auswaehlen
if($defs{$device}{TYPE} eq "MAX") { if($defs{$device}{TYPE} eq "MAX") {
$hash->{helper}{DESIRED_TEMP_READING} = "desiredTemperature" $hash->{helper}{DESIRED_TEMP_READING} = "desiredTemperature"
} else { } else {
@@ -258,7 +258,7 @@ Heating_Control_Update($)
for (my $d=0; $d<@days; $d++) { for (my $d=0; $d<@days; $d++) {
Log $loglevel, "d------------>$d--->nextSwitch:$nextSwitch"; Log $loglevel, "d------------>$d--->nextSwitch:$nextSwitch";
#<EFBFBD>ber jeden Tag #ueber jeden Tag
last if ($nextSwitch > 0); last if ($nextSwitch > 0);
Log $loglevel, "days[$d]------------>$days[$d]"; Log $loglevel, "days[$d]------------>$days[$d]";
foreach my $st (sort (keys %{ $hash->{helper}{SWITCHINGTIME}{$days[$d]} })) { foreach my $st (sort (keys %{ $hash->{helper}{SWITCHINGTIME}{$days[$d]} })) {