aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-05-19 19:28:56 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-05-19 19:28:56 +0300
commit5f6a459aab9a781dc143d8a6eb214408ead6906d (patch)
tree1f1c53c59790f2f8d5602666e6926f0b500eba63 /Software/Embedded_SW/Embedded/Modules/Control
parentd3a01259a456926ec6a0b05ba897c89230149774 (diff)
downloadTango-5f6a459aab9a781dc143d8a6eb214408ead6906d.tar.gz
Tango-5f6a459aab9a781dc143d8a6eb214408ead6906d.zip
PID - fabs() enabled small integral values. empty waste indication.
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/PIDAlgo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/PIDAlgo.c b/Software/Embedded_SW/Embedded/Modules/Control/PIDAlgo.c
index a443b4785..dd9841777 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/PIDAlgo.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/PIDAlgo.c
@@ -46,7 +46,7 @@ float AdvancedPIDAlgorithmCalculation(float _setPoint,float _mesuredParam , PID_
error = _setPoint - _mesuredParam;
//In case of error too small then stop integration
- if(abs(error) > params->epsilon)
+ if(fabs(error) > params->epsilon)
{
*_integral = *_integral + error*params->dt;
}