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: Omni_2017_z BETA_A ALPHA_A GAMMA_A ... more
Diff: MD_PID.cpp
- Revision:
- 3:0157bb21ba04
- Parent:
- 2:5b2331251b3e
- Child:
- 4:374ca057d8d5
--- a/MD_PID.cpp Tue Aug 30 01:46:33 2016 +0000
+++ b/MD_PID.cpp Tue Aug 30 02:51:29 2016 +0000
@@ -22,7 +22,7 @@
Reset();
}
-double MD_PID::Drive(double ref)
+double MD_PID::Drive(double ref, double stop)
{
/*
if(ref1 != ref)
@@ -52,7 +52,7 @@
duty = -1.0;
}
- if( ( (ref >= 0) ^ (Speed() >= 0) ) && fabs(Speed()) > 0.3)
+ if( ( (ref >= 0) ^ (Speed() >= 0) ) && fabs(Speed()) > stop)
duty = 0;
md->rotate(duty);