[Fixed] Set to low (because not set to OUT mode if already so doesn't set to LOW by default)

This commit is contained in:
xdrm-brackets 2017-02-21 16:35:39 +01:00
parent ed3f8eb835
commit aa7377ede2
1 changed files with 4 additions and 5 deletions

View File

@ -68,11 +68,10 @@
foreach($g_state as $pinIndex=>$pinValue){
// set value to HIGH if not 0 //
if( $pinValue !== 0 ){
if( syscall(SOURCE_DIR."/lib/gpio/high ".$g_pins[$pinIndex]) == false )
return 127;
}
if( $pinValue !== 0 )
syscall(SOURCE_DIR."/lib/gpio/high ".$g_pins[$pinIndex]);
else
syscall(SOURCE_DIR."/lib/gpio/low ".$g_pins[$pinIndex]);
}