2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

Some minor bugfixes / Ein paar kleine Fehler beseitigt

git-svn-id: https://svn.fhem.de/fhem/trunk@1708 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
pahenning 2012-07-09 19:51:02 +00:00
parent a8fb3e1e25
commit e73000c71f
5 changed files with 11 additions and 18 deletions

View File

@ -9,7 +9,7 @@
# Internally these interfaces are vastly different, read the corresponding Wiki pages
# http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire
#
# Version 2.1 - July, 2012
# Version 2.11 - July, 2012
#
# Prof. Dr. Peter A. Henning, 2012
#

View File

@ -2,10 +2,6 @@
#
# OWAD.pm
#
#
# TODO: Alarm limits ergeben "invalid page write attempt"
#
#
# FHEM module to commmunicate with 1-Wire A/D converters DS2450
#
# Attention: This module may communicate with the OWX module,
@ -18,7 +14,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.1 - July, 2012
# Version 2.11 - July, 2012
#
# Setup bus device in fhem.cfg as
#
@ -971,7 +967,7 @@ sub OWXAD_SetPage($$) {
my ($i,$j,$k);
#=============== set the alarm values ===============================
if ( $page eq "test" ) {
if ( $page eq "alarm" ) {
#-- issue the match ROM command \x55 and the set alarm page command
# \x55\x10\x00 reading 8 data bytes and 2 CRC bytes
$select="\x55\x10\x00";

View File

@ -7,10 +7,6 @@
# Attention: This module may communicate with the OWX module,
# but currently not with the 1-Wire File System OWFS
#
#
# SO FAR ONLY external counter inputs A,B are available ! Neither memory content, nor internal counters are questioned.
#
#
# Prefixes for subroutines of this module:
# OW = General 1-Wire routines Peter Henning)
# OWX = 1-Wire bus master interface (Peter Henning)
@ -18,7 +14,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.1 - July, 2012
# Version 2.11 - July, 2012
#
# Setup bus device in fhem.cfg as
#
@ -354,7 +350,7 @@ sub OWCOUNT_FormatValues($) {
my ($sec,$min,$hour,$day,$month,$year,$wday,$yday,$isdst) = localtime(time);
if( $day!=$dayo ){
my $dt = ((24-$houro)*3600 -$mino*60 - $seco)/( ($hour+24-$houro)*3600 + ($min-$mino)*60 + ($sec-$seco) );
$midnight = $oldval*(1-$dt)+$vval*$dt;
$midnight += $oldval*(1-$dt)+$vval*$dt;
OWXCOUNT_SetPage($hash,14+$i,sprintf("%f",$midnight));
}
}

View File

@ -12,7 +12,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.1 - July, 2012
# Version 2.11 - July, 2012
#
# Setup bus device in fhem.cfg as
#

View File

@ -7,6 +7,7 @@
# Attention: This module may communicate with the OWX module,
# but currently not with the 1-Wire File System OWFS
#
# TODO: Kanalattribute ändern zur Laufzeit.
#
#
# Prefixes for subroutines of this module:
@ -16,7 +17,7 @@
#
# Prof. Dr. Peter A. Henning, 2012
#
# Version 2.1 - July, 2012
# Version 2.11 - July, 2012
#
# Setup bus device in fhem.cfg as
#
@ -177,12 +178,12 @@ sub OWSWITCH_Define ($$) {
#-- 1-Wire ROM identifier in the form "FF.XXXXXXXXXXXX.YY"
# determine CRC Code - only if this is a direct interface
$crc = defined($hash->{IODev}->{INTERFACE}) ? sprintf("%02x",OWX_CRC("1D.".$id."00")) : "00";
$crc = defined($hash->{IODev}->{INTERFACE}) ? sprintf("%02x",OWX_CRC("3A.".$id."00")) : "00";
#-- Define device internals
$hash->{ROM_ID} = "1D.".$id.$crc;
$hash->{ROM_ID} = "3A.".$id.$crc;
$hash->{OW_ID} = $id;
$hash->{OW_FAMILY} = "1D";
$hash->{OW_FAMILY} = "3A";
$hash->{PRESENT} = 0;
$hash->{INTERVAL} = $interval;