backup
Dependencies: MODSERIAL Motordriver QEI Servo mbed HIDScope
Fork of The_Claw_Back-up_Buttons by
Revision 14:65780d480874, committed 2016-11-02
- Comitter:
- meikefrok
- Date:
- Wed Nov 02 18:56:54 2016 +0000
- Parent:
- 13:dd7b41766f5f
- Commit message:
- ok
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 02 18:46:03 2016 +0000 +++ b/main.cpp Wed Nov 02 18:56:54 2016 +0000 @@ -398,14 +398,14 @@ Arm.stop(1)==1; - if (rlf_y > threshold_value) { + if (btn&&!btn2) { if(position_cart > -105 && position_arm >= 95){ //If the cart is not at the end, the arm can't move any further than 45 degrees Arm.stop(1)==1; }else if(position_cart > -105 && position_arm >= 25 && position_claw == 27){ Arm.stop(1)==1; - }else if(position_cart<= -105 && position_arm>=80){ //If the cart is at the right end, the arm can't move any further than 70 degrees + }else if(position_cart<= -105 && position_arm>=160){ //If the cart is at the right end, the arm can't move any further than 70 degrees Arm.stop(1)==1; }else{ @@ -416,14 +416,14 @@ Cart.stop(1)==1; } - }else if (llf_y > threshold_value) { + }else if (!btn&&btn2) { if(position_cart < 105 && position_arm <= -95){ //If the cart is not at the end, the arm can't move any further than 45 degrees Arm.stop(1)==1; }else if(position_cart < 105 && position_arm <= -25 && position_claw == -18){ Arm.stop(1)==1; - }else if(position_cart>=105 && position_arm<=-80){ //If the cart is at the left end, the arm can't move any further than 70 degrees + }else if(position_cart>=105 && position_arm<=-160){ //If the cart is at the left end, the arm can't move any further than 70 degrees Arm.stop(1)==1; }else{