diff --git a/CHANGED b/CHANGED index 0aad0af8d..7151abe21 100644 --- a/CHANGED +++ b/CHANGED @@ -1,5 +1,5 @@ - =DATE= (4.10) - - feature: KM271: Read only + - feature: KM271 - bugfix: 99_SUNRISE_EL endless loop bug - feature: CUL: optional baudrate spec in definition - feature: CUL: sendpool attribute diff --git a/FHEM/00_CUL.pm b/FHEM/00_CUL.pm index 066e96b22..67450112e 100755 --- a/FHEM/00_CUL.pm +++ b/FHEM/00_CUL.pm @@ -567,6 +567,9 @@ CUL_XmitLimitCheck($$) $hash->{NR_CMD_LAST_H} = int(@b); } +##################################### +# Translate data prepared for an FHZ to CUL syntax, so we can reuse +# the FS20 and FHZ modules. sub CUL_WriteTranslate($$$) { @@ -605,7 +608,7 @@ CUL_Write($$$) ($fn, $msg) = CUL_WriteTranslate($hash, $fn, $msg); return if(!defined($fn)); - Log 5, "CUL sending $fn$msg"; + Log 5, "$hash->{NAME} sending $fn$msg"; my $bstring = "$fn$msg"; if($fn eq "F") { diff --git a/TODO b/TODO index 599a2c035..a909eb4b2 100644 --- a/TODO +++ b/TODO @@ -7,4 +7,4 @@ FHEM: Webpgm2 - plot data from multiple files in a single picture - setting the dummy state via dropdown is not possible -- SVG gimmicks for the plot +- click on the graph only correct for the day zoom diff --git a/fhem.pl b/fhem.pl index e2709a70d..2a8c7a8b5 100755 --- a/fhem.pl +++ b/fhem.pl @@ -160,7 +160,7 @@ my $nextat; # Time when next timer will be triggered. my $intAtCnt=0; my %duplicate; # Pool of received msg for multi-fhz/cul setups my $duplidx=0; # helper for the above pool -my $cvsid = '$Id: fhem.pl,v 1.107 2010-05-18 08:08:53 rudolfkoenig Exp $'; +my $cvsid = '$Id: fhem.pl,v 1.108 2010-07-18 08:17:48 rudolfkoenig Exp $'; my $namedef = "where is either:\n" . "- a single device name\n" . @@ -2093,7 +2093,7 @@ Dispatch($$$) my @found; foreach my $m (sort { $modules{$a}{ORDER} cmp $modules{$b}{ORDER} } - grep {defined($modules{$_}{ORDER});}keys %modules) { + grep {defined($modules{$_}{ORDER})} keys %modules) { next if($iohash->{Clients} !~ m/:$m:/); # Module is not loaded or the message is not for this module diff --git a/webfrontend/pgm2/svg.js b/webfrontend/pgm2/svg.js index 1b22b0d86..687ee78d0 100644 --- a/webfrontend/pgm2/svg.js +++ b/webfrontend/pgm2/svg.js @@ -42,20 +42,19 @@ uncompressPoints(cmpData) function -get_cookie(name) +get_cookie() { var c = parent.document.cookie; if(c == null) return ""; - var results = c.match("fw_"+escape(name)+'=(.*?)(;|$)' ); + var results = c.match('fhemweb=(.*?)(;|$)' ); return (results ? unescape(results[1]) : ""); } function -set_cookie(name, value) +set_cookie(value) { - name = "fw_"+escape(name); - parent.document.cookie=name+"="+escape(value); + parent.document.cookie="fhemweb="+escape(value); } @@ -65,8 +64,7 @@ svg_copy(evt) var d = evt.target.ownerDocument; var cp = d.getElementById("svg_copy"); cp.firstChild.nodeValue = " "; - set_cookie(old_sel.getAttribute("title"), - old_sel.getAttribute("y_min")+":"+ + set_cookie(old_sel.getAttribute("y_min")+":"+ old_sel.getAttribute("y_mul")+":"+ compressPoints(old_sel.getAttribute("points"))); } @@ -80,7 +78,7 @@ svg_paste(evt) var o=d.createElementNS(xmlns, "polyline"); o.setAttribute("class", "pasted"); - var data = get_cookie(old_sel.getAttribute("title")).split(":", 3); + var data = get_cookie().split(":", 3); o.setAttribute("points", uncompressPoints(data[2])); var h = parseFloat(old_sel.getAttribute("y_h")); @@ -124,8 +122,7 @@ svg_labelselect(evt) if(sel.getAttribute("points") != null) { tl.firstChild.nodeValue = evt.target.getAttribute("title"); cp.firstChild.nodeValue = "Copy"; - ps.firstChild.nodeValue = ( - get_cookie(sel.getAttribute("title"))==""?" ":"Paste"); + ps.firstChild.nodeValue = (get_cookie()==""?" ":"Paste"); } }