debug
This commit is contained in:
parent
4b191e6d3f
commit
0bd11d027f
|
@ -32,14 +32,19 @@
|
||||||
$STATE = syscall( SOURCE_DIR."/lib/gpio/in $MOTOR_PIN" );
|
$STATE = syscall( SOURCE_DIR."/lib/gpio/in $MOTOR_PIN" );
|
||||||
|
|
||||||
/* (2) If invalid */
|
/* (2) If invalid */
|
||||||
if( is_bool($STATE) )
|
if( is_bool($STATE) ){
|
||||||
|
slog('read: 0', 'motheure-simple:loop', 'motheure');
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* (3) If active, pass */
|
/* (3) If active, pass */
|
||||||
if( $STATE == 0 )
|
if( $STATE == 0 ){
|
||||||
|
slog('read: 1', 'motheure-simple:loop', 'motheure');
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/* (4) Return FALSE means motor inactive */
|
/* (4) Return FALSE means motor inactive */
|
||||||
|
slog('read: 0', 'motheure-simple:loop', 'motheure');
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue