From c04ec63bb31d471584c83ce3e013ccd72c968afd Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 17 Oct 2018 09:43:01 +0300 Subject: diagnostic sends calculated error in the tension info - every 10 msec --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h | 1 + .../Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') 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) -- cgit v1.3.1