aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-09-22 11:09:01 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-09-22 11:09:01 +0300
commit383332c5ff77d9d8ea0532e5f04c23217563ab30 (patch)
tree26ecc29880589f2b0fcb01b30bfc50a87f7fe432 /Software/Embedded_SW/Embedded/Modules/Thread
parent6715e2fccbfb38f803d5cf5e2e98377a47340582 (diff)
downloadTango-383332c5ff77d9d8ea0532e5f04c23217563ab30.tar.gz
Tango-383332c5ff77d9d8ea0532e5f04c23217563ab30.zip
handle safety alarms, log winder better.
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c5
1 files changed, 4 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 20045e5fb..4cbe1f70f 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -322,7 +322,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
#ifdef READ_SCREW_ENCODER
int WinderRun;
WinderRun = abs(ScrewLocationRun[1] - ScrewLocationRun[0]);
- if /*((WinderRun < 50000)&&(Add100 == false))*/(Add100 == false)
+ if ((WinderRun < 50000)&&(Add100 == false))
{
WinderRunSum+=WinderRun;
WinderRunSamples++;
@@ -334,6 +334,9 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
Report(ScrewStr,__FILE__,__LINE__,CalculationDirectionChangeCounter,RpWarning,ScrewLocationStart, 0);
}
}
+ else
+ Report("winder run error value" ,__FILE__,WinderRun,ScrewLocationRun[0],RpWarning,ScrewLocationRun[1], 0);
+
//Report(ScrewStr,__FILE__,__LINE__,CalculationDirectionChangeCounter,RpWarning,ScrewLocationStart, 0);
//REPORT_MSG(abs(ScrewLocationRun[1] - ScrewLocationRun[0]), "Screw Run NumberOfSteps");
//usnprintf(ScrewStr, 100, "Winder Encoder: 0 0x%x 1 0x%x diff %d intent %d rot %d",ScrewLocationRun[0],ScrewLocationRun[1],abs(ScrewLocationRun[1] - ScrewLocationRun[0]),ScrewNumberOfSteps,Rotations*10);