Little fix (wrong syscall() links)
This commit is contained in:
parent
291190475d
commit
bbd4c717c5
|
@ -59,8 +59,9 @@
|
|||
=========================================================*/
|
||||
/* (1) Activate pin + set OUT mode */
|
||||
foreach($g_pins as $pinNumber)
|
||||
|
||||
// if failed -> propagate error
|
||||
if( syscall(SOURCE_DIR."/gpio/out {$pinNumber}") == false )
|
||||
if( syscall(SOURCE_DIR."/lib/gpio/out {$pinNumber}") == false )
|
||||
return 127;
|
||||
|
||||
/* (2) For each pin, set the associated value */
|
||||
|
@ -68,12 +69,12 @@
|
|||
|
||||
// {1} set value to LOW if 0 //
|
||||
if( $pinValue == 0 )
|
||||
if( syscall(SOURCE_DIR."/gpio/low ".$g_pins[$pinIndex]) == false )
|
||||
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."/gpio/high ".$g_pins[$pinIndex]) == false )
|
||||
if( syscall(SOURCE_DIR."/lib/gpio/high ".$g_pins[$pinIndex]) == false )
|
||||
return 127;
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
$out = preg_replace('/\s+$/', '', $out);
|
||||
|
||||
/* (4) Manage result */
|
||||
if( is_numeric($out) ) return ($out==0);
|
||||
if( is_numeric($out) ) return ("$out"==="0");
|
||||
else return $out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue