aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-11-11 17:37:27 +0200
committerShlomo Hecht <shlomo@twine-s.com>2018-11-11 17:37:27 +0200
commit9699b74d7cf87fef466cb6606fe9e110e3b15120 (patch)
tree25e64a9a7c4b8bd819489d44a954d7a6a5421f52 /Software/Embedded_SW/Embedded/Modules/Thread
parentd39c39e3868acd5da5f636bb7f5b49de673bb10f (diff)
downloadTango-9699b74d7cf87fef466cb6606fe9e110e3b15120.tar.gz
Tango-9699b74d7cf87fef466cb6606fe9e110e3b15120.zip
reset control with eNoControl value
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c14
1 files changed, 7 insertions, 7 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..d8dbbaaa0 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -316,12 +316,12 @@ uint32_t ThreadControlSpeedReadFunction(uint32_t IfIndex, uint32_t ReadValue)
//double eNormalizedError[100];
//int TranslatedreadValue[100];
#define MAX_THREAD_CONTROL_LOG 500
-double calculatedError[MAX_THREAD_CONTROL_LOG];
-int MotorId[MAX_THREAD_CONTROL_LOG];
-int readValue[MAX_THREAD_CONTROL_LOG];
-int AveragereadValue[MAX_THREAD_CONTROL_LOG];
-int calculatedspeed[MAX_THREAD_CONTROL_LOG];
-int timestamp[MAX_THREAD_CONTROL_LOG];
+double calculatedError[MAX_THREAD_CONTROL_LOG+1];
+int MotorId[MAX_THREAD_CONTROL_LOG+1];
+int readValue[MAX_THREAD_CONTROL_LOG+1];
+int AveragereadValue[MAX_THREAD_CONTROL_LOG+1];
+int calculatedspeed[MAX_THREAD_CONTROL_LOG+1];
+int timestamp[MAX_THREAD_CONTROL_LOG+1];
int controlIndex = 0;
bool keepdata = true;
/*int32_t KeepReadValue = 0;
@@ -475,7 +475,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue)
readValue[controlIndex] = ReadValue;
AveragereadValue[controlIndex] = avreageSampleValue;
calculatedspeed[controlIndex] = calculated_speed;
- timestamp[controlIndex] = HibernateRTCSSGet();
+ timestamp[controlIndex] = msec_millisecondCounter;
if (controlIndex++>=MAX_THREAD_CONTROL_LOG)
controlIndex = 0;
}