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

88_Timer: fixed stop internalTimer if no value to sort (sortTimer)

git-svn-id: https://svn.fhem.de/fhem/trunk@20416 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
HomeAuto_User 2019-10-27 19:03:12 +00:00
parent 1345dabc42
commit 4d612e5fa6
2 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- bugfix: 88_Timer: fixed stop internalTimer if no value to sort (sortTimer)
- change: 88_HMCCU: Minor changes
- change: 71_ZM_Monitor: now writing internal 'model'
- feature: 74_AMADDevice: add class support for openApp,

View File

@ -155,8 +155,6 @@ sub Timer_Set($$$@) {
my $array_diff_cnt1 = 0; # need to check 1 + 1
my $array_diff_cnt2 = 0; # need to check 1 + 1
RemoveInternalTimer($hash, "Timer_Check");
foreach my $readingsName (sort keys %{$hash->{READINGS}}) {
if ($readingsName =~ /^Timer_(\d+)$/) {
my $value = ReadingsVal($name, $readingsName, 0);
@ -173,6 +171,8 @@ sub Timer_Set($$$@) {
for (my $i=0; $i<scalar(@timers_unsortet); $i++) {
$array_diff++ if ($timers_unsortet[$i] ne $timers_sort[$i]);
}
RemoveInternalTimer($hash, "Timer_Check") if ($array_diff != 0);
return "cancellation! No sorting necessary." if ($array_diff == 0); # check, need action continues
for (my $i=0; $i<scalar(@timers_sort); $i++) {
@ -668,7 +668,7 @@ sub Timer_FW_Detail($$$$) {
FW_cmd(FW_root+ \'?XHR=1"'.$FW_CSRF.'"&cmd={FW_pushed_savebutton("'.$name.'","\'+allVals+\'","'.$FW_room_dupl.'")}\');
}
/* Popup DEF - Zusammenbau */
/* Popup DEF - Zusammenbau (PERL -> Rueckgabe -> Javascript) */
function show_popup(button) {
FW_cmd(FW_root+\'?cmd={Timer_Popup("'.$name.'","\'+button+\'")}&XHR=1"'.$FW_CSRF.'"\', function(data){popup_return(data)});
}
@ -804,7 +804,7 @@ sub FW_pushed_savebutton {
readingsBulkUpdate($hash, "state" , $state, 1);
readingsEndUpdate($hash, 1);
## popup user message ##
## popup user message (jump to javascript) ##
if ($popup != 0) {
FW_directNotify("FILTER=(room=)?$name", "#FHEMWEB:WEB", "show_popup(".$selected_buttons[0].")", "");
$reload = 0 if ($reload != 0); # reset, need to right running
@ -818,7 +818,7 @@ sub FW_pushed_savebutton {
return;
}
### separate popup for user ###
### Popup DEF - Zusammenbau (Rueckgabe -> Javascript) ###
sub Timer_Popup {
my $name = shift;
my $selected_button = shift;
@ -881,7 +881,7 @@ sub Timer_Check($) {
my $state;;
Log3 $name, 5, "$name: Check is running, Sonnenaufgang $sunriseValues[0]:$sunriseValues[1]:$sunriseValues[2], Sonnenuntergang $sunsetValues[0]:$sunsetValues[1]:$sunsetValues[2]";
Log3 $name, 5, "$name: Check is running, drift $microseconds microSeconds";
Log3 $name, 4, "$name: Check is running, drift $microseconds microSeconds";
foreach my $d (keys %{$hash->{READINGS}}) {
if ($d =~ /^Timer_\d+$/) {