aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-10-17 09:43:01 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-10-17 09:43:01 +0300
commitc04ec63bb31d471584c83ce3e013ccd72c968afd (patch)
tree5478d7c2f7d15e4e33e37c208d2a468590ba61ac /Software/Embedded_SW/Embedded/Modules/Thread
parent3ded2e3910c6829c51a87711d7d82a1993596944 (diff)
downloadTango-c04ec63bb31d471584c83ce3e013ccd72c968afd.tar.gz
Tango-c04ec63bb31d471584c83ce3e013ccd72c968afd.zip
diagnostic sends calculated error in the tension info - every 10 msec
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c15
2 files changed, 16 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
index 2961bd105..c5e3edc85 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
@@ -27,6 +27,7 @@ uint32_t InternalWindingConfigMessage(JobSpool* request);
uint32_t ThreadConfigBreakSensor(void *request);
uint32_t ThreadGetMotorSpeed(threadMotorsEnum MotorId);
+double ThreadGetMotorCalculatedError(int DancerId);
uint32_t ThreadPrepareState(void *JobDetails);
uint32_t ThreadPreSegmentState(void *JobDetails);
uint32_t ThreadSegmentState(void *JobDetails, int SegmentId);
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 503ef2c37..0ca0b7159 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -490,6 +490,21 @@ uint32_t ThreadGetMotorSpeed(threadMotorsEnum MotorId)
{
return CurrentControlledSpeed[MotorId];
}
+//********************************************************************************************************************
+double ThreadGetMotorCalculatedError(int DancerId)
+{
+ switch (DancerId)
+ {
+ case FEEDER_DANCER:
+ return (double)MotorControlConfig[FEEDER_MOTOR].m_calculatedError;
+ case POOLER_DANCER:
+ return (double)MotorControlConfig[POOLER_MOTOR].m_calculatedError;
+ case WINDER_DANCER:
+ return (double)MotorControlConfig[WINDER_MOTOR].m_calculatedError;
+
+ }
+ return 0;
+}
//********************************************************************************************************************
uint32_t ThreadInitialTestStub(HardwareMotor * request)