From 33789859370eed7326e3a14e4d6f19376fd45129 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 20 Feb 2017 23:18:36 +0100 Subject: [PATCH] Not set to LOW (only HIGH if not 0) because mode OUT set automatically to LOW --- lib/chip/source/state.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/chip/source/state.php b/lib/chip/source/state.php index 9c4c2ca..5740f5d 100755 --- a/lib/chip/source/state.php +++ b/lib/chip/source/state.php @@ -67,14 +67,8 @@ /* (2) For each pin, set the associated value */ foreach($g_state as $pinIndex=>$pinValue){ - // {1} set value to LOW if 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{ + // set value to HIGH if not 0 // + if( $pinValue !== 0 ){ if( syscall(SOURCE_DIR."/lib/gpio/high ".$g_pins[$pinIndex]) == false ) return 127;