Not set to LOW (only HIGH if not 0) because mode OUT set automatically to LOW
This commit is contained in:
parent
b8f7051285
commit
3378985937
|
@ -67,14 +67,8 @@
|
||||||
/* (2) For each pin, set the associated value */
|
/* (2) For each pin, set the associated value */
|
||||||
foreach($g_state as $pinIndex=>$pinValue){
|
foreach($g_state as $pinIndex=>$pinValue){
|
||||||
|
|
||||||
// {1} set value to LOW if 0 //
|
// set value to HIGH if not 0 //
|
||||||
if( $pinValue == 0 ){
|
if( $pinValue !== 0 ){
|
||||||
|
|
||||||
if( syscall(SOURCE_DIR."/lib/gpio/low ".$g_pins[$pinIndex]) == false )
|
|
||||||
return 127;
|
|
||||||
|
|
||||||
// {2} set value to HIGH if not 0 //
|
|
||||||
}else{
|
|
||||||
|
|
||||||
if( syscall(SOURCE_DIR."/lib/gpio/high ".$g_pins[$pinIndex]) == false )
|
if( syscall(SOURCE_DIR."/lib/gpio/high ".$g_pins[$pinIndex]) == false )
|
||||||
return 127;
|
return 127;
|
||||||
|
|
Loading…
Reference in New Issue