2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 23:06:05 +00:00

OWX_FRM: fix timeouts caused by commit rev. 6289

git-svn-id: https://svn.fhem.de/fhem/trunk@6368 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
ntruchsess 2014-08-06 21:22:43 +00:00
parent bd7d717d73
commit 6688c2ae6b
2 changed files with 9 additions and 8 deletions

View File

@ -47,7 +47,7 @@ sub new() {
interface => "firmata",
#-- module version
version => 4.0
version => 4.1
}, $class;
}
@ -75,12 +75,13 @@ sub Define($$) {
#
########################################################################################
sub initialize($)
sub initialize()
{
my ( $self, $hash ) = @_;
my ( $self ) = @_;
main::LoadModule("FRM");
my $pin = $self->{pin};
my $hash = $self->{hash};
my $ret = main::FRM_Init_Pin_Client( $hash, [$pin], PIN_ONEWIRE );
die $ret if ( defined $ret );
my $firmata = main::FRM_Client_FirmataDevice($hash);
@ -266,9 +267,9 @@ sub get_pt_execute($$$$) {
});
};
sub poll($) {
my ( $self, $hash ) = @_;
if ( my $frm = $hash->{IODev} ) {
sub poll() {
my ( $self ) = @_;
if ( my $frm = $self->{hash}->{IODev} ) {
main::FRM_poll($frm);
}
};

View File

@ -47,7 +47,7 @@ sub new() {
my $self = {
interface => "serial",
#-- module version
version => 5.0,
version => 5.1,
alarmdevs => [],
devs => [],
fams => [],
@ -56,7 +56,7 @@ sub new() {
return bless $self,$class;
}
sub poll($) {
sub poll() {
my ( $self ) = @_;
my $hash = $self->{hash};
if(defined($hash->{FD})) {