Merged to branch
Dependencies: USBDevice mbed EquatorStrutController LightWeightSerialTransmit
Fork of EquatorStrutDigitalMonitor by
Revision 14:67466da6663d, committed 2014-08-13
- Comitter:
- alpesh
- Date:
- Wed Aug 13 08:36:07 2014 +0000
- Parent:
- 13:18c376e5dc9a
- Child:
- 16:47d761226df6
- Commit message:
- Implemented 2 PID (Position and Speed)
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Aug 13 08:31:24 2014 +0000 +++ b/main.cpp Wed Aug 13 08:36:07 2014 +0000 @@ -353,7 +353,7 @@ int PreviousTime = 0; -double vMax = 60; +double vMax = 20; void Controller () { @@ -377,7 +377,6 @@ PosProError = PosError * PosKpGain; PosDifError = (PosError - PosPreviousError[errorcounter]) / timeStep; - PosiState += PosError; @@ -393,7 +392,6 @@ TargetVelocity = (PosKpGain * PosError + PosKdGain * PosDifError + PosIntError); - /////////////////////////////////////////////////////////////////////////////////////////////// //Velocity PID /////////////////////////////////////////////////////////////////////////////////////////////// @@ -452,8 +450,6 @@ VelPreviousError[errorcounter] = VelError; // } - - } int main()