From 0bd11d027f2553be05aaae7f981edceb969232e8 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 14 Oct 2017 09:24:05 +0200 Subject: [PATCH] debug --- feature/motheure-simple/source/loop.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/feature/motheure-simple/source/loop.php b/feature/motheure-simple/source/loop.php index dc4c3c7..187c872 100644 --- a/feature/motheure-simple/source/loop.php +++ b/feature/motheure-simple/source/loop.php @@ -32,14 +32,19 @@ $STATE = syscall( SOURCE_DIR."/lib/gpio/in $MOTOR_PIN" ); /* (2) If invalid */ - if( is_bool($STATE) ) + if( is_bool($STATE) ){ + slog('read: 0', 'motheure-simple:loop', 'motheure'); return false; + } /* (3) If active, pass */ - if( $STATE == 0 ) + if( $STATE == 0 ){ + slog('read: 1', 'motheure-simple:loop', 'motheure'); return true; + } /* (4) Return FALSE means motor inactive */ + slog('read: 0', 'motheure-simple:loop', 'motheure'); return false; }