|
From: <pf...@us...> - 2012-12-25 09:53:04
|
Revision: 1246
http://openautomation.svn.sourceforge.net/openautomation/?rev=1246&view=rev
Author: pfry
Date: 2012-12-25 09:52:55 +0000 (Tue, 25 Dec 2012)
Log Message:
-----------
Verhalten mit Option debug=>1 (globale Option) veraendert - Return Value gibt nun den naechsten faelligen Timer an
Modified Paths:
--------------
wiregate/plugin/generic/Logikprozessor.pl
Modified: wiregate/plugin/generic/Logikprozessor.pl
===================================================================
--- wiregate/plugin/generic/Logikprozessor.pl 2012-12-24 09:00:32 UTC (rev 1245)
+++ wiregate/plugin/generic/Logikprozessor.pl 2012-12-25 09:52:55 UTC (rev 1246)
@@ -5,7 +5,7 @@
# Wiregate-Plugin
# (c) 2012 Fry under the GNU Public License
-#$plugin_info{$plugname.'_cycle'}=0; return 'deaktiviert';
+# $plugin_info{$plugname.'_cycle'}=0; return 'deaktiviert';
use POSIX qw(floor);
@@ -27,7 +27,7 @@
my $weekday=!$weekend;
my $holiday=is_holiday($year,$day_of_year);
my $workingday=(!$weekend && !$holiday);
-my $day=($hour>7 && $hour<23);
+my $day=($hour>=7 && $hour<23);
my $night=!$day;
my $systemtime=time();
my $date=sprintf("%02d/%02d",$month,$day_of_month);
@@ -386,7 +386,7 @@
}
else # noch nicht faelliger Timer
{
- $nexttimer=$plugin_info{$timer} if !defined $nexttimer || $plugin_info{$timer}<$nexttimer;
+ $nexttimer=$timer if !defined $nexttimer || $plugin_info{$timer}<$plugin_info{$nexttimer};
}
}
@@ -415,10 +415,12 @@
}
else
{
- my $cycle=int($nexttimer-time());
+ my $cycle=int($plugin_info{$nexttimer}-time());
$cycle=1 if $cycle<1;
$plugin_info{$plugname."_cycle"}=$cycle;
- $retval.="Cycle (Timer) gestellt auf ".$cycle."s" if $logic{debug};
+ $nexttimer=~s/^$plugname\__//;
+ $nexttimer=~s/_timer$//;
+ $retval.="Naechster Timer: $nexttimer" if $logic{debug};
}
# experimentell - wir helfen der Garbage Collection etwas nach...
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|