2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 20:24:36 +00:00

10_IT: fix usage with multible io devices

git-svn-id: https://svn.fhem.de/fhem/trunk@17540 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
bjoernh 2018-10-15 19:00:42 +00:00
parent aad32bfdb0
commit 45439dd140
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it. # Do not insert empty lines here, update check depends on it.
- bugfix: 10_IT fix usage with multible io devices
- bugfix: 73_GardenaSmartBridge/Device fix typo oK to ok, change to - bugfix: 73_GardenaSmartBridge/Device fix typo oK to ok, change to
package System package System
- change: 93_DbRep: V8.2.3, check availability of DbLog-device at - change: 93_DbRep: V8.2.3, check availability of DbLog-device at

View File

@ -659,6 +659,7 @@ IT_Define($$)
{ {
my ($hash, $def) = @_; my ($hash, $def) = @_;
my @a = split("[ \t][ \t]*", $def); my @a = split("[ \t][ \t]*", $def);
my $ioname = $modules{IT}{defptr}{ioname};
# calculate transmit code from IT A-P rotary switches # calculate transmit code from IT A-P rotary switches
if($a[2] =~ /^([A-O])(([0]{0,1}[1-9])|(1[0-6]))$/i) { if($a[2] =~ /^([A-O])(([0]{0,1}[1-9])|(1[0-6]))$/i) {
@ -848,7 +849,7 @@ IT_Define($$)
$hash->{CODE}{$ncode++} = $code; $hash->{CODE}{$ncode++} = $code;
$modules{IT}{defptr}{$code}{$name} = $hash; $modules{IT}{defptr}{$code}{$name} = $hash;
AssignIoPort($hash); AssignIoPort($hash, $ioname);
} }
############################# #############################
@ -885,6 +886,7 @@ IT_Parse($$)
my $def; my $def;
my $newstate; my $newstate;
my @list; my @list;
$modules{IT}{defptr}{ioname} = $ioname;
if ((substr($msg, 0, 1)) ne 'i') { if ((substr($msg, 0, 1)) ne 'i') {
Log3 $hash,4,"$ioname IT: message not supported by IT \"$msg\"!"; Log3 $hash,4,"$ioname IT: message not supported by IT \"$msg\"!";
return undef; return undef;
@ -1529,7 +1531,7 @@ Examples:
- at the CUL can the ITclock found out from the raw messages (X31). - at the CUL can the ITclock found out from the raw messages (X31).
</li><br> </li><br>
<a name="ITfrequency"></a> </li> <a name="ITfrequency"></a>
<li>ITfrequency<br> <li>ITfrequency<br>
Sets the frequency of the sender. Sets the frequency of the sender.
</li><br> </li><br>
@ -1816,7 +1818,7 @@ Beispiele:
- Beim CUL kann die ITclock aus den raw Daten (X31) ermittelt werden. - Beim CUL kann die ITclock aus den raw Daten (X31) ermittelt werden.
</li><br> </li><br>
<a name="ITfrequency"></a> </li> <a name="ITfrequency"></a>
<li>ITfrequency<br> <li>ITfrequency<br>
Setzt die Sendefrequenz. Setzt die Sendefrequenz.
</li><br> </li><br>