Debug motor count
This commit is contained in:
parent
0506510955
commit
9ed6f0719d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue