2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

CUL_MAX: cleanup

git-svn-id: https://svn.fhem.de/fhem/trunk@2323 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2012-12-13 22:01:58 +00:00
parent c0ffdf909b
commit da85a71357

View File

@ -23,10 +23,9 @@ my $pairmodeDuration = 30; #seconds
my $timeBroadcastInterval = 6*60*60; #= 6 hours, the same time that the cube uses
my $resendRetries = 10; #how often resend before giving up?
my $resendRetries = 0; #how often resend before giving up?
my $ackTimeout = 1.3; #seconds: The MAX devices wake up once every second. Making this a fraction increases our change to hit
# the right moment the next time.
my $ackTimeout = 3; #seconds
sub
CUL_MAX_Initialize($)
@ -343,8 +342,6 @@ CUL_MAX_GetTimeInformationPayload()
my ($sec,$min,$hour,$day,$mon,$year,$wday,$yday,$isdst) = gmtime(time());
$mon += 1; #make month 1-based
#month encoding is just guessed
#also $hour-1 is not so clear, maybe there is some timezone involved (maybe we should send gmtime?)
#but where do we send the timezone? or is scheduled data/until in GMT?
#perls localtime gives years since 1900, and we need years since 2000
return unpack("H*",pack("CCCCC", $year - 100, $day, $hour, $min | (($mon & 0x0C) << 4), $sec | (($mon & 0x03) << 6)));
}