vf
Dependencies: Servo ServoArm mbed
Fork of PES_Official by
Diff: Sources/Arm.cpp
- Revision:
- 7:6fed0dcae9c1
- Parent:
- 6:ba26dd3251b3
- Child:
- 10:f76476943a6c
--- a/Sources/Arm.cpp Wed Apr 26 14:09:08 2017 +0000 +++ b/Sources/Arm.cpp Tue May 02 08:00:19 2017 +0000 @@ -12,14 +12,14 @@ void Arm::init(Servo* servoArm){ this->servoArm = servoArm; - this->servoArm->calibrate(0.0015f, 180.0f); + this->servoArm->calibrate(0.008f, 90.0f); this->servoArm->position(COLLECT_POS); } void Arm::collecttodown(int* done){ static float pos=COLLECT_POS; if(pos>TAKE_POS) { - pos-=0.5f; + pos-=1; this->servoArm->position(pos); } else{ @@ -30,7 +30,7 @@ void Arm::downtocollect(int* done){ static float pos=TAKE_POS; if(pos<COLLECT_POS) { - pos+=0.5f; + pos+=1; this->servoArm->position(pos); } else{ @@ -41,7 +41,7 @@ void Arm::collecttoback(int* done){ static float pos=COLLECT_POS; if(pos<RELEASE_POS) { - pos+=0.5f; + pos+=1; this->servoArm->position(pos); } else{ @@ -52,7 +52,7 @@ void Arm::backtocollect(int* done){ static float pos=RELEASE_POS; if(pos>COLLECT_POS) { - pos-=0.5f; + pos-=1; this->servoArm->position(pos); } else{