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.
Dependencies: BCEmotor Battery_Linear_Actuator_ Controller_ IMU_code_ LTC1298_7_14 MODSERIAL PosVelFilter_7_14 System_ mbed
Fork of 7_14_17_FSG_working by
Revision 7:10d7fbac30ea, committed 2017-07-21
- Comitter:
- mdavis30
- Date:
- Fri Jul 21 15:25:11 2017 +0000
- Parent:
- 6:ce2cf7f4d7d5
- Commit message:
Changed in this revision
Controller.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Controller.lib Fri Jul 21 13:32:10 2017 +0000 +++ b/Controller.lib Fri Jul 21 15:25:11 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/FSG/code/Controller_/#503138a2f413 +https://developer.mbed.org/teams/FSG/code/Controller_/#55085534a378
--- a/main.cpp Fri Jul 21 13:32:10 2017 +0000 +++ b/main.cpp Fri Jul 21 15:25:11 2017 +0000 @@ -123,13 +123,13 @@ float positionCmd_temp; //set the intial gains for the position controller - posCon().setPgain(P); + /*posCon().setPgain(P); posCon().setIgain(I); posCon().setDgain(D); posCon().writeSetPoint(positionCmd); hBridge().reset(); hBridge().run(motor_cmd); - + */ /* *************************** LED *************************** */ led1 = 1; //initial values led2 = 1; @@ -408,7 +408,7 @@ } } else if (Key == 'l' or Key == 'L') - PC.printf("DEBUG: String position? %f velocity? %f (BCE active: %d)\n", pvf().getPosition(), pvf().getVelocity(),posCon().getOutput()); //DEBUG TROY + PC.printf("DEBUG: String position? %f velocity? %f (BCE active: %f)\n", pvf().getPosition(), pvf().getVelocity(),posCon().getOutput()); //DEBUG TROY //Linear Actuator Controls else if(Key == 'c' or Key == 'C') @@ -640,6 +640,7 @@ pc().printf("Bad pot issue\n"); //hBridge().stop(); count = 0; + } } @@ -647,6 +648,11 @@ { pc().printf("Hit the limit switch??\n"); hBridge().stop(); + wait(1); + hBridge().reset(); + positionCmd= 375; + posCon().writeSetPoint(positionCmd); + hBridge().run(posCon().getOutput()); } //string snaps