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: Nucleo_blink_led mbed
Fork of Nucleo_blink_led by
Diff: calculateFunc.cpp
- Revision:
- 7:11dd5581c763
- Parent:
- 6:a652deaae134
--- a/calculateFunc.cpp Sun Apr 01 18:21:50 2018 +0000
+++ b/calculateFunc.cpp Sat Apr 28 21:34:55 2018 +0000
@@ -3,16 +3,5 @@
void calculateFunc()
{
- //USE ERROR TO CALCULATE PID VALUES
- Prop = errorVar;
- Inte = Inte + errorVar;
- Dere = ((errorVar) - (previousError));
-
- //BECAUSE THE CURRENT ERROR IS CALCULATED IN A FUNCTION BEFORE THIS, ON THE NEXT ITERATION WE WANT TO REMEMBER THE PREVIOUS VARIABLE
- previousError=errorVar;
-
- //FORMULATE OFFSET VALUE FROM ERROR, PID VALUES AND CONSTANTS
- PIDs = (Kp*Prop)+(Kd*Dere)+(Ki*Inte);
- newPIDs=PIDs;
return;
}
\ No newline at end of file
