aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-09-26 17:17:18 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-09-26 17:17:18 +0300
commit5e36d3c4ea6a4b70cdadcabd1f9f3733d479f23d (patch)
tree04be94722dcf0a9b3a580906f298135430986983 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
parent477bd8b7d123e880228dd265847ef00f649ff77e (diff)
downloadTango-5e36d3c4ea6a4b70cdadcabd1f9f3733d479f23d.tar.gz
Tango-5e36d3c4ea6a4b70cdadcabd1f9f3733d479f23d.zip
version 1.4.5.2 fix problems in brushstop free and in cleaner/lub direction
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
index 4789c7a17..46ecb1d46 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -332,7 +332,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
if (WinderRunSamples>10)
{
WinderRunSum+=WinderRun;
- WinderRunAverage = WinderRunSum/(WinderRunSamples-10);
+ WinderRunAverage = WinderRunSum/(WinderRunSamples);
if ((fabs(WinderRun-WinderRunAverage)>=30)||(WinderRunSamples%100 == 0))
{
usnprintf(ScrewStr, 150, "curr,sum,avg,samples {Winder Encoder:, %d, %d, %d, %d, %d}",WinderRun,(int)WinderRunSum,(int)WinderRunAverage,(int)WinderRunSamples,