Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Master.cpp
- Revision:
- 57:dfea5d24d650
- Parent:
- 56:7015e2e79ea7
- Child:
- 58:c0b09adb2997
--- a/Master.cpp Tue Dec 03 02:49:30 2013 +0000 +++ b/Master.cpp Tue Dec 03 10:01:18 2013 +0000 @@ -46,12 +46,15 @@ int main() { kankan.start(); kankan.zero(); + /*m1.stop(); + m2.stop(); + while(1){ + kankan.testEncoders(pc); + wait(.1); + }*/ //Initalize Control Varialbes int Phase = 0;//Flight Phase - int initLen = 0.08;//0.17; - //float initM1 = -0.5; - //float initM2 = 0.5; while(true){ if (Phase == 0){//Flight Phase @@ -59,18 +62,17 @@ //FLIGHT(initM1, initM2); //m1.setPos(-0.5); led1=0; - kankan.setPoint(Point(0,-.15,0)); + kankan.setPoint(Point(0.12,-.15,0)); if(kankan.landDetection()){ //Landed going to Phase 1 //Record initial Length. Phase =1; - initLen = sqrt(pow(kankan.getPoint().x,2)+pow(kankan.getPoint().y,2)); } }else{ //Land Phase led1=1; //landing detected //Uses SLIP Model to Control - kankan.slip(1000,Point(.05,-.18,0), pc); + kankan.slip(1000,Point(-.08,-1.0,0), pc); //kankan.testEncoders(pc); //m1.setPos(-1); if(!kankan.landDetection()){