diff options
Diffstat (limited to 'rotor/rotor.c')
-rw-r--r-- | rotor/rotor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rotor/rotor.c b/rotor/rotor.c index f6121f4..d231b21 100644 --- a/rotor/rotor.c +++ b/rotor/rotor.c @@ -39,7 +39,7 @@ int main( int argc, char** argv ) gpio_fd = open( "/sys/class/gpio/gpio15_pb2/value", O_RDONLY | O_NONBLOCK ); - timeout = 500; + timeout = 500; //ms clock_gettime(CLOCK_MONOTONIC, &then_ts); @@ -71,6 +71,7 @@ int main( int argc, char** argv ) printf("%d\n\n", number % 10); number=0; } + firstInt=true; } if (fdset[1].revents & POLLPRI) { @@ -87,7 +88,7 @@ int main( int argc, char** argv ) float msec=diff_ts.tv_nsec/1000000.0; - printf("value [%s] sec %d msec %f\n",buf,sec,msec); +// printf("value [%s] sec %d msec %f number pre %d\n",buf,sec,msec, number); if (firstInt || msec > 90) number++; firstInt=false; |