diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-11 17:30:48 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-11 17:30:48 +0200 |
| commit | a435fa908aa5ef7e167c96866316c2c018f05877 (patch) | |
| tree | ab37d910eddce9aea124d5e04b5a6d58248ef2c1 /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | 3c3b0d089f9b4fec79ed2ef773833ca4cf74f137 (diff) | |
| download | Tango-a435fa908aa5ef7e167c96866316c2c018f05877.tar.gz Tango-a435fa908aa5ef7e167c96866316c2c018f05877.zip | |
remove usb reconnection (only flush buffers). improve thread tracking
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 22f54eb50..24ce14676 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -5,6 +5,7 @@ * operating the dispensers according to predefined dispensing rate from the UI **************************************************************************************************************************/ #include "include.h" +#include <DataDef.h> #include "thread.h" #include "thread_ex.h" #include "../control/control.h" @@ -317,6 +318,8 @@ uint32_t ThreadControlSpeedReadFunction(uint32_t IfIndex, uint32_t ReadValue) //int TranslatedreadValue[100]; #define MAX_THREAD_CONTROL_LOG 500 double calculatedError[MAX_THREAD_CONTROL_LOG]; +double NormError[MAX_THREAD_CONTROL_LOG]; +double mIntegral[MAX_THREAD_CONTROL_LOG]; int MotorId[MAX_THREAD_CONTROL_LOG]; int readValue[MAX_THREAD_CONTROL_LOG]; int AveragereadValue[MAX_THREAD_CONTROL_LOG]; @@ -475,7 +478,10 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) readValue[controlIndex] = ReadValue; AveragereadValue[controlIndex] = avreageSampleValue; calculatedspeed[controlIndex] = calculated_speed; - timestamp[controlIndex] = HibernateRTCSSGet(); + NormError[controlIndex] + = MotorControlConfig[index].m_mesuredParam; + mIntegral[controlIndex] = MotorControlConfig[index].m_integral; + timestamp[controlIndex] = msec_millisecondCounter; if (controlIndex++>=MAX_THREAD_CONTROL_LOG) controlIndex = 0; } |
