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.
Dependents: MR_example 2019_AR_Itsuki
Diff: PID_VEL.cpp
- Revision:
- 6:925e92d4d4e8
- Parent:
- 5:ceb7cbed26f3
--- a/PID_VEL.cpp Tue Jul 16 15:13:18 2019 +0000
+++ b/PID_VEL.cpp Sat Jul 20 13:26:09 2019 +0000
@@ -50,7 +50,7 @@
else if(_output < 0)
_output = 0;
if(*sensor == 0 && *target == 0)
- _output = 0;
+ _output = integral = 0;
output = _output;
if(abs(error) <= allowable_error)