ちょっとかえた
Fork of encoder by
Diff: encoder.cpp
- Revision:
- 1:6456080fa03b
- Parent:
- 0:0d6f91c4a794
diff -r 0d6f91c4a794 -r 6456080fa03b encoder.cpp --- a/encoder.cpp Thu Mar 22 05:55:17 2018 +0000 +++ b/encoder.cpp Mon Mar 26 20:42:49 2018 +0000 @@ -16,17 +16,19 @@ count++; if(Z == true){ zcount++; + count=0; } }else{ count--; if(Z == true){ zcount--; + count=0; } } } -float Encoder::read_rotate(){ - return (float)(count / 300.0); +int Encoder::read_rotate(){ + return count; } int Encoder::read_z(){