vf
Dependencies: Servo ServoArm mbed
Fork of PES_Official by
Diff: Sources/Greifer.cpp
- Revision:
- 12:c0bcb95885dd
- Parent:
- 11:292bdbd85a9c
- Child:
- 13:6c1f8e35b242
diff -r 292bdbd85a9c -r c0bcb95885dd Sources/Greifer.cpp --- a/Sources/Greifer.cpp Sat May 06 13:33:23 2017 +0000 +++ b/Sources/Greifer.cpp Wed May 10 13:30:13 2017 +0000 @@ -19,8 +19,8 @@ void Greifer::init(Servo* greifer) { this->greifer = greifer; - greifer->calibrate(0.0015f, 180.0f); - greifer->position(85.0f); + greifer->calibrate(0.0017f, 180.0f); + greifer->position(60.0f); } int Greifer::take() @@ -32,19 +32,21 @@ return 0; } else{ + time = 0; return 1; } } int Greifer::leave() { - this->greifer->position(85.0f); + this->greifer->position(60.0f); static int time = 0; if( time < 10 ){ time++; return 0; } else{ + time = 0; return 1; } } \ No newline at end of file