2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

OWAD,OWMULTI: slightly increase delays in 1-wire timing

git-svn-id: https://svn.fhem.de/fhem/trunk@6276 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
ntruchsess 2014-07-19 11:51:46 +00:00
parent 744331d94c
commit f8f9df453b
2 changed files with 8 additions and 13 deletions

View File

@ -90,7 +90,7 @@ use ProtoThreads;
no warnings 'deprecated'; no warnings 'deprecated';
sub Log($$); sub Log($$);
my $owx_version="5.17"; my $owx_version="5.18";
#-- fixed raw channel name, flexible channel name #-- fixed raw channel name, flexible channel name
my @owg_fixed = ("A","B","C","D"); my @owg_fixed = ("A","B","C","D");
my @owg_channel = ("A","B","C","D"); my @owg_channel = ("A","B","C","D");
@ -1571,7 +1571,7 @@ sub OWXAD_PT_GetPage($$$) {
#-- issue the match ROM command \x55 and the start conversion command #-- issue the match ROM command \x55 and the start conversion command
$thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev, "\x3C\x0F\x00\xFF\xFF", 0 ); $thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev, "\x3C\x0F\x00\xFF\xFF", 0 );
$thread->{ExecuteTime} = gettimeofday() + 0.05; # was 0.02 $thread->{ExecuteTime} = gettimeofday() + 0.07; # was 0.02
$thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout $thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout
PT_WAIT_THREAD($thread->{pt_execute}); PT_WAIT_THREAD($thread->{pt_execute});
delete $thread->{TimeoutTime}; delete $thread->{TimeoutTime};

View File

@ -82,7 +82,7 @@ no warnings 'deprecated';
sub Log($$); sub Log($$);
my $owx_version="5.17"; my $owx_version="5.18";
#-- flexible channel name #-- flexible channel name
my $owg_channel; my $owg_channel;
@ -1079,11 +1079,10 @@ sub OWXMULTI_PT_GetValues($) {
#"ds2438.temperaturconversionvdd" #"ds2438.temperaturconversionvdd"
$thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\x44",0); $thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\x44",0);
$thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout $thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout
$thread->{ExecuteTime} = gettimeofday() + 0.03; # was 0.012
PT_WAIT_THREAD($thread->{pt_execute}); PT_WAIT_THREAD($thread->{pt_execute});
delete $thread->{TimeoutTime}; delete $thread->{TimeoutTime};
die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR); die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR);
$thread->{ExecuteTime} = gettimeofday() + 0.012;
PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime}); PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime});
delete $thread->{ExecuteTime}; delete $thread->{ExecuteTime};
@ -1093,11 +1092,10 @@ sub OWXMULTI_PT_GetValues($) {
#"ds2438.voltageconversionvdd" #"ds2438.voltageconversionvdd"
$thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\xB4",0); $thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\xB4",0);
$thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout $thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout
$thread->{ExecuteTime} = gettimeofday() + 0.02; # was 0.006
PT_WAIT_THREAD($thread->{pt_execute}); PT_WAIT_THREAD($thread->{pt_execute});
delete $thread->{TimeoutTime}; delete $thread->{TimeoutTime};
die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR); die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR);
$thread->{ExecuteTime} = gettimeofday() + 0.006;
PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime}); PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime});
delete $thread->{ExecuteTime}; delete $thread->{ExecuteTime};
@ -1107,11 +1105,10 @@ sub OWXMULTI_PT_GetValues($) {
#"ds2438.recallmemoryvdd" #"ds2438.recallmemoryvdd"
$thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\xB8\x00",0); $thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\xB8\x00",0);
$thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout $thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout
$thread->{ExecuteTime} = gettimeofday() + 0.03; # was 0.012
PT_WAIT_THREAD($thread->{pt_execute}); PT_WAIT_THREAD($thread->{pt_execute});
delete $thread->{TimeoutTime}; delete $thread->{TimeoutTime};
die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR); die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR);
$thread->{ExecuteTime} = gettimeofday() + 0.012;
PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime}); PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime});
delete $thread->{ExecuteTime}; delete $thread->{ExecuteTime};
@ -1157,11 +1154,10 @@ sub OWXMULTI_PT_GetValues($) {
#"ds2438.voltageconversionvad" #"ds2438.voltageconversionvad"
$thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\xB4",0); $thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\xB4",0);
$thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout $thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout
$thread->{ExecuteTime} = gettimeofday() + 0.02; # was 0.006
PT_WAIT_THREAD($thread->{pt_execute}); PT_WAIT_THREAD($thread->{pt_execute});
delete $thread->{TimeoutTime}; delete $thread->{TimeoutTime};
die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR); die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR);
$thread->{ExecuteTime} = gettimeofday() + 0.006;
PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime}); PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime});
delete $thread->{ExecuteTime}; delete $thread->{ExecuteTime};
@ -1171,11 +1167,10 @@ sub OWXMULTI_PT_GetValues($) {
#"ds2438.recallmemoryvad" #"ds2438.recallmemoryvad"
$thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\xB8\x00",0); $thread->{pt_execute} = OWX_ASYNC_PT_Execute($master,1,$owx_dev,"\xB8\x00",0);
$thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout $thread->{TimeoutTime} = gettimeofday()+2; #TODO: implement attribute-based timeout
$thread->{ExecuteTime} = gettimeofday() + 0.03; # was 0.012
PT_WAIT_THREAD($thread->{pt_execute}); PT_WAIT_THREAD($thread->{pt_execute});
delete $thread->{TimeoutTime}; delete $thread->{TimeoutTime};
die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR); die $thread->{pt_execute}->PT_CAUSE() if ($thread->{pt_execute}->PT_STATE() == PT_ERROR);
$thread->{ExecuteTime} = gettimeofday() + 0.012;
PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime}); PT_YIELD_UNTIL(gettimeofday() >= $thread->{ExecuteTime});
delete $thread->{ExecuteTime}; delete $thread->{ExecuteTime};