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

52_I2C_MCP23017.pm: fix: update Inputs on start

git-svn-id: https://svn.fhem.de/fhem/trunk@7007 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klauswitt 2014-11-17 18:03:42 +00:00
parent 9b16e37701
commit a97d27a7f5

View File

@ -130,6 +130,14 @@ sub I2C_MCP23017_Init($$) { #Geraet beim anlegen/booten
}
}
#Output level wieder setzen die zweite
#$sbyte = 0;
#foreach (reverse 0..7) {
# $sbyte += $setsP{ReadingsVal($hash->{NAME},"PortA".$_,"off")} << ($_); #Werte fuer PortA aus dem Reading holen
# $sbyte += $setsP{ReadingsVal($hash->{NAME},"PortB".$_,"off")} << (8 + $_);
#}
#$msg = I2C_MCP23017_SetRegPair($hash, $sbyte, "GPIO") if $sbyte;
I2C_MCP23017_Get($hash, $hash->{NAME});
$hash->{STATE} = 'Initialized';
return ($msg) ? $msg : undef;
}
@ -500,7 +508,7 @@ sub I2C_MCP23017_UpdReadings($$$) { #nach Rueckmeldung read
<b>Set</b>
<ul>
<code>set &lt;name&gt; &lt;port[,port[...]]&gt; &lt;value&gt;</code><br><br>
where <code>&lt;port&gt;</code> is one of PortA0 to PortA7 / PortAB to PortB7 and <code>&lt;value&gt;</code> is one of:<br>
where <code>&lt;port&gt;</code> is one of PortA0 to PortA7 / PortB0 to PortB7 and <code>&lt;value&gt;</code> is one of:<br>
<ul>
<code>
off<br>