mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-02 13:05:12 +00:00
CUL typos/sign bug
git-svn-id: https://svn.fhem.de/fhem/trunk@306 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f4fe730008
commit
40f8b5262b
@ -422,7 +422,7 @@
|
||||
- feature: 91_watchdog added to handle the HMS100-FIT
|
||||
- feature: cum_kWh/cum_m3 added to EMWZ/EMGZ (11.01.08 by Peter)
|
||||
|
||||
- ==DATE== (4.5)
|
||||
- 2008-12-23 (4.5)
|
||||
- bugfix: further 01_FHEMWEB cleanup
|
||||
- feature: CUL support for FS20(r/w), FHT(readonly), KS300 and EM
|
||||
- feature: command list outputs the device attributes too
|
||||
@ -465,3 +465,6 @@
|
||||
- feature: attribute rainadjustment for KS300 (Boris 2008-12-17)
|
||||
- bugfix: deleting at / watchdog while active creates an empty device
|
||||
- feature: ExactId trigger added for wildcard HMS devices
|
||||
|
||||
- =DATE= (4.6)
|
||||
- bugfix: fht actuator message clarification by Klaus
|
||||
|
@ -198,7 +198,7 @@ GOTBW:
|
||||
} else {
|
||||
|
||||
return "Expecting a 0-padded hex number"
|
||||
if((length($arg)&1) == 0 && $type ne "raw");
|
||||
if((length($arg)&1) == 1 && $type ne "raw");
|
||||
$initstr = "X$arg" if($type eq "verbose");
|
||||
Log GetLogLevel($name,4), "set $name $type $arg";
|
||||
CUL_Write($hash, $sets{$type}, $arg);
|
||||
@ -224,20 +224,17 @@ CUL_Get($@)
|
||||
|
||||
if($a[1] eq "ccconf") {
|
||||
|
||||
my %r = ( "0D"=>1,"0E"=>1,"0F"=>1,"10"=>1,"1B"=>1,"1D"=>1,
|
||||
"23"=>1,"24"=>1,"25"=>1,"26"=>1) ;
|
||||
my %r = ( "0D"=>1,"0E"=>1,"0F"=>1,"10"=>1,"1B"=>1,"1D"=>1 );
|
||||
foreach my $a (sort keys %r) {
|
||||
CUL_SimpleWrite($hash, "C$a");
|
||||
my @answ = split(" ", CUL_ReadAnswer($hash, "C$a"));
|
||||
$r{$a} = $answ[4];
|
||||
}
|
||||
$msg = sprintf("Freq:%.3fMHz Bwidth:%dKHz Ampl:%ddB " .
|
||||
"Sens:%ddB FSCAL:%02X%02X%02X%02X",
|
||||
$msg = sprintf("Freq:%.3fMHz Bwidth:%dKHz Ampl:%ddB Sens:%ddB",
|
||||
26*(($r{"0D"}*256+$r{"0E"})*256+$r{"0F"})/65536, #Freq
|
||||
26000/(8 * (4+(($r{"10"}>>4)&3)) * (1 << (($r{"10"}>>6)&3))), #Bw
|
||||
$r{"1B"}&7<4 ? 24+3*($r{"1B"}&7) : 36+2*(($r{"1B"}&7)-4), #Ampl
|
||||
4+4*($r{"1D"}&3), #Sens
|
||||
$r{"23"}, $r{"24"}, $r{"25"}, $r{"26"} #FSCAL
|
||||
4+4*($r{"1D"}&3) #Sens
|
||||
);
|
||||
|
||||
} else {
|
||||
@ -519,6 +516,7 @@ CUL_Read($)
|
||||
my $dmsg;
|
||||
($dmsg,$culdata) = split("\n", $culdata);
|
||||
$dmsg =~ s/\r//;
|
||||
goto NEXTMSG if($dmsg eq "");
|
||||
|
||||
# Debug message, X05
|
||||
if($dmsg =~ m/^p /) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
##############################################
|
||||
#############################################
|
||||
package main;
|
||||
|
||||
use strict;
|
||||
@ -365,14 +365,15 @@ FHT_Parse($$)
|
||||
my $sval = substr($msg,24,2);
|
||||
my $fv = sprintf("%d%%", int(100*$val/255+0.5));
|
||||
|
||||
if($sval =~ m/.6/) { $val = "$fv" }
|
||||
if($sval =~ m/.0/) { $val = "syncnow" }
|
||||
elsif($sval =~ m/.1/) { $val = "99%" } # FHT set to 30.5, FHT80B=="ON"
|
||||
elsif($sval =~ m/.2/) { $val = "0%" } # FHT set to 5.5
|
||||
elsef($sval =~ m/.6/) { $val = "$fv" }
|
||||
elsif($sval =~ m/.8/) { $val = "offset: $fv" }
|
||||
elsif($sval =~ m/.a/) { $val = "lime-protection" }
|
||||
elsif($sval =~ m/.c/) { $val = "synctime" }
|
||||
elsif($sval =~ m/.e/) { $val = "test" }
|
||||
elsif($sval =~ m/.f/) { $val = "pair" }
|
||||
elsif($sval =~ m/.1/) { $val = "99%" } # FHT set to 30.5, FHT80B=="ON"
|
||||
elsif($sval =~ m/.2/) { $val = "0%" } # FHT set to 5.5
|
||||
|
||||
else { $val = "unknown_$sval: $fv" }
|
||||
|
||||
|
@ -180,7 +180,7 @@ CUL_WS_Parse($$)
|
||||
my $wnd = sprintf("%0.1f", "$a[9]$a[10].$a[7]" + $hash->{corr3});
|
||||
my $hum = sprintf( "%02d", "$a[8]$a[5]" + $hash->{corr2});
|
||||
my $tmp = sprintf("%0.1f", ("$a[6]$a[3].$a[4]"+$hash->{corr1}) *
|
||||
(($a[1]&8) ? -1 : 1));
|
||||
(($a[1] & 0xC) ? -1 : 1));
|
||||
my $ir = ((hex($a[1]) & 2)) ? "yes" : "no";
|
||||
|
||||
$val = "T: $tmp H: $hum W: $wnd R: $rain IR: $ir";
|
||||
|
@ -2,8 +2,8 @@ BINDIR=/usr/local/bin
|
||||
MODDIR=/usr/local/lib
|
||||
VARDIR=/var/log/fhem
|
||||
|
||||
VERS=4.4
|
||||
DATE=2008-08-04
|
||||
VERS=4.5
|
||||
DATE=2008-12-23
|
||||
|
||||
all:
|
||||
@echo Nothing to do for all.
|
||||
|
10
fhem/fhem.pl
10
fhem/fhem.pl
@ -148,7 +148,7 @@ my %intAt; # Internal at timer hash.
|
||||
my $nextat; # Time when next timer will be triggered.
|
||||
my $intAtCnt=0;
|
||||
my $AttrList = "room comment";
|
||||
my $cvsid = '$Id: fhem.pl,v 1.60 2008-12-23 15:53:13 rudolfkoenig Exp $';
|
||||
my $cvsid = '$Id: fhem.pl,v 1.61 2008-12-28 14:36:58 rudolfkoenig Exp $';
|
||||
my $namedef =
|
||||
"where <name> is either:\n" .
|
||||
"- a single device name\n" .
|
||||
@ -516,7 +516,7 @@ AnalyzeCommand($$)
|
||||
|
||||
if($cmd =~ m/^{.*}$/s) { # Perl code
|
||||
|
||||
$cmd =~ s/\\ *\n/ /g; # Multi-line
|
||||
$cmd =~ s/\\ *\n/ /g; # Multi-line
|
||||
# Make life easier for oneliners:
|
||||
%value = ();
|
||||
foreach my $d (keys %defs) {
|
||||
@ -1539,7 +1539,7 @@ CommandInform($$)
|
||||
|
||||
$param = lc($param);
|
||||
|
||||
return "Usage: inform {on|off}" if($param !~ m/^(on|off|timer)$/);
|
||||
return "Usage: inform {on|off|timer}" if($param !~ m/^(on|off|timer)$/);
|
||||
if($param =~ m/off/) {
|
||||
delete($client{$cl}{inform});
|
||||
} else {
|
||||
@ -1788,6 +1788,10 @@ DoTrigger($$)
|
||||
foreach my $c (keys %client) { # Do client loop first, is cheaper
|
||||
next if(!$client{$c}{inform});
|
||||
my $tn = TimeNow();
|
||||
if($attr{global}{mseclog}) {
|
||||
my ($seconds, $microseconds) = gettimeofday();
|
||||
$tn .= sprintf(".%03d", $microseconds/1000);
|
||||
}
|
||||
for(my $i = 0; $i < $max; $i++) {
|
||||
my $state = $defs{$dev}{CHANGED}[$i];
|
||||
my $fe = "$dev:$state";
|
||||
|
Loading…
x
Reference in New Issue
Block a user