Debug motor count

This commit is contained in:
xdrm-brackets 2017-10-14 09:16:21 +02:00
parent 0506510955
commit 9ed6f0719d
1 changed files with 4 additions and 1 deletions

View File

@ -71,7 +71,7 @@
if( !motheure_read() ) // if not active -> continue watching
return false;
slog('Motor active detected', 'motheure-simple:loop', 'motheure');
slog('Motor start', 'motheure-simple:loop', 'motheure');
/* [3] Wait for machine to stop
=========================================================*/
@ -87,7 +87,9 @@
/* (2) If stopped -> increment offset */
if( !motheure_read() ){
$offset++;
slog("Motor offset: $offset/$THRESHOLD", 'motheure-simple:loop', 'motheure');
/* (3) If not stopped */
}else{
@ -107,6 +109,7 @@
$f_data->fwrite( json_encode([
floor( $stop_ts - $start_ts )
]).PHP_EOL );
slog("Motor stop", 'motheure-simple:loop', 'motheure');
/* (2) Return status */
return true;